Mercurial > prosody-modules
comparison mod_cloud_notify/mod_cloud_notify.lua @ 2257:f84b51f9aa82
mod_cloud_notify: Log message when 'jid' is missing from enable request
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 28 Jul 2016 12:34:15 +0200 |
parents | cdfc917a8cc7 |
children | 3abc51faf945 |
comparison
equal
deleted
inserted
replaced
2256:c5c583fae25d | 2257:f84b51f9aa82 |
---|---|
31 -- MUST contain a 'jid' attribute of the XMPP Push Service being enabled | 31 -- MUST contain a 'jid' attribute of the XMPP Push Service being enabled |
32 local push_jid = enable.attr.jid; | 32 local push_jid = enable.attr.jid; |
33 -- SHOULD contain a 'node' attribute | 33 -- SHOULD contain a 'node' attribute |
34 local push_node = enable.attr.node; | 34 local push_node = enable.attr.node; |
35 if not push_jid then | 35 if not push_jid then |
36 origin.log("debug", "Push notification enable request missing the 'jid' field"); | |
36 origin.send(st.error_reply(stanza, "modify", "bad-request", "Missing jid")); | 37 origin.send(st.error_reply(stanza, "modify", "bad-request", "Missing jid")); |
37 return true; | 38 return true; |
38 end | 39 end |
39 local publish_options = enable:get_child("x", "jabber:x:data"); | 40 local publish_options = enable:get_child("x", "jabber:x:data"); |
40 local user_push_services = push_enabled:get(origin.username); | 41 local user_push_services = push_enabled:get(origin.username); |