1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05: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 logging on|redact|off",
"/privacy os on|off") "/privacy os on|off")
CMD_DESC( 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( 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." }, { "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)." } { "os on|off", "Choose whether to include the OS name if a user asks for software information (XEP-0092)." }

View File

@ -2952,4 +2952,20 @@ cons_privacy_setting(void)
} else { } else {
cons_show("Reveal OS name when asked for software version (XEP-0092) (/privacy os) : OFF"); 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");
}
}
} }