XEP-0410: implement server-side optimisation for self-pings

This prevents the ping from round-tripping through IRC and
possibly a random other client of the user. Please see XEP-0410
for the rationale.

Fixes #3385.
This commit is contained in:
Jonas Schäfer
2019-08-20 21:42:43 +02:00
parent a8cd241485
commit b68f36056d
5 changed files with 22 additions and 37 deletions
+1 -1
View File
@@ -997,7 +997,7 @@ void BiboumiComponent::send_irc_channel_disco_info(const std::string& id, const
identity["category"] = "conference";
identity["type"] = "irc";
identity["name"] = ""s + iid.get_local() + " on " + iid.get_server();
for (const char *ns: {DISCO_INFO_NS, MUC_NS, ADHOC_NS, PING_NS, MAM_NS, VERSION_NS, STABLE_MUC_ID_NS})
for (const char *ns: {DISCO_INFO_NS, MUC_NS, ADHOC_NS, PING_NS, MAM_NS, VERSION_NS, STABLE_MUC_ID_NS, SELF_PING_FLAG})
{
XmlSubNode feature(query, "feature");
feature["var"] = ns;