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
22
src/gajim.py
22
src/gajim.py
|
@ -342,14 +342,20 @@ class Interface:
|
||||||
if self.windows[account]['gc'].has_key(jid): # it's a Private Message
|
if self.windows[account]['gc'].has_key(jid): # it's a Private Message
|
||||||
nick = array[0].split('/', 1)[1]
|
nick = array[0].split('/', 1)[1]
|
||||||
fjid = jid + '/' + nick
|
fjid = jid + '/' + nick
|
||||||
if not self.windows[account]['chats'].has_key(fjid):
|
if self.windows[account]['chats'].has_key(fjid):
|
||||||
gc = self.windows[account]['gc'][jid]
|
chat_win = self.windows[account]['chats'][fjid]
|
||||||
show = gc.contacts[jid][nick].show
|
chat_win.print_conversation(array[1], fjid, tim = array[2])
|
||||||
u = Contact(jid = fjid, name = nick, groups = ['none'], show = show,
|
return
|
||||||
ask = 'none')
|
qs = self.queues[account]
|
||||||
self.roster.new_chat(u, account)
|
if not qs.has_key(fjid):
|
||||||
chat_win = self.windows[account]['chats'][fjid]
|
qs[fjid] = []
|
||||||
chat_win.print_conversation(array[1], fjid, tim = array[2])
|
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)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue