comparison mod_sasl2/mod_sasl2.lua @ 5028:1f2d2bfd29dd

mod_sasl2: Add event for other modules to advertise inline features
author Matthew Wild <mwild1@gmail.com>
date Fri, 02 Sep 2022 16:20:13 +0100
parents fd154db7c8fc
children 88980b2dd986
comparison
equal deleted inserted replaced
5027:8b9ab351dd78 5028:1f2d2bfd29dd
52 mechanisms:text_tag("mechanism", mechanism); 52 mechanisms:text_tag("mechanism", mechanism);
53 end 53 end
54 end 54 end
55 55
56 features:add_direct_child(mechanisms); 56 features:add_direct_child(mechanisms);
57
58 local inline = st.stanza("inline", { xmlns = xmlns_sasl2 });
59 module:fire_event("advertise-sasl-features", { session = origin, features = inline });
60 features:add_direct_child(inline);
57 end, 1); 61 end, 1);
58 62
59 local function handle_status(session, status, ret, err_msg) 63 local function handle_status(session, status, ret, err_msg)
60 local err = nil; 64 local err = nil;
61 if status == "error" then 65 if status == "error" then