plugin XEP-0054: fix use of full jid for room occupants
This commit is contained in:
parent
48871f96cc
commit
4f26367e7a
1 changed files with 4 additions and 3 deletions
|
|
@ -283,13 +283,14 @@ class XEP_0054(object):
|
|||
@param target(jid.JID): jid from which we want the VCard
|
||||
@result: id to retrieve the profile
|
||||
"""
|
||||
to_jid = target.userhostJID()
|
||||
target_bare = target.userhostJID()
|
||||
to_jid = target if self.isRoom(client, target_bare) else target_bare
|
||||
log.debug(_(u"Asking for %s's VCard") % to_jid.userhost())
|
||||
reg_request = client.IQ('get')
|
||||
reg_request["from"] = client.jid.full()
|
||||
reg_request["to"] = to_jid.userhost()
|
||||
reg_request["to"] = to_jid.full()
|
||||
reg_request.addElement('vCard', NS_VCARD)
|
||||
reg_request.send(to_jid.userhost()).addCallbacks(self._getCardCb, self._getCardEb, callbackArgs=[to_jid, client], errbackArgs=[to_jid, client])
|
||||
reg_request.send(to_jid.full()).addCallbacks(self._getCardCb, self._getCardEb, callbackArgs=[to_jid, client], errbackArgs=[to_jid, client])
|
||||
return reg_request["id"]
|
||||
|
||||
def getAvatarFile(self, avatar_hash):
|
||||
|
|
|
|||
Loading…
Reference in a new issue