error messages are nowprinted as if they come from server
This commit is contained in:
parent
4d4434c951
commit
973631a2c9
|
@ -474,7 +474,8 @@ class Interface:
|
||||||
if jid.find('@') <= 0:
|
if jid.find('@') <= 0:
|
||||||
jid = jid.replace('@', '')
|
jid = jid.replace('@', '')
|
||||||
self.roster.on_message(jid, _('error while sending') + \
|
self.roster.on_message(jid, _('error while sending') + \
|
||||||
' \"%s\" ( %s )' % (array[3], array[2]), array[4], account)
|
' \"%s\" ( %s )' % (array[3], array[2]), array[4], account, \
|
||||||
|
msg_type='error')
|
||||||
|
|
||||||
def handle_event_msgsent(self, account, array):
|
def handle_event_msgsent(self, account, array):
|
||||||
#('MSGSENT', account, (jid, msg, keyID))
|
#('MSGSENT', account, (jid, msg, keyID))
|
||||||
|
|
|
@ -1498,14 +1498,17 @@ _('If "%s" accepts this request you will know his status.') %jid)
|
||||||
if qs.has_key(jid):
|
if qs.has_key(jid):
|
||||||
no_queue = False
|
no_queue = False
|
||||||
if self.plugin.windows[account]['chats'].has_key(jid):
|
if self.plugin.windows[account]['chats'].has_key(jid):
|
||||||
|
typ = ''
|
||||||
|
if msg_type == 'error':
|
||||||
|
typ = 'status'
|
||||||
self.plugin.windows[account]['chats'][jid].print_conversation(msg,
|
self.plugin.windows[account]['chats'][jid].print_conversation(msg,
|
||||||
jid, tim = tim, encrypted = encrypted, subject = subject)
|
jid, typ, tim = tim, encrypted = encrypted, subject = subject)
|
||||||
return
|
return
|
||||||
|
|
||||||
#We save it in a queue
|
#We save it in a queue
|
||||||
if no_queue:
|
if no_queue:
|
||||||
qs[jid] = []
|
qs[jid] = []
|
||||||
qs[jid].append((msg, tim, encrypted))
|
qs[jid].append((msg, msg_type, tim, encrypted))
|
||||||
self.nb_unread += 1
|
self.nb_unread += 1
|
||||||
if (not autopopup or ( not autopopupaway and \
|
if (not autopopup or ( not autopopupaway and \
|
||||||
gajim.connections[account].connected > 2)) and not \
|
gajim.connections[account].connected > 2)) and not \
|
||||||
|
|
|
@ -700,8 +700,13 @@ timestamp, contact):
|
||||||
l = gajim.awaiting_messages[self.account][jid]
|
l = gajim.awaiting_messages[self.account][jid]
|
||||||
user = self.contacts[jid]
|
user = self.contacts[jid]
|
||||||
for event in l:
|
for event in l:
|
||||||
self.print_conversation(event[0], jid, tim = event[1],
|
ev1 = event[1]
|
||||||
encrypted = event[2], contact='print_queue')
|
if ev1 != 'error':
|
||||||
|
ev1 = 'print_queue'
|
||||||
|
else:
|
||||||
|
ev1 = 'status'
|
||||||
|
self.print_conversation(event[0], jid, ev1,
|
||||||
|
tim = event[2], encrypted = event[3])
|
||||||
self.plugin.roster.nb_unread -= 1
|
self.plugin.roster.nb_unread -= 1
|
||||||
self.plugin.roster.show_title()
|
self.plugin.roster.show_title()
|
||||||
del gajim.awaiting_messages[self.account][jid]
|
del gajim.awaiting_messages[self.account][jid]
|
||||||
|
|
Loading…
Reference in New Issue