errors from groupchats are catched and printed in groupchat windows

This commit is contained in:
Yann Leboulanger 2005-04-18 22:45:13 +00:00
parent 6b0e7d0908
commit 5a910155c8
1 changed files with 4 additions and 0 deletions

View File

@ -277,6 +277,10 @@ class Interface:
def handle_event_msgerror(self, account, array): def handle_event_msgerror(self, account, array):
#('MSGERROR', account, (user, error_code, error_msg, msg, time)) #('MSGERROR', account, (user, error_code, error_msg, msg, time))
jid = array[0].split('/')[0] jid = array[0].split('/')[0]
if jid in self.windows[account]['gc']:
self.windows[account]['gc'][jid].print_conversation('Error %s: %s' % \
(array[1], array[2]), jid, tim = array[4])
return
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') + \