1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Check for already established but not used OTR session on /otr start <contact>

For example, one may have been established from the other end, without
any messages being sent yet
This commit is contained in:
James Booth 2014-01-13 19:25:08 +00:00
parent a07880f5c0
commit df760bed18

View File

@ -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 {