# HG changeset patch # User Kim Alvefur # Date 1469700743 -7200 # Node ID cdfc917a8cc7e581402057c44ce549c49b9cc903 # Parent 122cb5f4930f93e820fbc598b31db6bf3235db5e mod_cloud_notify: Retrieve data form by name and namespace so unknown elements are ignored diff -r 122cb5f4930f -r cdfc917a8cc7 mod_cloud_notify/mod_cloud_notify.lua --- a/mod_cloud_notify/mod_cloud_notify.lua Thu Jul 28 12:10:09 2016 +0200 +++ b/mod_cloud_notify/mod_cloud_notify.lua Thu Jul 28 12:12:23 2016 +0200 @@ -36,11 +36,7 @@ origin.send(st.error_reply(stanza, "modify", "bad-request", "Missing jid")); return true; end - local publish_options = enable.tags[1]; - if publish_options and ( publish_options.name ~= "x" or publish_options.attr.xmlns ~= "jabber:x:data" ) then - origin.send(st.error_reply(stanza, "modify", "bad-request", "Invalid publish options")); - return true; - end + local publish_options = enable:get_child("x", "jabber:x:data"); local user_push_services = push_enabled:get(origin.username); if not user_push_services then user_push_services = {};