Compare commits

..

1 Commits

Author SHA1 Message Date
d8ce4ca80e fix(history): address PR #116 review feedback
All checks were successful
CI Code / Check coding style (pull_request) Successful in 33s
CI Code / Check spelling (pull_request) Successful in 20s
CI Code / Code Coverage (pull_request) Successful in 2m44s
CI Code / Linux (debian) (pull_request) Successful in 4m40s
CI Code / Linux (ubuntu) (pull_request) Successful in 4m55s
CI Code / Linux (arch) (pull_request) Successful in 5m42s
- console: drop orphaned `Chat logging (/logging chat)` lines from
  cons_logging_setting() and cons_privacy_setting() — the /logging chat
  subcommand was removed, PREF_CHLOG now tracks PREF_HISTORY implicitly
- 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
- sqlite: gate LMC merge in _sqlite_get_previous_chat() on
  PREF_CORRECTION_ALLOW. When /correction is off, return original and
  correction rows as separate messages instead of merging via
  COALESCE/LEFT JOIN — matches the flatfile load path and the PR's
  stated semantics for /correction off
2026-05-16 17:22:11 +03:00

View File

@@ -392,8 +392,8 @@ _sqlite_get_previous_chat(const gchar* const contact_barejid, const gchar* start
const gboolean lmc_allowed = prefs_get_boolean(PREF_CORRECTION_ALLOW);
const char* msg_expr = lmc_allowed ? "COALESCE(B.`message`, A.`message`)" : "A.`message`";
const char* join_clause = lmc_allowed
? "LEFT JOIN `ChatLogs` AS B ON (A.`replaced_by_db_id` = B.`id` AND A.`from_jid` = B.`from_jid`) "
: "";
? "LEFT JOIN `ChatLogs` AS B ON (A.`replaced_by_db_id` = B.`id` AND A.`from_jid` = B.`from_jid`) "
: "";
const char* replaces_filter = lmc_allowed ? "(A.`replaces_db_id` IS NULL) AND " : "";
auto_sqlite gchar* query = sqlite3_mprintf("SELECT * FROM ("