Mercurial > prosody-modules
diff mod_smacks/mod_smacks.lua @ 4631:921c607617b0
mod_smacks: Fix traceback on missing stanza counter
This shouldn't be possible, yet it was.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 22 Jul 2021 17:26:32 +0200 |
parents | f6f28ceff53a |
children | ab7dc5c5c782 |
line wrap: on
line diff
--- a/mod_smacks/mod_smacks.lua Wed Jul 21 16:28:13 2021 +0200 +++ b/mod_smacks/mod_smacks.lua Thu Jul 22 17:26:32 2021 +0200 @@ -263,7 +263,7 @@ session.resumption_token = nil; end -- send out last ack as per revision 1.5.2 of XEP-0198 - if session.smacks and session.conn then + if session.smacks and session.conn and session.handled_stanza_count then (session.sends2s or session.send)(st.stanza("a", { xmlns = session.smacks, h = string.format("%d", session.handled_stanza_count) })); end return session_close(...);