From df760bed182946745b41b48889b9f5d172cd2eb5 Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 13 Jan 2014 19:25:08 +0000 Subject: [PATCH] Check for already established but not used OTR session on /otr start For example, one may have been established from the other end, without any messages being sent yet --- src/command/commands.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/command/commands.c b/src/command/commands.c index 170c519c..25139a78 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -2351,9 +2351,10 @@ cmd_otr(gchar **args, struct cmd_help_t help) } else { if (!otr_key_loaded()) { ui_current_print_line("You have not generated or loaded a private key, use '/otr gen'"); + } else if (!otr_is_secure(barejid)) { + message_send("?OTR?", barejid); } else { - char *recipient = ui_current_recipient(); - message_send("?OTR?", recipient); + ui_gone_secure(barejid, otr_is_trusted(barejid)); } } } else {