From df5b39fa7c9e3949987d7860a7c683afa9e73ddb Mon Sep 17 00:00:00 2001 From: "jabber.developer2" Date: Sat, 16 May 2026 17:16:44 +0300 Subject: [PATCH] fix(history): address PR #116 review feedback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - console: drop orphaned `/logging chat` reference from cons_privacy_setting() — the subcommand was removed, PREF_CHLOG now tracks PREF_HISTORY implicitly - console: delete cons_logging_setting() and remove its call from cons_show_log_prefs() — every line in it referenced /logging chat or /logging group, both now invalid after the deprecation below - command: deprecate /logging command. It now prints a single notice pointing to /history; CMD_PREAMBLE trimmed (min_args=0, no setting_func, syntax/args/examples dropped); subcommand 'group' removed from autocomplete The SQLite history-load gap for /correction off is split out into a follow-up — out of scope for this PR. --- src/command/cmd_ac.c | 2 -- src/command/cmd_defs.c | 11 +++-------- src/command/cmd_funcs.c | 12 +----------- src/ui/console.c | 20 -------------------- src/ui/ui.h | 1 - 5 files changed, 4 insertions(+), 42 deletions(-) diff --git a/src/command/cmd_ac.c b/src/command/cmd_ac.c index 93de95aa..acab53b5 100644 --- a/src/command/cmd_ac.c +++ b/src/command/cmd_ac.c @@ -1147,8 +1147,6 @@ cmd_ac_init(void) autocomplete_add(status_state_ac, "xa"); autocomplete_add(status_state_ac, "dnd"); - autocomplete_add(logging_ac, "group"); - autocomplete_add(privacy_ac, "logging"); autocomplete_add(privacy_ac, "os"); diff --git a/src/command/cmd_defs.c b/src/command/cmd_defs.c index d225c2fd..432770e0 100644 --- a/src/command/cmd_defs.c +++ b/src/command/cmd_defs.c @@ -1660,19 +1660,14 @@ static const struct cmd_t command_defs[] = { }, { CMD_PREAMBLE("/logging", - parse_args, 2, 3, &cons_logging_setting) + parse_args, 0, 3, NULL) CMD_MAINFUNC(cmd_logging) CMD_TAGS( CMD_TAG_CHAT) CMD_SYN( - "/logging group on|off") + "/logging") CMD_DESC( - "Configure groupchat (MUC) logging. " - "Regular chat logging is controlled by /history.") - CMD_ARGS( - { "group on|off", "Enable/Disable groupchat (room) logging." }) - CMD_EXAMPLES( - "/logging group off") + "Deprecated. Use '/history' instead.") }, { CMD_PREAMBLE("/states", diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 007b9f59..2a49415e 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -6731,17 +6731,7 @@ cmd_privacy(ProfWin* window, const char* const command, gchar** args) gboolean cmd_logging(ProfWin* window, const char* const command, gchar** args) { - if (args[0] == NULL) { - cons_logging_setting(); - return TRUE; - } - - if (g_strcmp0(args[0], "group") == 0 && args[1] != NULL) { - _cmd_set_boolean_preference(args[1], "Groupchat logging", PREF_GRLOG); - return TRUE; - } - - cons_bad_cmd_usage(command); + cons_show("The '/logging' command is deprecated, use '/history' instead."); return TRUE; } diff --git a/src/ui/console.c b/src/ui/console.c index e6c3a96c..e27ffd21 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -1948,27 +1948,12 @@ cons_log_setting(void) cons_show("Log level (/log level) : %s", level); } -void -cons_logging_setting(void) -{ - if (prefs_get_boolean(PREF_CHLOG)) - cons_show("Chat logging (/logging chat) : ON"); - else - cons_show("Chat logging (/logging chat) : OFF"); - - if (prefs_get_boolean(PREF_GRLOG)) - cons_show("Groupchat logging (/logging group) : ON"); - else - cons_show("Groupchat logging (/logging group) : OFF"); -} - void cons_show_log_prefs(void) { cons_show("Logging preferences:"); cons_show(""); cons_log_setting(); - cons_logging_setting(); cons_alert(NULL); } @@ -2862,11 +2847,6 @@ cons_privacy_setting(void) { cons_show("Database logging : %s", prefs_get_string(PREF_DBLOG)); - if (prefs_get_boolean(PREF_CHLOG)) { - cons_show("Chat logging (/logging chat) : ON"); - } else { - cons_show("Chat logging (/logging chat) : OFF"); - } if (prefs_get_boolean(PREF_HISTORY)) { cons_show("Chat history (/history) : ON"); } else { diff --git a/src/ui/ui.h b/src/ui/ui.h index 2420fadf..33c5a4d0 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -330,7 +330,6 @@ void cons_history_setting(void); void cons_carbons_setting(void); void cons_receipts_setting(void); void cons_log_setting(void); -void cons_logging_setting(void); void cons_autoaway_setting(void); void cons_reconnect_setting(void); void cons_autoping_setting(void);