plugin OTR: two small fixes

This commit is contained in:
souliane 2014-09-01 16:11:45 +02:00
commit df43c42611

View file

@ -314,7 +314,7 @@ class OTR(object):
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 @@ class OTR(object):
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 {}