From e17c797afb59fa1b7df71b6a9e5479a254e1c32e Mon Sep 17 00:00:00 2001 From: fiaxh Date: Tue, 11 Feb 2020 16:49:15 +0100 Subject: Don't assume Jingle to be available in MUCs --- libdino/src/service/jingle_file_transfers.vala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libdino/src/service') diff --git a/libdino/src/service/jingle_file_transfers.vala b/libdino/src/service/jingle_file_transfers.vala index 16165548..3a5fa95e 100644 --- a/libdino/src/service/jingle_file_transfers.vala +++ b/libdino/src/service/jingle_file_transfers.vala @@ -144,6 +144,8 @@ public class JingleFileSender : FileSender, Object { } public bool is_upload_available(Conversation conversation) { + if (conversation.type_ != Conversation.Type.CHAT) return false; + JingleFileEncryptionHelper? helper = JingleFileHelperRegistry.instance.get_encryption_helper(conversation.encryption); if (helper == null) return false; if (!helper.can_transfer(conversation)) return false; @@ -163,8 +165,7 @@ public class JingleFileSender : FileSender, Object { } public bool can_send(Conversation conversation, FileTransfer file_transfer) { - - if (conversation.type_ == Conversation.Type.GROUPCHAT) return false; + if (conversation.type_ != Conversation.Type.CHAT) return false; // No file specific restrictions apply to Jingle file transfers return is_upload_available(conversation); -- cgit v1.2.3-70-g09d2