From 970ba96ce1fec931ed855c0b39735f275709465b Mon Sep 17 00:00:00 2001 From: JC Brand Date: Tue, 11 Jun 2019 12:15:49 +0200 Subject: [PATCH] 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. --- src/headless/converse-chatboxes.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/headless/converse-chatboxes.js b/src/headless/converse-chatboxes.js index c28bd4795..238402a8a 100644 --- a/src/headless/converse-chatboxes.js +++ b/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'))); }