Comparison

plugins/mod_disco.lua @ 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
parent 11204:ae2a11066001
child 12015:b4db17aeff01
comparison
equal deleted inserted replaced
11736:ddb87df3de30 11737:59cf555b4698
147 end); 147 end);
148 148
149 -- Handle caps stream feature 149 -- Handle caps stream feature
150 module:hook("stream-features", function (event) 150 module:hook("stream-features", function (event)
151 if event.origin.type == "c2s" or event.origin.type == "c2s_unbound" then 151 if event.origin.type == "c2s" or event.origin.type == "c2s_unbound" then
152 event.features:add_child(get_server_caps_feature());
153 end
154 end);
155
156 module:hook("s2s-stream-features", function (event)
157 if event.origin.type == "s2sin" then
152 event.features:add_child(get_server_caps_feature()); 158 event.features:add_child(get_server_caps_feature());
153 end 159 end
154 end); 160 end);
155 161
156 -- Handle disco requests to user accounts 162 -- Handle disco requests to user accounts