awaiting_events now keep resource of sender when event_type is chat or normal
This commit is contained in:
parent
396c61de14
commit
c9ad61044d
3 changed files with 13 additions and 12 deletions
|
@ -85,10 +85,11 @@ gc_passwords = {} # list of the pass required to enter a room {room_jid: passwor
|
||||||
groups = {} # list of groups
|
groups = {} # list of groups
|
||||||
newly_added = {} # list of contacts that has just signed in
|
newly_added = {} # list of contacts that has just signed in
|
||||||
to_be_removed = {} # list of contacts that has just signed out
|
to_be_removed = {} # list of contacts that has just signed out
|
||||||
|
|
||||||
awaiting_events = {} # list of messages/FT reveived but not printed
|
awaiting_events = {} # list of messages/FT reveived but not printed
|
||||||
# awaiting_events[jid] = (type, (data1, data2, ...))
|
# awaiting_events[jid] = (type, (data1, data2, ...))
|
||||||
# if type in ('chat', 'normal'): data = (message, subject, kind, time,
|
# if type in ('chat', 'normal'): data = (message, subject, kind, time,
|
||||||
# encrypted)
|
# encrypted, resource)
|
||||||
# kind can be (incoming, error)
|
# kind can be (incoming, error)
|
||||||
# if type in file-request, file-request-error, file-send-error, file-error,
|
# if type in file-request, file-request-error, file-send-error, file-error,
|
||||||
# file-completed, file-stopped:
|
# file-completed, file-stopped:
|
||||||
|
|
|
@ -1452,7 +1452,7 @@ current room topic.') % command, room_jid)
|
||||||
|
|
||||||
if no_queue:
|
if no_queue:
|
||||||
qs[fjid] = []
|
qs[fjid] = []
|
||||||
qs[fjid].append(('chat', (msg, '', 'incoming', tim, False)))
|
qs[fjid].append(('chat', (msg, '', 'incoming', tim, False, '')))
|
||||||
self.nb_unread[room_jid] += 1
|
self.nb_unread[room_jid] += 1
|
||||||
|
|
||||||
autopopup = gajim.config.get('autopopup')
|
autopopup = gajim.config.get('autopopup')
|
||||||
|
|
|
@ -1696,13 +1696,13 @@ _('If "%s" accepts this request you will know his or her status.') %jid)
|
||||||
> 3):
|
> 3):
|
||||||
popup = True
|
popup = True
|
||||||
|
|
||||||
if msg_type == 'normal': # it's single message
|
if msg_type == 'normal' and popup: # it's single message to be autopopuped
|
||||||
if popup:
|
contact = gajim.get_contact_instance_with_highest_priority(account,
|
||||||
contact = gajim.get_contact_instance_with_highest_priority(account, jid)
|
jid)
|
||||||
dialogs.SingleMessageWindow(account, contact.jid,
|
dialogs.SingleMessageWindow(account, contact.jid,
|
||||||
action = 'receive', from_whom = jid, subject = subject,
|
action = 'receive', from_whom = jid, subject = subject,
|
||||||
message = msg)
|
message = msg)
|
||||||
return
|
return
|
||||||
|
|
||||||
# We print if window is opened and it's not a single message
|
# We print if window is opened and it's not a single message
|
||||||
if gajim.interface.instances[account]['chats'].has_key(jid) and \
|
if gajim.interface.instances[account]['chats'].has_key(jid) and \
|
||||||
|
@ -1710,8 +1710,8 @@ _('If "%s" accepts this request you will know his or her status.') %jid)
|
||||||
typ = ''
|
typ = ''
|
||||||
if msg_type == 'error':
|
if msg_type == 'error':
|
||||||
typ = 'status'
|
typ = 'status'
|
||||||
gajim.interface.instances[account]['chats'][jid].print_conversation(msg,
|
gajim.interface.instances[account]['chats'][jid].print_conversation(
|
||||||
jid, typ, tim = tim, encrypted = encrypted, subject = subject)
|
msg, jid, typ, tim = tim, encrypted = encrypted, subject = subject)
|
||||||
return
|
return
|
||||||
|
|
||||||
# We save it in a queue
|
# 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'
|
kind = 'chat'
|
||||||
if msg_type == 'normal':
|
if msg_type == 'normal':
|
||||||
kind = '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
|
self.nb_unread += 1
|
||||||
if popup:
|
if popup:
|
||||||
if not gajim.interface.instances[account]['chats'].has_key(jid):
|
if not gajim.interface.instances[account]['chats'].has_key(jid):
|
||||||
|
|
Loading…
Add table
Reference in a new issue