Skip to content
Snippets Groups Projects
Commit 4000d4e0 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

contacts: allow converting existing contact to swarm

Change-Id: Id4c741ebfa9a7c731ad32db0267a66b755896166
parent fd6da193
Branches
No related tags found
No related merge requests found
......@@ -78,7 +78,7 @@ ContactList::addContact(const dht::InfoHash& h, bool confirmed, const std::strin
auto c = contacts_.find(h);
if (c == contacts_.end())
c = contacts_.emplace(h, Contact {}).first;
else if (c->second.isActive() and c->second.confirmed == confirmed)
else if (c->second.isActive() and c->second.confirmed == confirmed && c->second.conversationId == conversationId)
return false;
c->second.added = std::time(nullptr);
// NOTE: because we can re-add a contact after removing it
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment