Changeset

4429:157fa4e535b0

mod_cloud_notify: Fix nesting of push form (thanks ivucica/Andrzej)
author Matthew Wild <mwild1@gmail.com>
date Fri, 05 Feb 2021 12:36:48 +0000
parents 4428:b328ca621ba6
children 4430:71c495fa03f3
files mod_cloud_notify/mod_cloud_notify.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_cloud_notify/mod_cloud_notify.lua	Thu Feb 04 20:49:02 2021 +0100
+++ b/mod_cloud_notify/mod_cloud_notify.lua	Fri Feb 05 12:36:48 2021 +0000
@@ -337,12 +337,13 @@
 				form_data["last-message-body"] = tostring(dummy_body);
 			end
 
+			push_notification_payload:add_child(push_form:form(form_data));
+
 			local push_publish = st.iq({ to = push_info.jid, from = module.host, type = "set", id = stanza_id })
 				:tag("pubsub", { xmlns = "http://jabber.org/protocol/pubsub" })
 					:tag("publish", { node = push_info.node })
 						:tag("item")
 							:add_child(push_notification_payload)
-							:add_child(push_form:form(form_data))
 						:up()
 					:up();