read_queue now look in awaiting_messages dict with fjid as key instead of jid. Fix #1706
This commit is contained in:
parent
e1ff481a84
commit
df38aa897c
|
@ -1401,7 +1401,10 @@ class ChatControl(ChatControlBase):
|
|||
def read_queue(self):
|
||||
'''read queue and print messages containted in it'''
|
||||
jid = self.contact.jid
|
||||
l = gajim.awaiting_events[self.account][jid]
|
||||
fjid = jid
|
||||
if self.resource:
|
||||
fjid += '/' + self.resource
|
||||
l = gajim.awaiting_events[self.account][fjid]
|
||||
|
||||
# Is it a pm ?
|
||||
is_pm = False
|
||||
|
@ -1436,9 +1439,9 @@ class ChatControl(ChatControlBase):
|
|||
gajim.interface.roster.show_title()
|
||||
# Keep only non-messages events
|
||||
if len(events_to_keep):
|
||||
gajim.awaiting_events[self.account][jid] = events_to_keep
|
||||
gajim.awaiting_events[self.account][fjid] = events_to_keep
|
||||
else:
|
||||
del gajim.awaiting_events[self.account][jid]
|
||||
del gajim.awaiting_events[self.account][fjid]
|
||||
typ = 'chat' # Is it a normal chat or a pm ?
|
||||
# reset to status image in gc if it is a pm
|
||||
if is_pm:
|
||||
|
|
|
@ -1925,7 +1925,7 @@ _('If "%s" accepts this request you will know his or her status.') % jid)
|
|||
|
||||
mw.new_tab(chat_control)
|
||||
|
||||
if gajim.awaiting_events[account].has_key(contact.jid):
|
||||
if gajim.awaiting_events[account].has_key(fjid):
|
||||
# We call this here to avoid race conditions with widget validation
|
||||
chat_control.read_queue()
|
||||
|
||||
|
|
Loading…
Reference in New Issue