we need to have messages in a queue before we do new_chat() in order not to have message printed twice
This commit is contained in:
parent
2b42ff7572
commit
25f03759cd
12
src/gajim.py
12
src/gajim.py
|
@ -342,14 +342,20 @@ class Interface:
|
|||
if self.windows[account]['gc'].has_key(jid): # it's a Private Message
|
||||
nick = array[0].split('/', 1)[1]
|
||||
fjid = jid + '/' + nick
|
||||
if not self.windows[account]['chats'].has_key(fjid):
|
||||
if self.windows[account]['chats'].has_key(fjid):
|
||||
chat_win = self.windows[account]['chats'][fjid]
|
||||
chat_win.print_conversation(array[1], fjid, tim = array[2])
|
||||
return
|
||||
qs = self.queues[account]
|
||||
if not qs.has_key(fjid):
|
||||
qs[fjid] = []
|
||||
qs[fjid].append((array[1], array[2], array[3]))
|
||||
self.roster.nb_unread += 1
|
||||
gc = self.windows[account]['gc'][jid]
|
||||
show = gc.contacts[jid][nick].show
|
||||
u = Contact(jid = fjid, name = nick, groups = ['none'], show = show,
|
||||
ask = 'none')
|
||||
self.roster.new_chat(u, account)
|
||||
chat_win = self.windows[account]['chats'][fjid]
|
||||
chat_win.print_conversation(array[1], fjid, tim = array[2])
|
||||
return
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue