1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-16 21:35:24 +00:00

Link from /privacy to relevant /account settings

Related to https://github.com/profanity-im/profanity/issues/1836
This commit is contained in:
Michael Vetter 2023-07-25 20:10:09 +02:00
parent f7cce4c5c1
commit 13af6c96dc
2 changed files with 25 additions and 6 deletions

View File

@ -2720,7 +2720,10 @@ static const struct cmd_t command_defs[] = {
"/privacy logging on|redact|off",
"/privacy os on|off")
CMD_DESC(
"Configure privacy settings.")
"Configure privacy settings."
"Also check the the following settings in /account: "
"clientid to set the client identification name"
"session_alarm to configure an alarm when more clients log in.")
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." },
{ "os on|off", "Choose whether to include the OS name if a user asks for software information (XEP-0092)." }

View File

@ -2934,17 +2934,17 @@ cons_strophe_setting(void)
void
cons_privacy_setting(void)
{
cons_show("Database logging : %s", prefs_get_string(PREF_DBLOG));
cons_show("Database logging : %s", prefs_get_string(PREF_DBLOG));
if (prefs_get_boolean(PREF_CHLOG)) {
cons_show("Chat logging (/logging chat) : ON");
cons_show("Chat logging (/logging chat) : ON");
} else {
cons_show("Chat logging (/logging chat) : OFF");
cons_show("Chat logging (/logging chat) : OFF");
}
if (prefs_get_boolean(PREF_HISTORY)) {
cons_show("Chat history (/history) : ON");
cons_show("Chat history (/history) : ON");
} else {
cons_show("Chat history (/history) : OFF");
cons_show("Chat history (/history) : OFF");
}
if (prefs_get_boolean(PREF_REVEAL_OS)) {
@ -2952,4 +2952,20 @@ cons_privacy_setting(void)
} else {
cons_show("Reveal OS name when asked for software version (XEP-0092) (/privacy os) : OFF");
}
if (connection_get_status() == JABBER_CONNECTED) {
char* account_name = session_get_account_name();
ProfAccount* account = accounts_get_account(account_name);
if (account->client) {
cons_show("Client name (/account set <account> clientid) : %s", account->client);
} else {
cons_show("Client name (/account set <account> clientid) : (default)");
}
if (account->max_sessions > 0) {
cons_show("Max sessions alarm (/account set <account> session_alarm) : %s", account->max_sessions);
} else {
cons_show("Max sessions alarm (/account set <account> session_alarm) : not set");
}
}
}