From fd81bab906a44393cad7e5ee66d2c2207859d404 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Sun, 29 Apr 2012 13:33:53 -0700 Subject: Use the correct 'from' jid when requesting vcards for avatars. --- sleekxmpp/plugins/xep_0153/vcard_avatar.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sleekxmpp/plugins/xep_0153/vcard_avatar.py b/sleekxmpp/plugins/xep_0153/vcard_avatar.py index e8d9ea6a..2cc2f15a 100644 --- a/sleekxmpp/plugins/xep_0153/vcard_avatar.py +++ b/sleekxmpp/plugins/xep_0153/vcard_avatar.py @@ -66,16 +66,19 @@ class XEP_0153(BasePlugin): return stanza 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: - own_jid = jid.domain = self.xmpp.boundjid.domain + own_jid = (jid.domain == self.xmpp.boundjid.domain) if jid is not None: jid = jid.bare self.api['set_hash'](jid, args=None) if own_jid: 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'] if not data: new_hash = '' -- cgit v1.2.3