소스 검색

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 년 전
부모
커밋
970ba96ce1
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  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 () {
-                this.setVCard();
+                if (['chat', 'groupchat'].includes(this.get('type'))) {
+                    this.setVCard();
+                }
                 if (this.get('type') === 'chat') {
                     this.setRosterContact(Strophe.getBareJidFromJid(this.get('from')));
                 }