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:
-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)