diff --git a/src/jamidht/jamiaccount.cpp b/src/jamidht/jamiaccount.cpp index 99e08a4175ec071377a314ee5f5db34e6b216636..c23bd4fe4f1f14ffff0247dae7c53aac593ce9c0 100644 --- a/src/jamidht/jamiaccount.cpp +++ b/src/jamidht/jamiaccount.cpp @@ -1589,6 +1589,10 @@ JamiAccount::trackPresence(const dht::InfoHash& h, BuddyInfo& buddy) ++buddy->second.devices_cnt; isConnected = buddy->second.devices_cnt > 0; } + if (not expired) { + // Retry messages every time a new device announce its presence + messageEngine_.onPeerOnline(h.toString()); + } if (isConnected and not wasConnected) { onTrackedBuddyOnline(h); } else if (not isConnected and wasConnected) { @@ -1615,7 +1619,6 @@ JamiAccount::onTrackedBuddyOnline(const dht::InfoHash& contactId) JAMI_DBG("Buddy %s online", contactId.toString().c_str()); std::string id(contactId.toString()); emitSignal<DRing::PresenceSignal::NewBuddyNotification>(getAccountID(), id, 1, ""); - messageEngine_.onPeerOnline(id); } void