Skip to content
Snippets Groups Projects
Commit f1661d58 authored by François-Simon Fauteux-Chapleau's avatar François-Simon Fauteux-Chapleau
Browse files

conversation_module: only ask for invite if needed

GitLab: #1081
Change-Id: I3ac3468e8ff5b41250a76ab7f40b6ca0e7331f09
parent cc574c8f
Branches
No related tags found
No related merge requests found
...@@ -582,6 +582,10 @@ ConversationModule::Impl::fetchNewCommits(const std::string& peer, ...@@ -582,6 +582,10 @@ ConversationModule::Impl::fetchNewCommits(const std::string& peer,
auto conv = getConversation(conversationId); auto conv = getConversation(conversationId);
if (!conv) { if (!conv) {
if (oldReq == std::nullopt) {
// We didn't find a conversation or a request with the given ID.
// This suggests that someone tried to send us an invitation but
// that we didn't receive it, so we ask for a new one.
JAMI_WARNING("[Account {}] Unable to find conversation {}, ask for an invite", JAMI_WARNING("[Account {}] Unable to find conversation {}, ask for an invite",
accountId_, accountId_,
conversationId); conversationId);
...@@ -589,6 +593,7 @@ ConversationModule::Impl::fetchNewCommits(const std::string& peer, ...@@ -589,6 +593,7 @@ ConversationModule::Impl::fetchNewCommits(const std::string& peer,
{}, {},
std::map<std::string, std::string> {{MIME_TYPE_INVITE, conversationId}}, std::map<std::string, std::string> {{MIME_TYPE_INVITE, conversationId}},
0); 0);
}
return; return;
} }
std::unique_lock lk(conv->mtx); std::unique_lock lk(conv->mtx);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment