about summary refs log tree commit diff stats
path: root/src/xmpp
diff options
context:
space:
mode:
authorDebXWoody <stefan@debxwoody.de>2020-04-17 19:53:34 +0200
committerDebXWoody <stefan@debxwoody.de>2020-04-17 19:53:34 +0200
commit6268f5f0d7d611614f3ffe75605b6d4618a4d247 (patch)
tree737e880c4b69bc3ca82026c588f836ea297dbd65 /src/xmpp
parenta1d37dda1856eeff060ede7653fb6dae1affd605 (diff)
downloadprofani-tty-6268f5f0d7d611614f3ffe75605b6d4618a4d247.tar.gz
OMEMO Device List only for non anonymous MUCs
Profanity request the OMEMO Device List for all members, also if the MUC is
anonymouse. If the user is Admin / Owner, the device list will be requtest.

Issue #1315
Diffstat (limited to 'src/xmpp')
-rw-r--r--src/xmpp/muc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/xmpp/muc.c b/src/xmpp/muc.c
index 1cc48b31..172bdb80 100644
--- a/src/xmpp/muc.c
+++ b/src/xmpp/muc.c
@@ -885,11 +885,13 @@ muc_members_add(const char *const room, const char *const jid)
     if (chat_room) {
         if (g_hash_table_insert(chat_room->members, strdup(jid), NULL)) {
 #ifdef HAVE_OMEMO
-            Jid *our_jid = jid_create(connection_get_fulljid());
-            if (strcmp(jid, our_jid->barejid) != 0) {
-                omemo_start_session(jid);
+            if(chat_room->anonymity_type == MUC_ANONYMITY_TYPE_NONANONYMOUS ) {
+                Jid *our_jid = jid_create(connection_get_fulljid());
+                if (strcmp(jid, our_jid->barejid) != 0) {
+                    omemo_start_session(jid);
+                }
+                jid_destroy(our_jid);
             }
-            jid_destroy(our_jid);
 #endif
         }
     }