awaiting_events now keep resource of sender when event_type is chat or normal
This commit is contained in:
parent
396c61de14
commit
c9ad61044d
|
@ -85,10 +85,11 @@ gc_passwords = {} # list of the pass required to enter a room {room_jid: passwor
|
|||
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 @@ current room topic.') % command, room_jid)
|
|||
|
||||
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,9 +1696,9 @@ _('If "%s" accepts this request you will know his or her status.') %jid)
|
|||
> 3):
|
||||
popup = True
|
||||
|
||||
if msg_type == 'normal': # it's single message
|
||||
if popup:
|
||||
contact = gajim.get_contact_instance_with_highest_priority(account, jid)
|
||||
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)
|
||||
|
@ -1710,8 +1710,8 @@ _('If "%s" accepts this request you will know his or her status.') %jid)
|
|||
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 @@ _('If "%s" accepts this request you will know his or her status.') %jid)
|
|||
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):
|
||||
|
|
Loading…
Reference in New Issue