aboutsummaryrefslogtreecommitdiff
path: root/plugins/omemo/src/logic/manager.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2020-06-17 14:30:46 +0200
committerfiaxh <git@lightrise.org>2020-06-23 15:54:12 +0200
commit886a519d8543cba45792a08210093c851f20a2a0 (patch)
tree639180b362b79518e0ea0523c39ae7fe36877cd6 /plugins/omemo/src/logic/manager.vala
parent6d41071da1f01678b9ab449ed7f00391067da43a (diff)
downloaddino-886a519d8543cba45792a08210093c851f20a2a0.tar.gz
dino-886a519d8543cba45792a08210093c851f20a2a0.zip
Don't offer encryption in MUC PMs
Diffstat (limited to 'plugins/omemo/src/logic/manager.vala')
-rw-r--r--plugins/omemo/src/logic/manager.vala4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/omemo/src/logic/manager.vala b/plugins/omemo/src/logic/manager.vala
index e561bd90..64b117c7 100644
--- a/plugins/omemo/src/logic/manager.vala
+++ b/plugins/omemo/src/logic/manager.vala
@@ -95,6 +95,10 @@ public class Manager : StreamInteractionModule, Object {
private void on_pre_message_send(Entities.Message message, Xmpp.MessageStanza message_stanza, Conversation conversation) {
if (message.encryption == Encryption.OMEMO) {
+ if (message.type_ == Message.Type.GROUPCHAT_PM) {
+ message.marked = Message.Marked.WONTSEND;
+ return;
+ }
XmppStream? stream = stream_interactor.get_stream(conversation.account);
if (stream == null) {
message.marked = Entities.Message.Marked.UNSENT;