--- a/mod_http_admin_api/mod_http_admin_api.lua Tue Apr 23 12:10:38 2024 +0100
+++ b/mod_http_admin_api/mod_http_admin_api.lua Wed Apr 24 13:47:48 2024 +0100
@@ -799,9 +799,13 @@
if body.recipients == "online" then
announce.send_to_online(message, host);
elseif body.recipients == "all" then
- for username in usermanager.users(host) do
- message.attr.to = username .. "@" .. host
- module:send(st.clone(message))
+ if announce.send_to_all then
+ announce.send_to_all(message, host);
+ else -- COMPAT w/ 0.12 and trunk before e22609460975
+ for username in usermanager.users(host) do
+ message.attr.to = username .. "@" .. host
+ module:send(st.clone(message))
+ end
end
else
for _, addr in ipairs(body.recipients) do