plugins/mod_s2s_bidi.lua
changeset 12813 71bd009a9789
parent 12334 38b5b05407be
child 12981 74b9e05af71e
equal deleted inserted replaced
12812:12bd40b8e105 12813:71bd009a9789
    23 	if session.type == "s2sout_unauthed" and (not require_encryption or session.secure) then
    23 	if session.type == "s2sout_unauthed" and (not require_encryption or session.secure) then
    24 		local bidi = stanza:get_child("bidi", xmlns_bidi_feature);
    24 		local bidi = stanza:get_child("bidi", xmlns_bidi_feature);
    25 		if bidi then
    25 		if bidi then
    26 			session.incoming = true;
    26 			session.incoming = true;
    27 			session.log("debug", "Requesting bidirectional stream");
    27 			session.log("debug", "Requesting bidirectional stream");
    28 			session.sends2s(st.stanza("bidi", { xmlns = xmlns_bidi }));
    28 			local request_bidi = st.stanza("bidi", { xmlns = xmlns_bidi });
       
    29 			module:fire_event("s2sout-stream-features", { origin = session, features = request_bidi });
       
    30 			session.sends2s(request_bidi);
    29 		end
    31 		end
    30 	end
    32 	end
    31 end, 200);
    33 end, 200);
    32 
    34 
    33 module:hook_tag("urn:xmpp:bidi", "bidi", function(session)
    35 module:hook_tag("urn:xmpp:bidi", "bidi", function(session)