浏览代码

Bugfix. Get JID from presence

JC Brand 7 年之前
父节点
当前提交
c621732f2f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/converse-vcard.js

+ 1 - 1
src/converse-vcard.js

@@ -129,7 +129,7 @@
             _converse.api.settings.update({'use_vcards': true});
             _converse.api.settings.update({'use_vcards': true});
 
 
             _converse.createRequestingContactFromVCard = function (presence, vcard) {
             _converse.createRequestingContactFromVCard = function (presence, vcard) {
-                const bare_jid = Strophe.getBareJidFromJid(vcard.jid);
+                const bare_jid = Strophe.getBareJidFromJid(presence.getAttribute('from'));
                 let fullname = vcard.fullname;
                 let fullname = vcard.fullname;
                 if (!fullname) {
                 if (!fullname) {
                     const nick_el = sizzle(`nick[xmlns="${Strophe.NS.NICK}"]`, presence);
                     const nick_el = sizzle(`nick[xmlns="${Strophe.NS.NICK}"]`, presence);