summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0153/vcard_avatar.py
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp/plugins/xep_0153/vcard_avatar.py')
-rw-r--r--sleekxmpp/plugins/xep_0153/vcard_avatar.py9
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 = ''