瀏覽代碼

Fix. Make sure that a user appears as pending once you've added them.

JC Brand 10 年之前
父節點
當前提交
9f251f729b
共有 1 個文件被更改,包括 5 次插入4 次删除
  1. 5 4
      converse.js

+ 5 - 4
converse.js

@@ -3951,10 +3951,11 @@
                         this.addExistingContact(contact);
                     }
                 }
-                if (_.has(contact.changed, 'subscription')) {
-                    if (contact.changed.requesting == 'true') {
-                        this.addContactToGroup(contact, HEADER_REQUESTING_CONTACTS);
-                    }
+                if (_.has(contact.changed, 'ask') && contact.changed.ask == 'subscribe') {
+                    this.addContactToGroup(contact, HEADER_PENDING_CONTACTS);
+                }
+                if (_.has(contact.changed, 'subscription') && contact.changed.requesting == 'true') {
+                    this.addContactToGroup(contact, HEADER_REQUESTING_CONTACTS);
                 }
             },