pass session when dispatching MSGNOTSENT

This commit is contained in:
Brendan Taylor 2008-05-19 00:17:39 +00:00
parent 4ddadc68d9
commit fad6d2ef7e
3 changed files with 5 additions and 5 deletions

View file

@ -1058,7 +1058,7 @@ class Connection(ConnectionHandlers):
if keyID == 'UNKNOWN': if keyID == 'UNKNOWN':
error = _('Neither the remote presence is signed, nor a key was assigned.') error = _('Neither the remote presence is signed, nor a key was assigned.')
elif keyID[8:] == 'MISMATCH': elif keyID[8:] == 'MISMATCH':
error = _('The contact\'s key (%s) does not match the key assigned in Gajim.' % keyID[:8]) error = _('The contact\'s key (%s) does not match the key assigned in Gajim.' % keyID[:8])
else: else:
#encrypt #encrypt
msgenc, error = self.gpg.encrypt(msg, [keyID]) msgenc, error = self.gpg.encrypt(msg, [keyID])
@ -1072,7 +1072,7 @@ class Connection(ConnectionHandlers):
else: else:
# Encryption failed, do not send message # Encryption failed, do not send message
tim = localtime() tim = localtime()
self.dispatch('MSGNOTSENT', (jid, error, msgtxt, tim)) self.dispatch('MSGNOTSENT', (jid, error, msgtxt, tim, session))
return 3 return 3
if msgtxt and not xhtml and gajim.config.get( if msgtxt and not xhtml and gajim.config.get(
'rst_formatting_outgoing_messages'): 'rst_formatting_outgoing_messages'):

View file

@ -393,7 +393,7 @@ class ConnectionZeroconf(ConnectionHandlersZeroconf):
else: else:
# Encryption failed, do not send message # Encryption failed, do not send message
tim = time.localtime() tim = time.localtime()
self.dispatch('MSGNOTSENT', (jid, error, msgtxt, tim)) self.dispatch('MSGNOTSENT', (jid, error, msgtxt, tim, session))
return 3 return 3
if type == 'chat': if type == 'chat':

View file

@ -1014,9 +1014,9 @@ class Interface:
helpers.play_sound('message_sent') helpers.play_sound('message_sent')
def handle_event_msgnotsent(self, account, array): def handle_event_msgnotsent(self, account, array):
#('MSGNOTSENT', account, (jid, ierror_msg, msg, time)) #('MSGNOTSENT', account, (jid, ierror_msg, msg, time, session))
msg = _('error while sending %s ( %s )') % (array[2], array[1]) msg = _('error while sending %s ( %s )') % (array[2], array[1])
self.roster.on_message(array[0], msg, array[3], account, array[4].roster_message(array[0], msg, array[3], account,
msg_type='error') msg_type='error')
def handle_event_subscribe(self, account, array): def handle_event_subscribe(self, account, array):