mod_cloud_notify/mod_cloud_notify.lua
changeset 3631 9639c493f4b9
parent 3630 c84bbf36c878
child 3944 675726ab06d3
equal deleted inserted replaced
3630:c84bbf36c878 3631:9639c493f4b9
   581 module:hook("smacks-ack-delayed", ack_delayed);
   581 module:hook("smacks-ack-delayed", ack_delayed);
   582 module:hook("archive-message-added", archive_message_added);
   582 module:hook("archive-message-added", archive_message_added);
   583 
   583 
   584 local function send_ping(event)
   584 local function send_ping(event)
   585 	local user = event.user;
   585 	local user = event.user;
   586 	local push_services = event.push_services || push_store:get(user);
   586 	local push_services = event.push_services or push_store:get(user);
   587 	handle_notify_request(nil, user, push_services, true);
   587 	handle_notify_request(nil, user, push_services, true);
   588 end
   588 end
   589 -- can be used by other modules to ping one or more (or all) push endpoints
   589 -- can be used by other modules to ping one or more (or all) push endpoints
   590 module:hook("cloud-notify-ping", send_ping);
   590 module:hook("cloud-notify-ping", send_ping);
   591 
   591