瀏覽代碼

Finegrained config of XEP-0095 CSNs for MUCs as well

JC Brand 6 年之前
父節點
當前提交
5f0a0138a0
共有 1 個文件被更改,包括 4 次插入0 次删除
  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