Software /
code /
prosody-modules
Diff
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 |
line wrap: on
line diff
--- a/mod_cloud_notify/mod_cloud_notify.lua Sat Jun 29 19:26:08 2019 +0200 +++ b/mod_cloud_notify/mod_cloud_notify.lua Mon Jul 01 18:49:24 2019 +0200 @@ -582,11 +582,8 @@ module:hook("archive-message-added", archive_message_added); local function send_ping(event) - local push_services = event.push_services; - if not push_services then - local user = event.user; - push_services = push_store:get(user); - end + local user = event.user; + local push_services = event.push_services || push_store:get(user); handle_notify_request(nil, user, push_services, true); end -- can be used by other modules to ping one or more (or all) push endpoints