diff options
author | fiaxh <git@lightrise.org> | 2020-02-11 16:49:15 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2020-02-11 16:49:15 +0100 |
commit | e17c797afb59fa1b7df71b6a9e5479a254e1c32e (patch) | |
tree | ddd28b17bc067f7d115cc54312ae98ce897e8ffe /libdino/src | |
parent | fd9db13b1d6fb8f2c0a4705f19245dd2ae2cab62 (diff) | |
download | dino-e17c797afb59fa1b7df71b6a9e5479a254e1c32e.tar.gz dino-e17c797afb59fa1b7df71b6a9e5479a254e1c32e.zip |
Don't assume Jingle to be available in MUCs
Diffstat (limited to 'libdino/src')
-rw-r--r-- | libdino/src/service/jingle_file_transfers.vala | 5 |
1 files changed, 3 insertions, 2 deletions
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); |