about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-02-12 17:42:43 +0100
committerMichael Vetter <jubalh@iodoru.org>2020-02-14 10:17:07 +0100
commit743ec6afd073ed1c071767df87cb5e3565eb3575 (patch)
tree972ae75f4626d93e5b54d2e158726446008c905d
parent8f37afcd37ad8663ca36c13ca7fbc4a431119f73 (diff)
downloadprofani-tty-743ec6afd073ed1c071767df87cb5e3565eb3575.tar.gz
xep-0308: only replace messages if the user enabled the feature
Outgoing `/correct` will still work.
-rw-r--r--src/ui/window.c6
1 files changed, 3 insertions, 3 deletions
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);