mod_cloud_notify: Fix traceback for clients without a stable client_id
authorMatthew Wild <mwild1@gmail.com>
Tue, 19 Oct 2021 11:05:13 +0100
changeset 4722 6e3254e13fb7
parent 4721 f4f07891c4cc
child 4723 5a06c711649c
mod_cloud_notify: Fix traceback for clients without a stable client_id
mod_cloud_notify/mod_cloud_notify.lua
--- a/mod_cloud_notify/mod_cloud_notify.lua	Mon Oct 18 15:42:37 2021 +0200
+++ b/mod_cloud_notify/mod_cloud_notify.lua	Tue Oct 19 11:05:13 2021 +0100
@@ -189,7 +189,7 @@
 		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;
+		resource = not origin.client_id and origin.resource or nil;
 		language = stanza.attr["xml:lang"];
 	};
 	local allow_registration = module:fire_event("cloud_notify/registration", {