Browse Source

Bugfix. Only create VCards for `chat` and `groupchat` messages

Other types of messages such as `error` don't necessarily have a JID
tied to them.
JC Brand 6 years ago
parent
commit
970ba96ce1
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/headless/converse-chatboxes.js

+ 3 - 1
src/headless/converse-chatboxes.js

@@ -87,7 +87,9 @@ converse.plugins.add('converse-chatboxes', {
             },
             },
 
 
             initialize () {
             initialize () {
-                this.setVCard();
+                if (['chat', 'groupchat'].includes(this.get('type'))) {
+                    this.setVCard();
+                }
                 if (this.get('type') === 'chat') {
                 if (this.get('type') === 'chat') {
                     this.setRosterContact(Strophe.getBareJidFromJid(this.get('from')));
                     this.setRosterContact(Strophe.getBareJidFromJid(this.get('from')));
                 }
                 }