Added pgpkeyid account setting, send signed presence

This commit is contained in:
James Booth
2015-03-23 23:38:06 +00:00
parent 8a5d1fef29
commit 475dfebd97
16 changed files with 182 additions and 19 deletions

View File

@@ -1369,6 +1369,7 @@ cmd_init(void)
autocomplete_add(account_set_ac, "muc");
autocomplete_add(account_set_ac, "nick");
autocomplete_add(account_set_ac, "otr");
autocomplete_add(account_set_ac, "pgpkeyid");
account_clear_ac = autocomplete_new();
autocomplete_add(account_clear_ac, "password");
@@ -1376,6 +1377,7 @@ cmd_init(void)
autocomplete_add(account_clear_ac, "server");
autocomplete_add(account_clear_ac, "port");
autocomplete_add(account_clear_ac, "otr");
autocomplete_add(account_clear_ac, "pgpkeyid");
account_default_ac = autocomplete_new();
autocomplete_add(account_default_ac, "set");

View File

@@ -516,6 +516,10 @@ cmd_account(gchar **args, struct cmd_help_t help)
cons_show("Updated login status for account %s: %s", account_name, value);
}
cons_show("");
} else if (strcmp(property, "pgpkeyid") == 0) {
accounts_set_pgp_keyid(account_name, value);
cons_show("Updated PGP key ID for account %s: %s", account_name, value);
cons_show("");
} else if (valid_resource_presence_string(property)) {
int intval;
char *err_msg = NULL;
@@ -594,6 +598,10 @@ cmd_account(gchar **args, struct cmd_help_t help)
accounts_clear_otr(account_name);
cons_show("OTR policy removed for account %s", account_name);
cons_show("");
} else if (strcmp(property, "pgpkeyid") == 0) {
accounts_clear_pgp_keyid(account_name);
cons_show("Removed PGP key ID for account %s", account_name);
cons_show("");
} else {
cons_show("Invalid property: %s", property);
cons_show("");