Procházet zdrojové kódy

Finegrained config of XEP-0095 CSNs for MUCs as well

JC Brand před 6 roky
rodič
revize
5f0a0138a0
1 změnil soubory, kde provedl 4 přidání a 0 odebrání
  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