aboutsummaryrefslogtreecommitdiff
path: root/plugins/omemo/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/omemo/src/ui')
-rw-r--r--plugins/omemo/src/ui/bad_messages_populator.vala3
-rw-r--r--plugins/omemo/src/ui/encryption_list_entry.vala5
2 files changed, 8 insertions, 0 deletions
diff --git a/plugins/omemo/src/ui/bad_messages_populator.vala b/plugins/omemo/src/ui/bad_messages_populator.vala
index b8f38434..5a881c25 100644
--- a/plugins/omemo/src/ui/bad_messages_populator.vala
+++ b/plugins/omemo/src/ui/bad_messages_populator.vala
@@ -37,6 +37,9 @@ public class BadMessagesPopulator : Plugins.ConversationItemPopulator, Plugins.C
}
private void init_state() {
+
+ if (current_conversation.type_ == Conversation.Type.GROUPCHAT_PM) return;
+
var qry = db.identity_meta.select()
.join_with(db.identity, db.identity.id, db.identity_meta.identity_id)
.with(db.identity.account_id, "=", current_conversation.account.id)
diff --git a/plugins/omemo/src/ui/encryption_list_entry.vala b/plugins/omemo/src/ui/encryption_list_entry.vala
index aaec517f..a0e6bb0f 100644
--- a/plugins/omemo/src/ui/encryption_list_entry.vala
+++ b/plugins/omemo/src/ui/encryption_list_entry.vala
@@ -1,3 +1,4 @@
+using Dino.Entities;
using Gtk;
using Qlite;
using Xmpp;
@@ -42,6 +43,10 @@ public class EncryptionListEntry : Plugins.EncryptionListEntry, Object {
}
public async void encryption_activated_async(Entities.Conversation conversation, Plugins.SetInputFieldStatus input_status_callback) {
+ if (conversation.type_ == Conversation.Type.GROUPCHAT_PM) {
+ input_status_callback(new Plugins.InputFieldStatus("Can't use encryption in a groupchat private message.", Plugins.InputFieldStatus.MessageType.ERROR, Plugins.InputFieldStatus.InputState.NO_SEND));
+ return;
+ }
MucManager muc_manager = plugin.app.stream_interactor.get_module(MucManager.IDENTITY);
Manager omemo_manager = plugin.app.stream_interactor.get_module(Manager.IDENTITY);