Software /
code /
prosody
Comparison
plugins/mod_smacks.lua @ 12081:6cc3135138d7
mod_smacks: Add future todo
The vision: All the queueing and counting and session replacement logic
in core, with mod_smacks only hooking this up to the XEP-0198 protocol.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 20 Dec 2021 00:21:04 +0100 |
parent | 12080:9744a0ceb767 |
child | 12112:08a949e63541 |
comparison
equal
deleted
inserted
replaced
12080:9744a0ceb767 | 12081: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; |