Browse Source

For a message, get VCard based on bare jid of sender

JC Brand 6 years ago
parent
commit
d450ab5868
3 changed files with 3 additions and 3 deletions
  1. 1 1
      dist/converse.js
  2. 1 1
      src/headless/converse-chatboxes.js
  3. 1 1
      src/headless/dist/converse-headless.js

+ 1 - 1
dist/converse.js

@@ -61840,7 +61840,7 @@ _converse_core__WEBPACK_IMPORTED_MODULE_2__["default"].plugins.add('converse-cha
         } else if (this.get('type') === 'groupchat') {
           this.vcard = this.getVCardForChatroomOccupant();
         } else {
-          const jid = this.get('from');
+          const jid = Strophe.getBareJidFromJid(this.get('from'));
           this.vcard = _converse.vcards.findWhere({
             'jid': jid
           }) || _converse.vcards.create({

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

@@ -107,7 +107,7 @@ converse.plugins.add('converse-chatboxes', {
                 } else if (this.get('type') === 'groupchat') {
                     this.vcard = this.getVCardForChatroomOccupant();
                 } else {
-                    const jid = this.get('from');
+                    const jid = Strophe.getBareJidFromJid(this.get('from'));
                     this.vcard = _converse.vcards.findWhere({'jid': jid}) || _converse.vcards.create({'jid': jid});
                 }
             },

+ 1 - 1
src/headless/dist/converse-headless.js

@@ -40284,7 +40284,7 @@ _converse_core__WEBPACK_IMPORTED_MODULE_2__["default"].plugins.add('converse-cha
         } else if (this.get('type') === 'groupchat') {
           this.vcard = this.getVCardForChatroomOccupant();
         } else {
-          const jid = this.get('from');
+          const jid = Strophe.getBareJidFromJid(this.get('from'));
           this.vcard = _converse.vcards.findWhere({
             'jid': jid
           }) || _converse.vcards.create({