aboutsummaryrefslogtreecommitdiff
path: root/plugins/http-files/src/file_sender.vala
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/http-files/src/file_sender.vala')
-rw-r--r--plugins/http-files/src/file_sender.vala6
1 files changed, 5 insertions, 1 deletions
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) {