diff options
author | Lance Stout <lancestout@gmail.com> | 2012-04-29 13:33:53 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2012-04-29 13:33:53 -0700 |
commit | fd81bab906a44393cad7e5ee66d2c2207859d404 (patch) | |
tree | fcd59b8a1b3bafdb0794f312f572b82c9aabaaff /sleekxmpp/plugins/xep_0153/vcard_avatar.py | |
parent | 1cf55c14b0498843314f471c200b7c0d8515ec96 (diff) | |
download | slixmpp-fd81bab906a44393cad7e5ee66d2c2207859d404.tar.gz slixmpp-fd81bab906a44393cad7e5ee66d2c2207859d404.tar.bz2 slixmpp-fd81bab906a44393cad7e5ee66d2c2207859d404.tar.xz slixmpp-fd81bab906a44393cad7e5ee66d2c2207859d404.zip |
Use the correct 'from' jid when requesting vcards for avatars.
Diffstat (limited to 'sleekxmpp/plugins/xep_0153/vcard_avatar.py')
-rw-r--r-- | sleekxmpp/plugins/xep_0153/vcard_avatar.py | 9 |
1 files 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 = '' |