From 743ec6afd073ed1c071767df87cb5e3565eb3575 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Wed, 12 Feb 2020 17:42:43 +0100 Subject: xep-0308: only replace messages if the user enabled the feature Outgoing `/correct` will still work. --- src/ui/window.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ui') diff --git a/src/ui/window.c b/src/ui/window.c index 8181d473..bb02dcdf 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -1122,7 +1122,7 @@ win_print_incoming(ProfWin *window, const char *const from, ProfMessage *message enc_char = prefs_get_omemo_char(); } - if (message->replace_id) { + if (prefs_get_boolean(PREF_CORRECTION_ALLOW) && message->replace_id) { _win_correct(window, message->plain, message->id, message->replace_id); } else { _win_printf(window, enc_char, 0, message->timestamp, flags, THEME_TEXT_THEM, from, message->id, "%s", message->plain); @@ -1155,7 +1155,7 @@ win_println_them_message(ProfWin *window, char ch, int flags, const char *const GString *fmt_msg = g_string_new(NULL); g_string_vprintf(fmt_msg, message, arg); - if (replace_id) { + if (prefs_get_boolean(PREF_CORRECTION_ALLOW) && replace_id) { _win_correct(window, fmt_msg->str, id, replace_id); } else { _win_printf(window, ch, 0, timestamp, flags | NO_ME, THEME_TEXT_THEM, them, id, "%s", fmt_msg->str); @@ -1180,7 +1180,7 @@ win_print_outgoing_muc_msg(ProfWin *window, char ch, const char *const me, const GString *fmt_msg = g_string_new(NULL); g_string_vprintf(fmt_msg, message, arg); - if (replace_id) { + if (prefs_get_boolean(PREF_CORRECTION_ALLOW) && replace_id) { _win_correct(window, fmt_msg->str, id, replace_id); } else { _win_printf(window, ch, 0, timestamp, 0, THEME_TEXT_ME, me, id, "%s", fmt_msg->str); -- cgit 1.4.1-2-gfad0