Software /
code /
prosody-modules
Comparison
mod_cloud_notify/mod_cloud_notify.lua @ 3626:c84bbf36c878
mod_cloud_notify: fix local variable usage
author | tmolitor <thilo@eightysoft.de> |
---|---|
date | Mon, 01 Jul 2019 18:49:24 +0200 |
parent | 3622:21f870e1ba55 |
child | 3627:9639c493f4b9 |
comparison
equal
deleted
inserted
replaced
3625:a578b4977bb0 | 3626:c84bbf36c878 |
---|---|
580 module:hook("smacks-hibernation-end", restore_session); | 580 module:hook("smacks-hibernation-end", restore_session); |
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 push_services = event.push_services; | 585 local user = event.user; |
586 if not push_services then | 586 local push_services = event.push_services || push_store:get(user); |
587 local user = event.user; | |
588 push_services = push_store:get(user); | |
589 end | |
590 handle_notify_request(nil, user, push_services, true); | 587 handle_notify_request(nil, user, push_services, true); |
591 end | 588 end |
592 -- 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 |
593 module:hook("cloud-notify-ping", send_ping); | 590 module:hook("cloud-notify-ping", send_ping); |
594 | 591 |