401 local node, user_push_services = get_push_settings(event.stanza, event.origin); |
401 local node, user_push_services = get_push_settings(event.stanza, event.origin); |
402 module:log("debug", "Invoking cloud handle_notify_request() for offline stanza"); |
402 module:log("debug", "Invoking cloud handle_notify_request() for offline stanza"); |
403 handle_notify_request(event.stanza, node, user_push_services, true); |
403 handle_notify_request(event.stanza, node, user_push_services, true); |
404 end, 1); |
404 end, 1); |
405 |
405 |
|
406 -- publish on bare groupchat |
|
407 -- this picks up MUC messages when there are no devices connected |
|
408 module:hook("message/bare/groupchat", function(event) |
|
409 module:log("debug", "Invoking cloud handle_notify_request() for bare groupchat stanza"); |
|
410 local node, user_push_services = get_push_settings(event.stanza, event.origin); |
|
411 handle_notify_request(event.stanza, node, user_push_services, true); |
|
412 end, 1); |
|
413 |
|
414 |
406 local function process_stanza_queue(queue, session, queue_type) |
415 local function process_stanza_queue(queue, session, queue_type) |
407 if not session.push_identifier then return; end |
416 if not session.push_identifier then return; end |
408 local user_push_services = {[session.push_identifier] = session.push_settings}; |
417 local user_push_services = {[session.push_identifier] = session.push_settings}; |
409 local notified = { unimportant = false; important = false } |
418 local notified = { unimportant = false; important = false } |
410 for i=1, #queue do |
419 for i=1, #queue do |