Software /
code /
prosody
Changeset
12504:c589874fe348
mod_smacks: Initialize queue before sending <enable>
Setting the .smacks field enables code paths that expects the queue to
be present. The queue is initialized in wrap_session_out(). With
opportunistic writes enabled this happens immediately on .sends2s(), so
the sending <enable> must happen before OR after these two lines, not in
the middle.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 15 May 2022 16:12:34 +0200 |
parents | 12503:ad49bb3a4780 |
children | 12506:d04f6f014636 |
files | plugins/mod_smacks.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_smacks.lua Sun May 15 15:29:02 2022 +0200 +++ b/plugins/mod_smacks.lua Sun May 15 16:12:34 2022 +0200 @@ -334,8 +334,8 @@ if not session.smacks_feature then return end session.smacks = session.smacks_feature.attr.xmlns; + wrap_session_out(session, false); session.sends2s(st.stanza("enable", { xmlns = session.smacks })); - wrap_session_out(session, false); end); function handle_enabled(session, stanza, xmlns_sm) -- luacheck: ignore 212/stanza