Gajim and gajim are not the same resource

This commit is contained in:
Yann Leboulanger 2005-11-03 12:09:38 +00:00
parent dd6a9ced49
commit ff2eaa4a55

View file

@ -184,14 +184,10 @@ class Connection:
ji, resource = gajim.get_room_and_nick_from_fjid(jid) ji, resource = gajim.get_room_and_nick_from_fjid(jid)
for rjid in gajim.contacts[self.name]: for rjid in gajim.contacts[self.name]:
if ji.lower() == rjid.lower(): # we found the jid if ji.lower() == rjid.lower(): # we found the jid
if not resource: ji = rjid
return rjid if resource:
for contact in gajim.contacts[self.name][rjid]: return ji + '/' + resource
if contact.resource.lower() == resource.lower(): return ji
# we found the resource
return rjid + '/' + contact.resource
return rjid + '/' + resource # we don't have this resource yet
return ji # We don't have the jid in our roster
def get_full_jid(self, iq_obj): def get_full_jid(self, iq_obj):
'''return the full jid (with resource) from an iq as unicode''' '''return the full jid (with resource) from an iq as unicode'''