Commit 0de282a1 authored by louiz’'s avatar louiz’

Advertise the muc#stable_id feature on disco#info results

From XEP 0045:
“Note: the requirement to reflect the 'id' attribute was added in version
1.31 of this XEP. Servers following the new specification SHOULD advertise
that with a disco info feature of 'http://jabber.org/protocol/muc#stable_id'
on both the service domain and on individual MUCs, so that clients can check
for support.”
parent 9500bfd4
...@@ -915,7 +915,7 @@ void BiboumiComponent::send_self_disco_info(const std::string& id, const std::st ...@@ -915,7 +915,7 @@ void BiboumiComponent::send_self_disco_info(const std::string& id, const std::st
identity["category"] = "conference"; identity["category"] = "conference";
identity["type"] = "irc"; identity["type"] = "irc";
identity["name"] = "Biboumi XMPP-IRC gateway"; identity["name"] = "Biboumi XMPP-IRC gateway";
for (const char *ns: {DISCO_INFO_NS, MUC_NS, ADHOC_NS, PING_NS, MAM_NS, VERSION_NS}) for (const char *ns: {DISCO_INFO_NS, MUC_NS, ADHOC_NS, PING_NS, MAM_NS, VERSION_NS, STABLE_MUC_ID_NS})
{ {
XmlSubNode feature(query, "feature"); XmlSubNode feature(query, "feature");
feature["var"] = ns; feature["var"] = ns;
...@@ -939,7 +939,7 @@ void BiboumiComponent::send_irc_server_disco_info(const std::string& id, const s ...@@ -939,7 +939,7 @@ void BiboumiComponent::send_irc_server_disco_info(const std::string& id, const s
identity["category"] = "conference"; identity["category"] = "conference";
identity["type"] = "irc"; identity["type"] = "irc";
identity["name"] = "IRC server " + from.local + " over Biboumi"; identity["name"] = "IRC server " + from.local + " over Biboumi";
for (const char *ns: {DISCO_INFO_NS, MUC_NS, ADHOC_NS, PING_NS, MAM_NS, VERSION_NS}) for (const char *ns: {DISCO_INFO_NS, MUC_NS, ADHOC_NS, PING_NS, MAM_NS, VERSION_NS, STABLE_MUC_ID_NS})
{ {
XmlSubNode feature(query, "feature"); XmlSubNode feature(query, "feature");
feature["var"] = ns; feature["var"] = ns;
...@@ -982,7 +982,7 @@ void BiboumiComponent::send_irc_channel_disco_info(const std::string& id, const ...@@ -982,7 +982,7 @@ void BiboumiComponent::send_irc_channel_disco_info(const std::string& id, const
identity["category"] = "conference"; identity["category"] = "conference";
identity["type"] = "irc"; identity["type"] = "irc";
identity["name"] = "IRC channel " + iid.get_local() + " from server " + iid.get_server() + " over biboumi"; identity["name"] = "IRC channel " + iid.get_local() + " from server " + iid.get_server() + " over biboumi";
for (const char *ns: {DISCO_INFO_NS, MUC_NS, ADHOC_NS, PING_NS, MAM_NS, VERSION_NS}) for (const char *ns: {DISCO_INFO_NS, MUC_NS, ADHOC_NS, PING_NS, MAM_NS, VERSION_NS, STABLE_MUC_ID_NS})
{ {
XmlSubNode feature(query, "feature"); XmlSubNode feature(query, "feature");
feature["var"] = ns; feature["var"] = ns;
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#define RSM_NS "http://jabber.org/protocol/rsm" #define RSM_NS "http://jabber.org/protocol/rsm"
#define MUC_TRAFFIC_NS "http://jabber.org/protocol/muc#traffic" #define MUC_TRAFFIC_NS "http://jabber.org/protocol/muc#traffic"
#define STABLE_ID_NS "urn:xmpp:sid:0" #define STABLE_ID_NS "urn:xmpp:sid:0"
#define STABLE_MUC_ID_NS "http://jabber.org/protocol/muc#stable_id"
/** /**
* An XMPP component, communicating with an XMPP server using the protocole * An XMPP component, communicating with an XMPP server using the protocole
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment