pass session when dispatching MSGNOTSENT
This commit is contained in:
parent
4ddadc68d9
commit
fad6d2ef7e
3 changed files with 5 additions and 5 deletions
|
@ -1058,7 +1058,7 @@ class Connection(ConnectionHandlers):
|
|||
if keyID == 'UNKNOWN':
|
||||
error = _('Neither the remote presence is signed, nor a key was assigned.')
|
||||
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:
|
||||
#encrypt
|
||||
msgenc, error = self.gpg.encrypt(msg, [keyID])
|
||||
|
@ -1072,7 +1072,7 @@ class Connection(ConnectionHandlers):
|
|||
else:
|
||||
# Encryption failed, do not send message
|
||||
tim = localtime()
|
||||
self.dispatch('MSGNOTSENT', (jid, error, msgtxt, tim))
|
||||
self.dispatch('MSGNOTSENT', (jid, error, msgtxt, tim, session))
|
||||
return 3
|
||||
if msgtxt and not xhtml and gajim.config.get(
|
||||
'rst_formatting_outgoing_messages'):
|
||||
|
|
|
@ -393,7 +393,7 @@ class ConnectionZeroconf(ConnectionHandlersZeroconf):
|
|||
else:
|
||||
# Encryption failed, do not send message
|
||||
tim = time.localtime()
|
||||
self.dispatch('MSGNOTSENT', (jid, error, msgtxt, tim))
|
||||
self.dispatch('MSGNOTSENT', (jid, error, msgtxt, tim, session))
|
||||
return 3
|
||||
|
||||
if type == 'chat':
|
||||
|
|
|
@ -1014,9 +1014,9 @@ class Interface:
|
|||
helpers.play_sound('message_sent')
|
||||
|
||||
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])
|
||||
self.roster.on_message(array[0], msg, array[3], account,
|
||||
array[4].roster_message(array[0], msg, array[3], account,
|
||||
msg_type='error')
|
||||
|
||||
def handle_event_subscribe(self, account, array):
|
||||
|
|
Loading…
Add table
Reference in a new issue