Add /privacy logging command

Add ability to completely turn logs off,
Needed since `/logging` and `/history` didn't stop history logging
in the DB, only in files.
Command might break something on usage,
hence it was primarily introduced for privacy geeks.
Privacy command discussion #1836
This commit is contained in:
John Hernandez
2023-07-03 16:06:24 +02:00
parent f67d548ebf
commit 1c102fec27
8 changed files with 112 additions and 5 deletions

View File

@@ -2720,6 +2720,21 @@ static const struct cmd_t command_defs[] = {
"/strophe verbosity 3",
"/strophe sm no-resend")
},
{ CMD_PREAMBLE("/privacy",
parse_args, 2, 3, NULL)
CMD_MAINFUNC(cmd_privacy)
CMD_TAGS(
CMD_TAG_CHAT)
CMD_SYN(
"/privacy logging on|redact|off")
CMD_DESC(
"Configure privacy settings.")
CMD_ARGS(
{ "logging on|redact|off", "Switch chat logging. This will also disable logging in the internally used SQL database. Your messages will not be saved anywhere locally. This might have unintended consequences, such as not being able to decrypt OMEMO encrypted messages received later via MAM, and should be used with caution." })
CMD_EXAMPLES(
"/privacy logging off")
},
// NEXT-COMMAND (search helper)
};