From 582cb35ae4fed24edf935950788ee7537174f252 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 10 Feb 2023 19:15:14 +0100 Subject: [PATCH] Fix allow time to answer notification permission --- htdocs/core/js/lib_notification.js.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/js/lib_notification.js.php b/htdocs/core/js/lib_notification.js.php index 2659b812bc6..9724dc8c447 100644 --- a/htdocs/core/js/lib_notification.js.php +++ b/htdocs/core/js/lib_notification.js.php @@ -96,7 +96,7 @@ function first_execution() { console.log("Call first_execution of check_events()"); result = check_events(); //one check before setting the new time for other checks if (result > 0) { - console.log("Program a repeated run with a time_auto_update = MAIN_BROWSER_NOTIFICATION_FREQUENCY = "+time_auto_update+"s"); + console.log("check_events() is scheduled as a repeated task with a time_auto_update = MAIN_BROWSER_NOTIFICATION_FREQUENCY = "+time_auto_update+"s"); dolnotif_idinterval = setInterval(check_events, time_auto_update * 1000); // Set new time to run next check events. time_auto_update=nb of seconds } } @@ -204,7 +204,7 @@ function check_events() { } else { console.log("Cancel check_events and timer. Useless because javascript Notification.permission is "+Notification.permission+" (blocked manualy or web site is not https)."); - return 0; + return 2; // We return a positive so the repeated check will done even if authroization is not yet allowed may be after this check) } }