changeset 281:1e3e169955b2

typo
author Goffi <goffi@goffi.org>
date Thu, 03 Feb 2011 01:27:09 +0100
parents 345844caf048
children 6a0c6d8e119d
files src/plugins/plugin_xep_0054.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0054.py	Tue Feb 01 23:18:42 2011 +0100
+++ b/src/plugins/plugin_xep_0054.py	Thu Feb 03 01:27:09 2011 +0100
@@ -235,12 +235,12 @@
         """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)