Moved OTR policy check to otr module
This commit is contained in:
@@ -1363,7 +1363,7 @@ cmd_execute_default(const char * const inp)
|
||||
ui_current_print_line("You are not currently connected.");
|
||||
} else {
|
||||
#ifdef HAVE_LIBOTR
|
||||
if ((strcmp(prefs_get_string(PREF_OTR_POLICY), "always") == 0) && !otr_is_secure(recipient)) {
|
||||
if ((strcmp(otr_get_policy(recipient), "always") == 0) && !otr_is_secure(recipient)) {
|
||||
cons_show_error("Failed to send message. Please check OTR policy");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -1004,7 +1004,7 @@ cmd_msg(gchar **args, struct cmd_help_t help)
|
||||
cons_show_error("Failed to encrypt and send message,");
|
||||
}
|
||||
} else {
|
||||
char *policy = prefs_get_string(PREF_OTR_POLICY);
|
||||
char *policy = otr_get_policy(usr_jid);
|
||||
|
||||
if (strcmp(policy, "always") == 0) {
|
||||
cons_show_error("Failed to send message. Please check OTR policy");
|
||||
|
||||
Reference in New Issue
Block a user