diff --git a/src/plugins/plugin_xep_0054.py b/src/plugins/plugin_xep_0054.py index 0cab7a92..4e18d531 100755 --- a/src/plugins/plugin_xep_0054.py +++ b/src/plugins/plugin_xep_0054.py @@ -85,7 +85,7 @@ class XEP_0054(): # the current naive approach keeps a map between all jids of all profiles # in persistent cache, and check if cached jid are in roster, then put avatar # hashs in memory. - for _jid in client.roster.getBareJids(): + for _jid in client.roster.getBareJids() + [client.jid.userhost()]: if _jid in self.avatars_cache: self.host.memory.updateEntityData(jid.JID(_jid), "avatar", self.avatars_cache[_jid], client.profile) @@ -185,16 +185,16 @@ class XEP_0054(): error (_("Can't find VCard of %s") % failure.value.stanza['from']) self.host.bridge.actionResult("SUPPRESS", failure.value.stanza['id'], {}, profile) #FIXME: maybe an error message would be better - def getCard(self, target, profile_key='@DEFAULT@'): + def getCard(self, target_s, profile_key='@DEFAULT@'): """Ask server for VCard - @param target: jid from which we want the VCard + @param target_s: jid from which we want the VCard @result: id to retrieve the profile""" current_jid, xmlstream = self.host.getJidNStream(profile_key) if not xmlstream: error (_('Asking vcard for an non-existant or not connected profile')) return "" profile = self.host.memory.getProfileName(profile_key) - to_jid = jid.JID(target) + to_jid = jid.JID(target_s) debug(_("Asking for %s's VCard") % to_jid.userhost()) reg_request=IQ(xmlstream,'get') reg_request["from"]=current_jid.full()