Remove unused return value from _disco_autoping_warning_message by
changing its return type to void. Rename local variable from
users_prefers_warning to user_prefers_warning for correct grammar.
Use g_ascii_strcasecmp instead of g_strcmp0 for the domain match
check, so the warning fires correctly regardless of case differences
between the stanza 'from' field and the bound domain.
Remove duplicate autoping warning display from cons_notify_setting(),
keeping it only in cons_autoping_setting() where it belongs.
The new test verifies that disco#info responses from subdomain services
(e.g., conference servers) do not trigger the autoping warning, ensuring
the check is correctly restricted to the server's own domain.
The previous logic triggered warnings for disco items. This change restricts the check to only the connection domain, ensuring that auto-discovered items do not trigger duplicate warnings.
The autoping availability warning should only trigger for disco#info
responses from the XMPP server (no 'from' attribute), otherwise the
warning message is displayed excessive amount of times.
Refs #80
Functional tests for the on-connect warning: shown when the server advertises
urn:xmpp:ping while autoping is disabled and the warning preference is on;
suppressed when ping is unsupported, when autoping is enabled, or when the user
turned the warning off.
Refs #80
The warning toggle uses _cmd_set_boolean_preference (accepts on|off) and the
subcommand is "warning", but the help syntax, console status lines and warning
text advertised "warning enable|disable" and "/autoping warn", none of which
work.
- cmd_defs: document "/autoping warning on|off"
- console: show "(/autoping warning)" in the status lines
- iq: point the warning text at "/autoping warning off"
- cmd_ac: register "warning" and complete on|off via a dedicated
_autoping_autocomplete (moved off the generic single-level table)