java-topology/defects/jami-daemon/patch/0002.patch

23 lines
1.4 KiB
Diff

# UNDF: UNDF-2026-000000116
--- a/src/jamidht/conversation_module.cpp
+++ b/src/jamidht/conversation_module.cpp
@@ -2338,8 +2338,7 @@ ConversationModule::syncConversations(const std::string& peer, const std::string
} else if (!conv->info.isRemoved()
- && std::find(conv->info.members.begin(), conv->info.members.end(), peer)
- != conv->info.members.end()) {
+ && conv->info.members.count(peer) > 0) {
// In this case the conversation was never cloned (can be after an import)
toClone.emplace(conv->info.id);
}
@@ -2498,8 +2498,7 @@ ConversationModule::needsSyncingWith(const std::string& memberUri) const
} else if (!ci->info.removed
- && std::find(ci->info.members.begin(), ci->info.members.end(), memberUri) != ci->info.members.end()) {
+ && ci->info.members.count(memberUri) > 0) {
// In this case the conversation was never cloned (can be after an import)
return true;
}
@@ -2794,8 +2794,7 @@ ConversationModule::removeContact(...)
auto removeConvInfo = [&](const auto& conv, const auto& members) {
if ((isSelf && members.size() == 1)
- || (!isSelf && std::find(members.begin(), members.end(), uri) != members.end())) {
+ || (!isSelf && members.count(uri) > 0)) {