Author: bct Date: 2008-05-19 02:17:39 +0200 (Mon, 19 May 2008) New Revision: 9665
Modified: trunk/src/common/connection.py trunk/src/common/zeroconf/connection_zeroconf.py trunk/src/gajim.py Log: pass session when dispatching MSGNOTSENT
Modified: trunk/src/common/connection.py =================================================================== --- trunk/src/common/connection.py 2008-05-18 21:17:53 UTC (rev 9664) +++ trunk/src/common/connection.py 2008-05-19 00:17:39 UTC (rev 9665) @@ -1058,7 +1058,7 @@ 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 @@ 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'):
Modified: trunk/src/common/zeroconf/connection_zeroconf.py =================================================================== --- trunk/src/common/zeroconf/connection_zeroconf.py 2008-05-18 21:17:53 UTC (rev 9664) +++ trunk/src/common/zeroconf/connection_zeroconf.py 2008-05-19 00:17:39 UTC (rev 9665) @@ -393,7 +393,7 @@ 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':
Modified: trunk/src/gajim.py =================================================================== --- trunk/src/gajim.py 2008-05-18 21:17:53 UTC (rev 9664) +++ trunk/src/gajim.py 2008-05-19 00:17:39 UTC (rev 9665) @@ -1014,9 +1014,9 @@ 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):