get the correct gc_control according to the account when we want to print error message in it. Fixes #2456
This commit is contained in:
parent
f34c41c93b
commit
8b494b8ff7
14
src/gajim.py
14
src/gajim.py
|
@ -619,17 +619,17 @@ class Interface:
|
|||
full_jid_with_resource = array[0]
|
||||
jids = full_jid_with_resource.split('/', 1)
|
||||
jid = jids[0]
|
||||
gcs = self.msg_win_mgr.get_controls(message_control.TYPE_GC)
|
||||
for gc_control in gcs:
|
||||
if jid == gc_control.contact.jid:
|
||||
gc_control = self.msg_win_mgr.get_control(jid, account)
|
||||
if gc_control:
|
||||
if len(jids) > 1: # it's a pm
|
||||
nick = jids[1]
|
||||
if not self.msg_win_mgr.get_control(full_jid_with_resource, account):
|
||||
if not self.msg_win_mgr.get_control(full_jid_with_resource,
|
||||
account):
|
||||
tv = gc_control.list_treeview
|
||||
model = tv.get_model()
|
||||
i = gc_control.get_contact_iter(nick)
|
||||
if i:
|
||||
show = model[i][3]
|
||||
iter = gc_control.get_contact_iter(nick)
|
||||
if iter:
|
||||
show = model[iter][3]
|
||||
else:
|
||||
show = 'offline'
|
||||
gc_c = gajim.contacts.create_gc_contact(room_jid = jid,
|
||||
|
|
Loading…
Reference in New Issue