소스 검색

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.createRequestingContactFromVCard = function (presence, vcard) {
-                const bare_jid = Strophe.getBareJidFromJid(vcard.jid);
+                const bare_jid = Strophe.getBareJidFromJid(presence.getAttribute('from'));
                 let fullname = vcard.fullname;
                 if (!fullname) {
                     const nick_el = sizzle(`nick[xmlns="${Strophe.NS.NICK}"]`, presence);