Software /
code /
prosody-modules
Changeset
4698:4157773ed4d3
mod_cloud_notify: notify on groupchat messages sent to bare JID
author | arcseconds <arcseconds@zoho.com> |
---|---|
date | Sat, 25 Sep 2021 11:43:31 +0000 |
parents | 4697:15c335dc196e |
children | 4699:a8af632daf48 |
files | mod_cloud_notify/mod_cloud_notify.lua |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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};