Use the correct 'from' jid when requesting vcards for avatars.
This commit is contained in:
parent
1cf55c14b0
commit
fd81bab906
@ -66,16 +66,19 @@ class XEP_0153(BasePlugin):
|
|||||||
return stanza
|
return stanza
|
||||||
|
|
||||||
def _reset_hash(self, jid=None):
|
def _reset_hash(self, jid=None):
|
||||||
own_jid = jid.bare == self.xmpp.boundjid.bare
|
own_jid = (jid.bare == self.xmpp.boundjid.bare)
|
||||||
if self.xmpp.is_component:
|
if self.xmpp.is_component:
|
||||||
own_jid = jid.domain = self.xmpp.boundjid.domain
|
own_jid = (jid.domain == self.xmpp.boundjid.domain)
|
||||||
|
|
||||||
if jid is not None:
|
if jid is not None:
|
||||||
jid = jid.bare
|
jid = jid.bare
|
||||||
self.api['set_hash'](jid, args=None)
|
self.api['set_hash'](jid, args=None)
|
||||||
if own_jid:
|
if own_jid:
|
||||||
self.xmpp.roster[jid].send_last_presence()
|
self.xmpp.roster[jid].send_last_presence()
|
||||||
iq = self.xmpp['xep_0054'].get_vcard(jid=jid, ifrom=jid)
|
|
||||||
|
iq = self.xmpp['xep_0054'].get_vcard(
|
||||||
|
jid=jid,
|
||||||
|
ifrom=self.xmpp.boundjid)
|
||||||
data = iq['vcard_temp']['PHOTO']['BINVAL']
|
data = iq['vcard_temp']['PHOTO']['BINVAL']
|
||||||
if not data:
|
if not data:
|
||||||
new_hash = ''
|
new_hash = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user