diff mod_cloud_notify/mod_cloud_notify.lua @ 4980:da151f9af861

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.)
author arcseconds
date Sat, 30 Jul 2022 21:07:47 +1200
parents 487f1eb829cf
children 031e0dd90f4b
line wrap: on
line diff
--- 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;