From 1bd617d38936dae2f36e51ad0f28c325f57868f6 Mon Sep 17 00:00:00 2001 From: lightb Date: Tue, 22 Apr 2014 16:26:45 -0400 Subject: [PATCH] Small modification, should check for whitespace pattern even if policy is always. --- src/server_events.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/server_events.c b/src/server_events.c index 0d0ba9c6..29cdfbc5 100644 --- a/src/server_events.c +++ b/src/server_events.c @@ -206,20 +206,21 @@ void handle_incoming_message(char *from, char *message, gboolean priv) { #ifdef HAVE_LIBOTR -//check for OTR whitespace (opportunistic) + gboolean was_decrypted = FALSE; + char *newmessage; + + if (!priv) { +//check for OTR whitespace (opportunistic or always) char *policy = prefs_get_string(PREF_OTR_POLICY); - if (strcmp(policy, "opportunistic") == 0) { + if (strcmp(policy, "opportunistic") == 0 || strcmp(policy, "always") == 0) { if (strstr(message,OTRL_MESSAGE_TAG_BASE)) { if (strstr(message, OTRL_MESSAGE_TAG_V2) || strstr(message, OTRL_MESSAGE_TAG_V1)) { char *otr_query_message = otr_start_query(); - cons_show("OTR Whitespace pattern detected. Attempting to start OTR session...", message); + cons_show("OTR Whitespace pattern detected. Attempting to start OTR session..."); message_send(otr_query_message, from); } } } - gboolean was_decrypted = FALSE; - char *newmessage; - if (!priv) { newmessage = otr_decrypt_message(from, message, &was_decrypted); // internal OTR message