From 87f2ce72d18f5e789f7397de42b1fb3bcc9d8650 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Sun, 20 Jul 2025 19:59:49 +0200 Subject: Improve checking whether MUC messages will be referencable related #1714 --- plugins/http-files/src/file_sender.vala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/http-files/src/file_sender.vala b/plugins/http-files/src/file_sender.vala index 02336b43..cce4ac8e 100644 --- a/plugins/http-files/src/file_sender.vala +++ b/plugins/http-files/src/file_sender.vala @@ -43,7 +43,11 @@ public class HttpFileSender : FileSender, Object { HttpFileSendData? send_data = file_send_data as HttpFileSendData; if (send_data == null) return; - bool can_reference_element = !conversation.type_.is_muc_semantic() || stream_interactor.get_module(EntityInfo.IDENTITY).has_feature_cached(conversation.account, conversation.counterpart, Xep.UniqueStableStanzaIDs.NS_URI); + bool can_reference_element = conversation.type_ == Conversation.Type.CHAT || ( + // The stable stanza ID XEP is not clear about an announcing MUC having to attach stanza-ids, thus we also check for MAM, which requires this. + stream_interactor.get_module(EntityInfo.IDENTITY).has_feature_cached(conversation.account, conversation.counterpart, Xep.UniqueStableStanzaIDs.NS_URI) && + stream_interactor.get_module(EntityInfo.IDENTITY).has_feature_cached(conversation.account, conversation.counterpart, Xmpp.MessageArchiveManagement.NS_URI) + ); // Share unencrypted files via SFS (only if we'll be able to reference messages) if (conversation.encryption == Encryption.NONE && can_reference_element) { -- cgit v1.3