From 8f0fe374023e937f6f3d17412d7f9f110791deac Mon Sep 17 00:00:00 2001 From: fiaxh Date: Wed, 13 Nov 2019 16:41:42 +0100 Subject: [PATCH] Don't attempt jingle file transfers in MUCs --- libdino/src/service/chat_interaction.vala | 2 ++ libdino/src/service/jingle_file_transfers.vala | 3 +++ 2 files changed, 5 insertions(+) diff --git a/libdino/src/service/chat_interaction.vala b/libdino/src/service/chat_interaction.vala index 44a78b3e..f4aaa02e 100644 --- a/libdino/src/service/chat_interaction.vala +++ b/libdino/src/service/chat_interaction.vala @@ -196,6 +196,8 @@ public class ChatInteraction : StreamInteractionModule, Object { XmppStream? stream = stream_interactor.get_stream(conversation.account); if (stream == null) return; + if (message.stanza_id != null) return; // Need a stanza id to mark + switch (marker) { case Xep.ChatMarkers.MARKER_RECEIVED: if (stanza != null && Xep.ChatMarkers.Module.requests_marking(stanza)) { diff --git a/libdino/src/service/jingle_file_transfers.vala b/libdino/src/service/jingle_file_transfers.vala index 182213bb..16165548 100644 --- a/libdino/src/service/jingle_file_transfers.vala +++ b/libdino/src/service/jingle_file_transfers.vala @@ -163,6 +163,9 @@ public class JingleFileSender : FileSender, Object { } public bool can_send(Conversation conversation, FileTransfer file_transfer) { + + if (conversation.type_ == Conversation.Type.GROUPCHAT) return false; + // No file specific restrictions apply to Jingle file transfers return is_upload_available(conversation); }