Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Leboulanger <asterix@lagaule.org>2008-08-12 12:53:09 +0400
committerYann Leboulanger <asterix@lagaule.org>2008-08-12 12:53:09 +0400
commitd2669df77b81949571b7183e5f35faba41d88447 (patch)
tree217d3cd107488af29940bf8339ea6be2091e9c6b
parentcdffa9464163ac91831121d483b9096bda6ec7ec (diff)
fix some resource problems. see #3799
-rw-r--r--src/chat_control.py6
-rwxr-xr-xsrc/gajim.py2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/chat_control.py b/src/chat_control.py
index b31ec65fb..18442920d 100644
--- a/src/chat_control.py
+++ b/src/chat_control.py
@@ -1144,6 +1144,12 @@ class ChatControl(ChatControlBase):
if not session:
session = gajim.connections[self.account]. \
find_controlless_session(self.contact.jid)
+ if session:
+ # Don't use previous session if we want to a specific resource
+ # and it's not the same
+ j, r = gajim.get_room_and_nick_from_fjid(str(session.jid))
+ if resource and resource != r:
+ session = None
if session:
session.control = self
diff --git a/src/gajim.py b/src/gajim.py
index 0b774d864..88ed34031 100755
--- a/src/gajim.py
+++ b/src/gajim.py
@@ -2670,7 +2670,7 @@ class Interface:
mw = self.msg_win_mgr.get_window(fjid, account)
if not mw:
- mw = self.msg_win_mgr.create_window(contact, account, type_)
+ mw = self.msg_win_mgr.create_window(contact, account, type_, resource)
chat_control = ChatControl(mw, contact, account, session, resource)