mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
Validate PGP key when chosen for account
This commit is contained in:
parent
57ca441f02
commit
8501d1db33
@ -486,8 +486,12 @@ cmd_account(ProfWin *window, const char * const command, gchar **args)
|
|||||||
}
|
}
|
||||||
cons_show("");
|
cons_show("");
|
||||||
} else if (strcmp(property, "pgpkeyid") == 0) {
|
} else if (strcmp(property, "pgpkeyid") == 0) {
|
||||||
accounts_set_pgp_keyid(account_name, value);
|
if (!p_gpg_valid_key(value)) {
|
||||||
cons_show("Updated PGP key ID for account %s: %s", account_name, value);
|
cons_show("Invalid PGP key ID specified, see /pgp keys");
|
||||||
|
} else {
|
||||||
|
accounts_set_pgp_keyid(account_name, value);
|
||||||
|
cons_show("Updated PGP key ID for account %s: %s", account_name, value);
|
||||||
|
}
|
||||||
cons_show("");
|
cons_show("");
|
||||||
} else if (valid_resource_presence_string(property)) {
|
} else if (valid_resource_presence_string(property)) {
|
||||||
int intval;
|
int intval;
|
||||||
|
Loading…
Reference in New Issue
Block a user