diff --git a/src/jamidht/account_manager.cpp b/src/jamidht/account_manager.cpp index ec8a9494c0f194ce92c3e988fe1bebcf7eec54d9..333d86e958d313d4371cce3bbca3563c3a13e481 100644 --- a/src/jamidht/account_manager.cpp +++ b/src/jamidht/account_manager.cpp @@ -252,10 +252,12 @@ AccountManager::startSync(const OnNewDeviceCb& cb, const OnDeviceAnnouncedCb& dc true, [this, v](const std::shared_ptr<dht::crypto::Certificate>&, dht::InfoHash peer_account) mutable { - JAMI_WARN("Got trust request from: %s / %s. ConversationId: %s", - peer_account.toString().c_str(), - v.from.toString().c_str(), - v.conversationId.c_str()); + JAMI_WARN( + "Got trust request (confirm: %u) from: %s / %s. ConversationId: %s", + v.confirm, + peer_account.toString().c_str(), + v.from.toString().c_str(), + v.conversationId.c_str()); if (info_) if (info_->contacts->onTrustRequest(peer_account, v.owner, @@ -732,8 +734,8 @@ AccountManager::forEachDevice( struct State { - unsigned remaining { - 1}; // Note: state is initialized to 1, because we need to wait that the get is finished + // Note: state is initialized to 1, because we need to wait that the get is finished + unsigned remaining {1}; std::set<dht::PkId> treatedDevices {}; std::function<void(const std::shared_ptr<dht::crypto::PublicKey>&)> onDevice; std::function<void(bool)> onEnd; diff --git a/src/jamidht/jamiaccount.cpp b/src/jamidht/jamiaccount.cpp index 5910a1c50d25005c18c365ec4f8734e0003212ee..7e93f0711c34cafe1c6f8189a7b30305e2b81b95 100644 --- a/src/jamidht/jamiaccount.cpp +++ b/src/jamidht/jamiaccount.cpp @@ -2009,10 +2009,9 @@ JamiAccount::syncConversations(const std::string& peer, const DeviceId& deviceId for (const auto& [key, ci] : infos->conversations) { auto it = conversations_.find(key); if (it != conversations_.end() && it->second) { - if (it->second->isMember(peer, false)) + if (!it->second->isRemoving() && it->second->isMember(peer, false)) toFetch.emplace(key); - } else if (std::find(ci.members.begin(), ci.members.end(), peer) - != ci.members.end()) { + } else if (!ci.removed && std::find(ci.members.begin(), ci.members.end(), peer) != ci.members.end()) { // In this case the conversation was never cloned (can be after an import) toClone.emplace(key); }