add minute to notification scheduling & fix a bug, plus other tweaks

This commit is contained in:
2024-11-15 20:39:08 -07:00
parent bd622e19a8
commit f57d3b7707
6 changed files with 106 additions and 22 deletions

View File

@@ -63,9 +63,9 @@ self.addEventListener("push", function (event) {
// See https://gitea.anomalistdesign.com/trent_larson/py-push-server/src/commit/c1ed026662e754348a5f91542680bd4f57e5b81e/app.py#L217
const DAILY_UPDATE_TITLE = "DAILY_CHECK";
// This is a special value that tells the service worker to send a direct notification to the device, skipping filters.
// This is shared with the notification-test code and should be a constant. Look for the same name in HelpNotificationsView.vue
// Make sure it is something other than the DAILY_UPDATE_TITLE.
// This is a special value that tells the service worker to send a direct notification to the device, skipping filters.
// Make sure it is something different from the DAILY_UPDATE_TITLE.
const DIRECT_PUSH_TITLE = "DIRECT_NOTIFICATION";
let title;
@@ -133,7 +133,8 @@ self.addEventListener("notificationclick", (event) => {
// This is invoked when the user chooses this as a share_target, mapped to share-target in the manifest.
self.addEventListener("fetch", (event) => {
logConsoleAndDb("Service worker got fetch event.", event);
// Skipping this because we get so many of them, at startup and other times.
//logConsoleAndDb("Service worker got fetch event.", event);
// Bypass any regular requests not related to Web Share Target
// and also requests that are not exactly to the timesafari.app