plugins/mod_smacks.lua
changeset 12085 6cc3135138d7
parent 12084 9744a0ceb767
child 12116 08a949e63541
equal deleted inserted replaced
12084:9744a0ceb767 12085:6cc3135138d7
   272 
   272 
   273 module:hook_tag("http://etherx.jabber.org/streams", "features",
   273 module:hook_tag("http://etherx.jabber.org/streams", "features",
   274 		function (session, stanza)
   274 		function (session, stanza)
   275 			-- Needs to be done after flushing sendq since those aren't stored as
   275 			-- Needs to be done after flushing sendq since those aren't stored as
   276 			-- stanzas and counting them is weird.
   276 			-- stanzas and counting them is weird.
       
   277 			-- TODO unify sendq and smqueue
   277 			timer.add_task(1e-6, function ()
   278 			timer.add_task(1e-6, function ()
   278 				if can_do_smacks(session) then
   279 				if can_do_smacks(session) then
   279 					if stanza:get_child("sm", xmlns_sm3) then
   280 					if stanza:get_child("sm", xmlns_sm3) then
   280 						session.sends2s(st.stanza("enable", sm3_attr));
   281 						session.sends2s(st.stanza("enable", sm3_attr));
   281 						session.smacks = xmlns_sm3;
   282 						session.smacks = xmlns_sm3;