fix some resource problems. see #3799

This commit is contained in:
Yann Leboulanger 2008-08-12 08:53:09 +00:00
parent cdffa94641
commit d2669df77b
2 changed files with 7 additions and 1 deletions

View File

@ -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

View File

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