Changeset

2050:49cc6a555dc7

mod_cloud_notify: Wrap form in namespaced element per the XEP (fixes #630)
author Kim Alvefur <zash@zash.se>
date Thu, 18 Feb 2016 22:37:50 +0100
parents 2049:50c188cf0ae3
children 2051:cb0fc00a7086
files mod_cloud_notify/mod_cloud_notify.lua
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_cloud_notify/mod_cloud_notify.lua	Mon Feb 15 23:56:12 2016 +0100
+++ b/mod_cloud_notify/mod_cloud_notify.lua	Thu Feb 18 22:37:50 2016 +0100
@@ -92,6 +92,7 @@
 			:tag("pubsub", { xmlns = "http://jabber.org/protocol/pubsub" })
 				:tag("publish", { node = push_node })
 					:tag("item");
+						:tag("notification", { xmlns = xmlns_push });
 		local form_data = {
 			["message-count"] = tostring(push_info.count);
 		};
@@ -102,6 +103,7 @@
 			form_data["last-message-body"] = stanza:get_child_text("body");
 		end
 		push_publish:add_child(push_form:form(form_data));
+		push_publish:up(); -- / notification
 		push_publish:up(); -- / publish
 		push_publish:up(); -- / pubsub
 		if push_info.options then