mod_sasl2_bind2/mod_sasl2_bind2.lua
changeset 5040 9ef5625d0d39
parent 5037 9afd98178011
child 5041 8a8100fff580
equal deleted inserted replaced
5039:baebe7452903 5040:9ef5625d0d39
   100 
   100 
   101 module:hook("enable-bind-features", function (event)
   101 module:hook("enable-bind-features", function (event)
   102 	local session, features = event.session, event.features;
   102 	local session, features = event.session, event.features;
   103 
   103 
   104 	-- Carbons
   104 	-- Carbons
   105 	session.want_carbons = not not features:get_child("enable", "urn:xmpp:carbons:2");
   105 	if features:get_child("enable", "urn:xmpp:carbons:2") then
       
   106 		session.want_carbons = true;
       
   107 		event.result:tag("enabled", { xmlns = "urn:xmpp:carbons:2" }):up();
       
   108 	end
   106 
   109 
   107 	-- CSI
   110 	-- CSI
   108 	local csi_state_tag = features:child_with_ns("urn:xmpp:csi:0");
   111 	local csi_state_tag = features:child_with_ns("urn:xmpp:csi:0");
   109 	if csi_state_tag then
   112 	if csi_state_tag then
   110 		session.state = csi_state_tag.name;
   113 		session.state = csi_state_tag.name;