Browse Source

Finegrained config of XEP-0095 CSNs for MUCs as well

JC Brand 6 years ago
parent
commit
5f0a0138a0
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/headless/converse-muc.js

+ 4 - 0
src/headless/converse-muc.js

@@ -742,6 +742,10 @@ converse.plugins.add('converse-muc', {
                         this.features.get('moderated') && this.getOwnRole() === 'visitor') {
                     return;
                 }
+                const allowed = _converse.send_chat_state_notifications;
+                if (Array.isArray(allowed) && !allowed.includes(this.get('chat_state'))) {
+                    return;
+                }
                 const chat_state = this.get('chat_state');
                 if (chat_state === _converse.GONE) {
                     // <gone/> is not applicable within MUC context