diff options
author | Michael Vetter <jubalh@iodoru.org> | 2022-04-28 17:37:24 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2022-04-28 17:37:24 +0200 |
commit | 9fcd589682e91aee8ec594957bc8c2dcb4dd79f2 (patch) | |
tree | bddb72c5f53796978063f5d9d882acb74acb6f4b /src | |
parent | 2dc0cc489c872941e18a622c091f74bf5b0b043f (diff) | |
download | profani-tty-9fcd589682e91aee8ec594957bc8c2dcb4dd79f2.tar.gz |
ox: group online autocompletion together
Diffstat (limited to 'src')
-rw-r--r-- | src/command/cmd_ac.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/command/cmd_ac.c b/src/command/cmd_ac.c index 3024ab17..1f6246a4 100644 --- a/src/command/cmd_ac.c +++ b/src/command/cmd_ac.c @@ -876,7 +876,6 @@ cmd_ac_init(void) autocomplete_add(pgp_sendfile_ac, "on"); autocomplete_add(pgp_sendfile_ac, "off"); - // XEP-0373: OX ox_ac = autocomplete_new(); autocomplete_add(ox_ac, "keys"); autocomplete_add(ox_ac, "contacts"); @@ -2576,13 +2575,16 @@ _ox_autocomplete(ProfWin* window, const char* const input, gboolean previous) if (found) { return found; } - } - if (conn_status == JABBER_CONNECTED) { found = autocomplete_param_with_func(input, "/ox discover", roster_contact_autocomplete, previous, NULL); if (found) { return found; } + + found = autocomplete_param_with_func(input, "/ox setkey", roster_barejid_autocomplete, previous, NULL); + if (found) { + return found; + } } found = autocomplete_param_with_ac(input, "/ox log", ox_log_ac, TRUE, previous); @@ -2599,13 +2601,6 @@ _ox_autocomplete(ProfWin* window, const char* const input, gboolean previous) return cmd_ac_complete_filepath(input, "/ox announce", previous); } - if (conn_status == JABBER_CONNECTED) { - found = autocomplete_param_with_func(input, "/ox setkey", roster_barejid_autocomplete, previous, NULL); - if (found) { - return found; - } - } - found = autocomplete_param_with_ac(input, "/ox", ox_ac, TRUE, previous); return found; |