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.
This commit is contained in:
JC Brand 2019-06-11 12:15:49 +02:00
parent a0f0240b92
commit 970ba96ce1

View File

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