show warning dialog when receiving an unencryptable message

This commit is contained in:
Brendan Taylor 2008-07-15 03:16:58 +00:00
parent 312ecd1e54
commit a6dfa86ad0
1 changed files with 5 additions and 3 deletions

View File

@ -1733,11 +1733,13 @@ class Interface:
def handle_event_failed_decrypt(self, account, data): def handle_event_failed_decrypt(self, account, data):
jid, tim, session = data jid, tim, session = data
details = _('Unable to decrypt message from '
'%s\nIt may have been tampered with.') % (jid)
if session.control: if session.control:
session.control.print_conversation_line('Unable to decrypt message from '+ session.control.print_conversation_line(details, 'status', '', tim)
'%s\nIt may have been tampered with.' % (jid), 'status', '', tim)
else: else:
print 'failed decrypt, unable to find a control to notify you in.' dialogs.WarningDialog(_('Unable to decrypt message'), details)
def handle_event_privacy_lists_received(self, account, data): def handle_event_privacy_lists_received(self, account, data):
# ('PRIVACY_LISTS_RECEIVED', account, list) # ('PRIVACY_LISTS_RECEIVED', account, list)