comparison mod_firewall/actions.lib.lua @ 2996:0fb95dc11bc8

mod_firewall: Handle unsubcription action correctly (fixes #1119)
author Kim Alvefur <zash@zash.se>
date Wed, 04 Apr 2018 21:40:08 +0200
parents b8f2e86df7ce
children 68842409f4e7
comparison
equal deleted inserted replaced
2995:032589c801d7 2996:0fb95dc11bc8
227 value = meta(("%q"):format(value), meta_deps); 227 value = meta(("%q"):format(value), meta_deps);
228 return ("list_%s:add(%s);"):format(list_name, value), { "list:"..list_name, unpack(meta_deps) }; 228 return ("list_%s:add(%s);"):format(list_name, value), { "list:"..list_name, unpack(meta_deps) };
229 end 229 end
230 230
231 function action_handlers.UNSUBSCRIBE_SENDER() 231 function action_handlers.UNSUBSCRIBE_SENDER()
232 return "rostermanager.unsubscribed(to_node, to_host, bare_from)", 232 return "rostermanager.unsubscribed(to_node, to_host, bare_from);\
233 { "rostermanager", "split_to", "bare_to", "bare_from" }; 233 rostermanager.roster_push(to_node, to_host, bare_from);\
234 core_post_stanza(session, st.presence({ from = bare_to, to = bare_from, type = \"unsubscribed\" }));",
235 { "rostermanager", "core_post_stanza", "st", "split_to", "bare_to", "bare_from" };
234 end 236 end
235 237
236 return action_handlers; 238 return action_handlers;