Comparison

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
comparison
equal deleted inserted replaced
4715:92714a41cc0c 4716:8b3e91249cff
186 jid = push_jid; 186 jid = push_jid;
187 node = push_node; 187 node = push_node;
188 include_payload = include_payload; 188 include_payload = include_payload;
189 options = publish_options and st.preserialize(publish_options); 189 options = publish_options and st.preserialize(publish_options);
190 timestamp = os_time(); 190 timestamp = os_time();
191 client = { 191 client_id = origin.client_id;
192 id = origin.client_id; 192 resource = not origin.client_id and origin.jid.resource(origin.full_jid) or nil;
193 resource = not origin.client_id and origin.jid.resource(origin.full_jid) or nil; 193 language = stanza.attr["xml:lang"];
194 language = stanza.attr["xml:lang"];
195 };
196 }; 194 };
197 local allow_registration = module:fire_event("cloud_notify/registration", { 195 local allow_registration = module:fire_event("cloud_notify/registration", {
198 origin = origin, stanza = stanza, push_info = push_service; 196 origin = origin, stanza = stanza, push_info = push_service;
199 }); 197 });
200 if allow_registration == false then 198 if allow_registration == false then