changeset 1147:736f1dd6e142

plugin OTR: two small fixes
author souliane <souliane@mailoo.org>
date Mon, 01 Sep 2014 16:11:45 +0200
parents 1ac5ea74dbdf
children 8cdb97e89d9b
files src/plugins/plugin_sec_otr.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/plugin_sec_otr.py	Mon Sep 01 16:05:28 2014 +0200
+++ b/src/plugins/plugin_sec_otr.py	Mon Sep 01 16:11:45 2014 +0200
@@ -314,7 +314,7 @@
                 note_msg = _("Your correspondant {correspondent} is now UNTRUSTED")
             note = xml_tools.XMLUI(C.XMLUI_DIALOG, dialog_opt = {
                                    C.XMLUI_DATA_TYPE: C.XMLUI_DIALOG_NOTE,
-                                   C.XMLUI_DATA_MESS: note_msg.format(correspondent=otrctx.user.name)}
+                                   C.XMLUI_DATA_MESS: note_msg.format(correspondent=otrctx.peer)}
                                    )
             return {'xmlui': note.toXml()}
 
@@ -356,8 +356,8 @@
                 for context in ctxMng.contexts.values():
                     if context.state not in (potr.context.STATE_FINISHED, potr.context.STATE_PLAINTEXT):
                         context.disconnect()
-                    ctxMng.account.privkey = None
-                    ctxMng.account.getPrivkey()  # as account.privkey is None, getPrivkey will generate a new key, and save it
+                ctxMng.account.privkey = None
+                ctxMng.account.getPrivkey()  # as account.privkey is None, getPrivkey will generate a new key, and save it
                 return {'xmlui': xml_tools.note(_("Your private key has been dropped")).toXml()}
             return {}