fix chat tab finding when we get a pm

This commit is contained in:
Yann Leboulanger 2011-08-22 12:31:24 +02:00
parent f0a0929d5c
commit fc765088f7
1 changed files with 2 additions and 2 deletions

View File

@ -1096,14 +1096,14 @@ class MessageWindowMgr(gobject.GObject):
"""
fjid = jid
if resource:
jid += '/' + resource
fjid += '/' + resource
ctrl = self.get_control(fjid, account)
if ctrl:
return ctrl
win = self.get_window(jid, account)
if win:
ctrl = win.get_control(jid, account)
if not ctrl.resource:
if not ctrl.resource and ctrl.type_id != message_control.TYPE_GC:
return ctrl
return None