Mercurial > prosody-modules
diff mod_cloud_notify/mod_cloud_notify.lua @ 2252:a96f2d0f8750
mod_cloud_notify: Add some logging when a client attempts to enable push notifications
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 26 Jul 2016 13:08:44 +0200 |
parents | d09014d8c901 |
children | 97ebd28a8a75 |
line wrap: on
line diff
--- a/mod_cloud_notify/mod_cloud_notify.lua Tue Jul 26 12:37:04 2016 +0200 +++ b/mod_cloud_notify/mod_cloud_notify.lua Tue Jul 26 13:08:44 2016 +0200 @@ -26,6 +26,7 @@ -- http://xmpp.org/extensions/xep-0357.html#enabling module:hook("iq-set/self/"..xmlns_push..":enable", function (event) local origin, stanza = event.origin, event.stanza; + origin.log("debug", "Attempting to enable push notifications"); -- MUST contain a 'jid' attribute of the XMPP Push Service being enabled local push_jid = stanza.tags[1].attr.jid; -- SHOULD contain a 'node' attribute @@ -53,6 +54,7 @@ if not ok then origin.send(st.error_reply(stanza, "wait", "internal-server-error")); else + origin.log("info", "Push notifications enabled"); origin.send(st.reply(stanza)); end return true;