# HG changeset patch # User Kim Alvefur # Date 1413798908 -7200 # Node ID 06ecc5b3ca469dd9910a4617d6a03da51f135145 # Parent 120817435151a6ef8a6519a34c6f27af9420608a mod_smacks: Send failure correctly on s2s diff -r 120817435151 -r 06ecc5b3ca46 mod_smacks/mod_smacks.lua --- a/mod_smacks/mod_smacks.lua Mon Oct 20 11:51:07 2014 +0200 +++ b/mod_smacks/mod_smacks.lua Mon Oct 20 11:55:08 2014 +0200 @@ -138,7 +138,7 @@ local ok, err, err_text = can_do_smacks(session); if not ok then session.log("warn", "Failed to enable smacks: %s", err_text); -- TODO: XEP doesn't say we can send error text, should it? - session.send(st.stanza("failed", { xmlns = xmlns_sm }):tag(err, { xmlns = xmlns_errors})); + (session.sends2s or session.send)(st.stanza("failed", { xmlns = xmlns_sm }):tag(err, { xmlns = xmlns_errors})); return true; end