Diff

mod_cloud_notify/mod_cloud_notify.lua @ 4716:8b3e91249cff

mod_cloud_notify: Move client info out of sub-object to improve usability with map store API
author Matthew Wild <mwild1@gmail.com>
date Mon, 18 Oct 2021 13:00:28 +0100
parent 4713:ae3a129cc296
child 4718:6e3254e13fb7
line wrap: on
line diff
--- a/mod_cloud_notify/mod_cloud_notify.lua	Mon Oct 18 12:44:29 2021 +0100
+++ b/mod_cloud_notify/mod_cloud_notify.lua	Mon Oct 18 13:00:28 2021 +0100
@@ -188,11 +188,9 @@
 		include_payload = include_payload;
 		options = publish_options and st.preserialize(publish_options);
 		timestamp = os_time();
-		client = {
-			id = origin.client_id;
-			resource = not origin.client_id and origin.jid.resource(origin.full_jid) or nil;
-			language = stanza.attr["xml:lang"];
-		};
+		client_id = origin.client_id;
+		resource = not origin.client_id and origin.jid.resource(origin.full_jid) or nil;
+		language = stanza.attr["xml:lang"];
 	};
 	local allow_registration = module:fire_event("cloud_notify/registration", {
 		origin = origin, stanza = stanza, push_info = push_service;