mod_disco: Send XEP-0115 caps in s2s stream features
authorKim Alvefur <zash@zash.se>
Thu, 12 Aug 2021 19:34:17 +0200
changeset 11741 59cf555b4698
parent 11740 ddb87df3de30
child 11742 3f1450ec37f4
mod_disco: Send XEP-0115 caps in s2s stream features Not currently used for anything, but allowed and could be used in the future and might be used by other servers.
plugins/mod_disco.lua
--- a/plugins/mod_disco.lua	Wed Aug 11 14:55:59 2021 +0200
+++ b/plugins/mod_disco.lua	Thu Aug 12 19:34:17 2021 +0200
@@ -153,6 +153,12 @@
 	end
 end);
 
+module:hook("s2s-stream-features", function (event)
+	if event.origin.type == "s2sin" then
+		event.features:add_child(get_server_caps_feature());
+	end
+end);
+
 -- Handle disco requests to user accounts
 if module:get_host_type() ~= "local" then	return end -- skip for components
 module:hook("iq-get/bare/http://jabber.org/protocol/disco#info:query", function(event)