aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_carbons.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-09-21 23:06:22 +0200
committerKim Alvefur <zash@zash.se>2015-09-21 23:06:22 +0200
commitdaf5eb28ecfcc65c96ce532425b4063149940ba6 (patch)
tree51c885a7cf41b96add1632b35c686a93ee62dfec /plugins/mod_carbons.lua
parent8724d6b9db027f8450af4d470a54dee7e64bf885 (diff)
downloadprosody-daf5eb28ecfcc65c96ce532425b4063149940ba6.tar.gz
prosody-daf5eb28ecfcc65c96ce532425b4063149940ba6.zip
plugins: Explicitly return to halt event propagation (session.send sometimes does not return true)
Diffstat (limited to 'plugins/mod_carbons.lua')
-rw-r--r--plugins/mod_carbons.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_carbons.lua b/plugins/mod_carbons.lua
index 9b94d58d..9ef14713 100644
--- a/plugins/mod_carbons.lua
+++ b/plugins/mod_carbons.lua
@@ -14,7 +14,8 @@ local function toggle_carbons(event)
local state = stanza.tags[1].name;
module:log("debug", "%s %sd carbons", origin.full_jid, state);
origin.want_carbons = state == "enable" and stanza.tags[1].attr.xmlns;
- return origin.send(st.reply(stanza));
+ origin.send(st.reply(stanza));
+ return true;
end
module:hook("iq-set/self/"..xmlns_carbons..":disable", toggle_carbons);
module:hook("iq-set/self/"..xmlns_carbons..":enable", toggle_carbons);