Commit c9ad6104 authored by Yann Leboulanger's avatar Yann Leboulanger

awaiting_events now keep resource of sender when event_type is chat or normal

parent 396c61de
......@@ -85,10 +85,11 @@
groups = {} # list of groups
newly_added = {} # list of contacts that has just signed in
to_be_removed = {} # list of contacts that has just signed out
awaiting_events = {} # list of messages/FT reveived but not printed
# awaiting_events[jid] = (type, (data1, data2, ...))
# if type in ('chat', 'normal'): data = (message, subject, kind, time,
# encrypted)
# encrypted, resource)
# kind can be (incoming, error)
# if type in file-request, file-request-error, file-send-error, file-error,
# file-completed, file-stopped:
......
......@@ -1452,7 +1452,7 @@ def on_private_message(self, room_jid, nick, msg, tim):
if no_queue:
qs[fjid] = []
qs[fjid].append(('chat', (msg, '', 'incoming', tim, False)))
qs[fjid].append(('chat', (msg, '', 'incoming', tim, False, '')))
self.nb_unread[room_jid] += 1
autopopup = gajim.config.get('autopopup')
......
......@@ -1696,13 +1696,13 @@ def on_message(self, jid, msg, tim, account, encrypted = False,
> 3):
popup = True
if msg_type == 'normal': # it's single message
if popup:
contact = gajim.get_contact_instance_with_highest_priority(account, jid)
dialogs.SingleMessageWindow(account, contact.jid,
action = 'receive', from_whom = jid, subject = subject,
message = msg)
return
if msg_type == 'normal' and popup: # it's single message to be autopopuped
contact = gajim.get_contact_instance_with_highest_priority(account,
jid)
dialogs.SingleMessageWindow(account, contact.jid,
action = 'receive', from_whom = jid, subject = subject,
message = msg)
return
# We print if window is opened and it's not a single message
if gajim.interface.instances[account]['chats'].has_key(jid) and \
......@@ -1710,8 +1710,8 @@ def on_message(self, jid, msg, tim, account, encrypted = False,
typ = ''
if msg_type == 'error':
typ = 'status'
gajim.interface.instances[account]['chats'][jid].print_conversation(msg,
jid, typ, tim = tim, encrypted = encrypted, subject = subject)
gajim.interface.instances[account]['chats'][jid].print_conversation(
msg, jid, typ, tim = tim, encrypted = encrypted, subject = subject)
return
# We save it in a queue
......@@ -1720,7 +1720,7 @@ def on_message(self, jid, msg, tim, account, encrypted = False,
kind = 'chat'
if msg_type == 'normal':
kind = 'normal'
qs[jid].append((kind, (msg, subject, msg_type, tim, encrypted)))
qs[jid].append((kind, (msg, subject, msg_type, tim, encrypted, resource)))
self.nb_unread += 1
if popup:
if not gajim.interface.instances[account]['chats'].has_key(jid):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment