replaced 'session' with 'origin' in push_disable
authorarcseconds
Sat, 30 Jul 2022 21:07:47 +1200
changeset 4984 da151f9af861
parent 4983 8f77452abc59
child 4985 f0fe95f9e21c
replaced 'session' with 'origin' in push_disable session is not defined in this function, trying to access it leads to an error. The correct reference seems to be 'origin'. (This may have come about by copying from the similar code in process_stanza_queue.)
mod_cloud_notify/mod_cloud_notify.lua
--- a/mod_cloud_notify/mod_cloud_notify.lua	Fri Jul 29 17:53:56 2022 +0200
+++ b/mod_cloud_notify/mod_cloud_notify.lua	Sat Jul 30 21:07:47 2022 +1200
@@ -239,10 +239,10 @@
 				origin.push_settings = nil;
 				origin.first_hibernated_push = nil;
 				-- check for prosody 0.12 mod_smacks
-				if session.hibernating_watchdog and session.original_smacks_callback and session.original_smacks_timeout then
+				if origin.hibernating_watchdog and origin.original_smacks_callback and origin.original_smacks_timeout then
 					-- restore old smacks watchdog
-					session.hibernating_watchdog:cancel();
-					session.hibernating_watchdog = watchdog.new(session.original_smacks_timeout, session.original_smacks_callback);
+					origin.hibernating_watchdog:cancel();
+					origin.hibernating_watchdog = watchdog.new(origin.original_smacks_timeout, origin.original_smacks_callback);
 				end
 			end
 			user_push_services[key] = nil;