about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ui/mucwin.c2
-rw-r--r--src/xmpp/iq.c16
2 files changed, 15 insertions, 3 deletions
diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c
index fc485b3d..b56cd994 100644
--- a/src/ui/mucwin.c
+++ b/src/ui/mucwin.c
@@ -55,7 +55,7 @@ mucwin_new(const char *const barejid)
     ProfMucWin *mucwin = (ProfMucWin *)window;
 
 #ifdef HAVE_OMEMO
-    if (omemo_automatic_start(barejid)) {
+    if (muc_anonymity_type(mucwin->roomjid) == MUC_ANONYMITY_TYPE_NONANONYMOUS && omemo_automatic_start(barejid)) {
         omemo_start_muc_sessions(barejid);
         mucwin->is_omemo = TRUE;
     }
diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c
index d6e4c153..7800ef3c 100644
--- a/src/xmpp/iq.c
+++ b/src/xmpp/iq.c
@@ -72,6 +72,10 @@
 #include "xmpp/roster.h"
 #include "xmpp/muc.h"
 
+#ifdef HAVE_OMEMO
+#include "omemo/omemo.h"
+#endif
+
 typedef struct p_room_info_data_t {
     char *room;
     gboolean display;
@@ -2100,8 +2104,16 @@ _room_info_response_id_handler(xmpp_stanza_t *const stanza, void *const userdata
 
         muc_set_features(cb_data->room, features);
         ProfMucWin *mucwin = wins_get_muc(cb_data->room);
-        if (mucwin && cb_data->display) {
-            mucwin_room_disco_info(mucwin, identities, features);
+        if (mucwin) {
+#ifdef HAVE_OMEMO
+            if (muc_anonymity_type(mucwin->roomjid) == MUC_ANONYMITY_TYPE_NONANONYMOUS && omemo_automatic_start(cb_data->room)) {
+                omemo_start_muc_sessions(cb_data->room);
+                mucwin->is_omemo = TRUE;
+            }
+#endif
+            if (cb_data->display) {
+                mucwin_room_disco_info(mucwin, identities, features);
+            }
         }
 
         g_slist_free_full(features, free);