Software /
code /
prosody-modules
Changeset
2255:cdfc917a8cc7
mod_cloud_notify: Retrieve data form by name and namespace so unknown elements are ignored
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 28 Jul 2016 12:12:23 +0200 |
parents | 2254:122cb5f4930f |
children | 2256:c5c583fae25d |
files | mod_cloud_notify/mod_cloud_notify.lua |
diffstat | 1 files changed, 1 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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 = {};