comparison mod_cloud_notify/mod_cloud_notify.lua @ 2258:3abc51faf945

mod_cloud_notify: Log message if no dataform is found
author Kim Alvefur <zash@zash.se>
date Thu, 28 Jul 2016 12:35:57 +0200
parents f84b51f9aa82
children e0808be13d77
comparison
equal deleted inserted replaced
2257:f84b51f9aa82 2258:3abc51faf945
36 origin.log("debug", "Push notification enable request missing the 'jid' field"); 36 origin.log("debug", "Push notification enable request missing the 'jid' field");
37 origin.send(st.error_reply(stanza, "modify", "bad-request", "Missing jid")); 37 origin.send(st.error_reply(stanza, "modify", "bad-request", "Missing jid"));
38 return true; 38 return true;
39 end 39 end
40 local publish_options = enable:get_child("x", "jabber:x:data"); 40 local publish_options = enable:get_child("x", "jabber:x:data");
41 if not publish_options then
42 -- Could be intentional
43 origin.log("debug", "No publish options in request");
44 end
41 local user_push_services = push_enabled:get(origin.username); 45 local user_push_services = push_enabled:get(origin.username);
42 if not user_push_services then 46 if not user_push_services then
43 user_push_services = {}; 47 user_push_services = {};
44 end 48 end
45 user_push_services[push_jid .. "<" .. (push_node or "")] = { 49 user_push_services[push_jid .. "<" .. (push_node or "")] = {