Mercurial > prosody-modules
comparison mod_carbons/mod_carbons.lua @ 1865:db8b256f51ff
mod_admin_web,mod_carbons,mod_csi_compat,mod_mam_muc,mod_tcpproxy: Explicitly return true
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 21 Sep 2015 20:03:08 +0200 |
parents | 91c01ef82807 |
children | ad7f87bd30c8 |
comparison
equal
deleted
inserted
replaced
1864:991a5f74f848 | 1865:db8b256f51ff |
---|---|
14 local function toggle_carbons(event) | 14 local function toggle_carbons(event) |
15 local origin, stanza = event.origin, event.stanza; | 15 local origin, stanza = event.origin, event.stanza; |
16 local state = stanza.tags[1].attr.mode or stanza.tags[1].name; | 16 local state = stanza.tags[1].attr.mode or stanza.tags[1].name; |
17 module:log("debug", "%s %sd carbons", origin.full_jid, state); | 17 module:log("debug", "%s %sd carbons", origin.full_jid, state); |
18 origin.want_carbons = state == "enable" and stanza.tags[1].attr.xmlns; | 18 origin.want_carbons = state == "enable" and stanza.tags[1].attr.xmlns; |
19 return origin.send(st.reply(stanza)); | 19 origin.send(st.reply(stanza)); |
20 return true; | |
20 end | 21 end |
21 module:hook("iq-set/self/"..xmlns_carbons..":disable", toggle_carbons); | 22 module:hook("iq-set/self/"..xmlns_carbons..":disable", toggle_carbons); |
22 module:hook("iq-set/self/"..xmlns_carbons..":enable", toggle_carbons); | 23 module:hook("iq-set/self/"..xmlns_carbons..":enable", toggle_carbons); |
23 | 24 |
24 -- COMPAT | 25 -- COMPAT |