Added autocompletion for jid-multi form fields

This commit is contained in:
James Booth
2014-09-17 23:34:48 +01:00
parent 45ba6f1fed
commit a905ce18a3
3 changed files with 29 additions and 9 deletions

View File

@@ -2169,6 +2169,14 @@ _form_autocomplete(char *input, int *size)
}
// handle jid-multi (remove)
if ((g_strcmp0(args[0], "remove") == 0) && field_type == FIELD_JID_MULTI) {
Autocomplete ac = form_get_value_ac(form, tag);
found = autocomplete_param_with_ac(input, size, beginning->str, ac, TRUE);
g_string_free(beginning, TRUE);
if (found != NULL) {
return found;
}
}
}
found = autocomplete_param_with_ac(input, size, "/form set", form->tag_ac, TRUE);