about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-08-26 21:42:16 +0100
committerJames Booth <boothj5@gmail.com>2015-08-26 21:42:16 +0100
commitfc60c9fbf1bc076fe16ef2b1bf3b9c81d00fa61e (patch)
treec494b0e4ded4ad7c8cce59c175916251e2e6b549 /src
parent5e962fe0f5ada7b07911de44a0edbae385d1e27a (diff)
downloadprofani-tty-fc60c9fbf1bc076fe16ef2b1bf3b9c81d00fa61e.tar.gz
Fixed OTR char display
Diffstat (limited to 'src')
-rw-r--r--src/event/server_events.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/event/server_events.c b/src/event/server_events.c
index 283fc264..80e45401 100644
--- a/src/event/server_events.c
+++ b/src/event/server_events.c
@@ -235,7 +235,7 @@ sv_ev_incoming_message(char *barejid, char *resource, char *message, char *enc_m
             gboolean decrypted = FALSE;
             char *otr_res = otr_on_message_recv(barejid, resource, message, &decrypted);
             if (otr_res) {
-                if (decrypted && g_strrstr(message, otr_res) == NULL) {
+                if (decrypted && g_strrstr(otr_res, message) == NULL) {
                     ui_incoming_msg(chatwin, resource, otr_res, NULL, new_win, PROF_ENC_OTR);
                 } else {
                     ui_incoming_msg(chatwin, resource, otr_res, NULL, new_win, PROF_ENC_NONE);
@@ -255,7 +255,7 @@ sv_ev_incoming_message(char *barejid, char *resource, char *message, char *enc_m
     gboolean decrypted = FALSE;
     char *otr_res = otr_on_message_recv(barejid, resource, message, &decrypted);
     if (otr_res) {
-        if (decrypted && g_strrstr(message, otr_res) == NULL) {
+        if (decrypted && g_strrstr(otr_res, message) == NULL) {
             ui_incoming_msg(chatwin, resource, otr_res, NULL, new_win, PROF_ENC_OTR);
         } else {
             ui_incoming_msg(chatwin, resource, otr_res, NULL, new_win, PROF_ENC_NONE);