typo
This commit is contained in:
parent
f4abc71fb9
commit
9a6a3c08f1
1 changed files with 3 additions and 3 deletions
|
|
@ -235,12 +235,12 @@ class XEP_0054_handler(XMPPHandler):
|
|||
"""Request for VCard's nickname
|
||||
return the cached nickname if exists, else get VCard
|
||||
"""
|
||||
to_jid = jid.JID(presence['from'])
|
||||
from_jid = jid.JID(presence['from'])
|
||||
x_elem = filter (lambda x:x.name == "x", presence.elements())[0] #We only want the "x" element
|
||||
for elem in x_elem.elements():
|
||||
if elem.name == 'photo':
|
||||
hash = str(elem)
|
||||
old_avatar = self.plugin_parent.get_cache(to_jid, 'avatar')
|
||||
old_avatar = self.plugin_parent.get_cache(from_jid, 'avatar')
|
||||
if not old_avatar or old_avatar != hash:
|
||||
debug(_('New avatar found, requesting vcard'))
|
||||
self.plugin_parent.getCard(to_jid.userhost(), self.parent.profile)
|
||||
self.plugin_parent.getCard(from_jid.userhost(), self.parent.profile)
|
||||
|
|
|
|||
Loading…
Reference in a new issue