# HG changeset patch # User arcseconds # Date 1632570211 0 # Node ID 4157773ed4d3e05b4c862e9fcce121edc6c904ff # Parent 15c335dc196e0dc0b92aa154b74477ce8278b1a6 mod_cloud_notify: notify on groupchat messages sent to bare JID diff -r 15c335dc196e -r 4157773ed4d3 mod_cloud_notify/mod_cloud_notify.lua --- a/mod_cloud_notify/mod_cloud_notify.lua Thu Sep 23 17:13:35 2021 +0200 +++ b/mod_cloud_notify/mod_cloud_notify.lua Sat Sep 25 11:43:31 2021 +0000 @@ -403,6 +403,15 @@ handle_notify_request(event.stanza, node, user_push_services, true); end, 1); +-- publish on bare groupchat +-- this picks up MUC messages when there are no devices connected +module:hook("message/bare/groupchat", function(event) + module:log("debug", "Invoking cloud handle_notify_request() for bare groupchat stanza"); + local node, user_push_services = get_push_settings(event.stanza, event.origin); + handle_notify_request(event.stanza, node, user_push_services, true); +end, 1); + + local function process_stanza_queue(queue, session, queue_type) if not session.push_identifier then return; end local user_push_services = {[session.push_identifier] = session.push_settings};