Changeset

11737:59cf555b4698

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.
author Kim Alvefur <zash@zash.se>
date Thu, 12 Aug 2021 19:34:17 +0200
parents 11736:ddb87df3de30
children 11738:3f1450ec37f4
files plugins/mod_disco.lua
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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)