diff --git a/src/jamidht/jami_contact.h b/src/jamidht/jami_contact.h index 752085088e1f79fa6b3a453552c7de1fac996ffd..ed18dc6fc60580429a7542ee59fe66edaaf63deb 100644 --- a/src/jamidht/jami_contact.h +++ b/src/jamidht/jami_contact.h @@ -73,6 +73,7 @@ struct Contact const auto copy = *this; if (c.added > added) { added = c.added; + conversationId = c.conversationId; } if (c.removed > removed) { removed = c.removed; @@ -81,6 +82,9 @@ struct Contact if (c.confirmed != confirmed) { confirmed = c.confirmed or confirmed; } + if (c.isActive() and conversationId.empty() and not c.conversationId.empty()) { + conversationId = c.conversationId; + } return hasDifferentState(copy); } bool hasDifferentState(const Contact& other) const diff --git a/src/jamidht/jamiaccount.cpp b/src/jamidht/jamiaccount.cpp index 76df7d1293ba1827823024e025c043097fcb3a73..24061b8e4ceb5a095389844e39ebd3909b6c18f7 100644 --- a/src/jamidht/jamiaccount.cpp +++ b/src/jamidht/jamiaccount.cpp @@ -1175,7 +1175,7 @@ JamiAccount::loadAccount(const std::string& archive_password, }); }, [this](const std::string& conversationId) { - // Note: Do not retrigger on another thread. This as to be done + // Note: Do not retrigger on another thread. This has to be done // at the same time of acceptTrustRequest a synced state between TrustRequest // and convRequests. convModule()->acceptConversationRequest(conversationId);