Skip to content
Snippets Groups Projects
Commit baf2510f authored by Sébastien Blin's avatar Sébastien Blin
Browse files

account_manager: log error if trust request is not sent

Change-Id: Iac15b1cbefadb2b438029f53608542ba577e28af
parent b7dd4256
No related branches found
No related tags found
No related merge requests found
...@@ -598,12 +598,20 @@ AccountManager::sendTrustRequest(const std::string& to, ...@@ -598,12 +598,20 @@ AccountManager::sendTrustRequest(const std::string& to,
} }
forEachDevice(toH, forEachDevice(toH,
[this, toH, convId, payload](const std::shared_ptr<dht::crypto::PublicKey>& dev) { [this, toH, convId, payload](const std::shared_ptr<dht::crypto::PublicKey>& dev) {
JAMI_WARN("sending trust request to: %s / %s", auto to = toH.toString();
toH.toString().c_str(), JAMI_WARNING("sending trust request to: {:s} / {:s}",
dev->getLongId().toString().c_str()); to,
dev->getLongId().toString());
dht_->putEncrypted(dht::InfoHash::get("inbox:" + dev->getId().toString()), dht_->putEncrypted(dht::InfoHash::get("inbox:" + dev->getId().toString()),
dev, dev,
dht::TrustRequest(DHT_TYPE_NS, convId, payload)); dht::TrustRequest(DHT_TYPE_NS, convId, payload),
[to, size = payload.size()](bool ok) {
if (!ok)
JAMI_ERROR("Tried to send request {:s} (size: "
"{:d}), but put failed",
to,
size);
});
}); });
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment