From 099d0d61e8b00e93bc173ae63415b71c57158b6a Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Thu, 15 Aug 2013 10:00:42 +0200
Subject: [PATCH] prevent bug when forming a jid. Fixes #7428

---
 src/common/stanza_session.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/common/stanza_session.py b/src/common/stanza_session.py
index 4407f4ed47..722e7e01ed 100644
--- a/src/common/stanza_session.py
+++ b/src/common/stanza_session.py
@@ -83,9 +83,7 @@ class StanzaSession(object):
 
     def get_to(self):
         to = str(self.jid)
-        if self.resource and not to.endswith(self.resource):
-            to += '/' + self.resource
-        return to
+        return gajim.get_jid_without_resource(to) + self.resource
 
     def remove_events(self, types):
         """
-- 
GitLab