From ff2eaa4a55579a6a8781a47739ad00a28d497981 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Thu, 3 Nov 2005 12:09:38 +0000 Subject: [PATCH] Gajim and gajim are not the same resource --- src/common/connection.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/common/connection.py b/src/common/connection.py index a88acf4b5..2e3e65079 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -184,14 +184,10 @@ class Connection: ji, resource = gajim.get_room_and_nick_from_fjid(jid) for rjid in gajim.contacts[self.name]: if ji.lower() == rjid.lower(): # we found the jid - if not resource: - return rjid - for contact in gajim.contacts[self.name][rjid]: - if contact.resource.lower() == resource.lower(): - # 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 + ji = rjid + if resource: + return ji + '/' + resource + return ji def get_full_jid(self, iq_obj): '''return the full jid (with resource) from an iq as unicode'''