diff options
| author | fiaxh <git@lightrise.org> | 2025-07-20 19:59:49 +0200 |
|---|---|---|
| committer | fiaxh <git@lightrise.org> | 2025-07-20 20:18:53 +0200 |
| commit | 87f2ce72d18f5e789f7397de42b1fb3bcc9d8650 (patch) | |
| tree | 6a84fc62f19fba59e09ef6fd1d84bace68137b65 /libdino | |
| parent | abf4456dd2397f1ed38b64a499615c652872dbee (diff) | |
Improve checking whether MUC messages will be referencable
related #1714
Diffstat (limited to 'libdino')
| -rw-r--r-- | libdino/src/service/message_processor.vala | 6 | ||||
| -rw-r--r-- | libdino/src/service/reactions.vala | 3 |
2 files changed, 3 insertions, 6 deletions
diff --git a/libdino/src/service/message_processor.vala b/libdino/src/service/message_processor.vala index e8a43b05..4cea8c76 100644 --- a/libdino/src/service/message_processor.vala +++ b/libdino/src/service/message_processor.vala @@ -164,14 +164,12 @@ public class MessageProcessor : StreamInteractionModule, Object { new_message.server_id = mam_message_flag.mam_id; } } else if (message.type_ == Xmpp.MessageStanza.TYPE_GROUPCHAT) { - bool server_supports_sid = (yield entity_info.has_feature(account, new_message.counterpart.bare_jid, Xep.UniqueStableStanzaIDs.NS_URI)) || - (yield entity_info.has_feature(account, new_message.counterpart.bare_jid, Xmpp.MessageArchiveManagement.NS_URI)); + bool server_supports_sid = yield entity_info.has_feature(account, new_message.counterpart.bare_jid, Xep.UniqueStableStanzaIDs.NS_URI); if (server_supports_sid) { new_message.server_id = Xep.UniqueStableStanzaIDs.get_stanza_id(message, new_message.counterpart.bare_jid); } } else if (message.type_ == Xmpp.MessageStanza.TYPE_CHAT) { - bool server_supports_sid = (yield entity_info.has_feature(account, account.bare_jid, Xep.UniqueStableStanzaIDs.NS_URI)) || - (yield entity_info.has_feature(account, account.bare_jid, Xmpp.MessageArchiveManagement.NS_URI)); + bool server_supports_sid = yield entity_info.has_feature(account, account.bare_jid, Xep.UniqueStableStanzaIDs.NS_URI); if (server_supports_sid) { new_message.server_id = Xep.UniqueStableStanzaIDs.get_stanza_id(message, account.bare_jid); } diff --git a/libdino/src/service/reactions.vala b/libdino/src/service/reactions.vala index 9277a00f..91651db7 100644 --- a/libdino/src/service/reactions.vala +++ b/libdino/src/service/reactions.vala @@ -63,8 +63,7 @@ public class Dino.Reactions : StreamInteractionModule, Object { } else { // The MUC server needs to 1) support stable stanza ids 2) either support occupant ids or be a private room (where we know real jids) var entity_info = stream_interactor.get_module(EntityInfo.IDENTITY); - bool server_supports_sid = (entity_info.has_feature_cached(conversation.account, conversation.counterpart.bare_jid, Xep.UniqueStableStanzaIDs.NS_URI)) || - (entity_info.has_feature_cached(conversation.account, conversation.counterpart.bare_jid, Xmpp.MessageArchiveManagement.NS_URI)); + bool server_supports_sid = entity_info.has_feature_cached(conversation.account, conversation.counterpart.bare_jid, Xep.UniqueStableStanzaIDs.NS_URI); if (!server_supports_sid) return false; bool? supports_occupant_ids = entity_info.has_feature_cached(conversation.account, conversation.counterpart, Xep.OccupantIds.NS_URI); |
