forked from trent_larson/crowd-funder-for-time-pwa
finish separation of daily reminder message, bump version to 0.3.34
This commit is contained in:
@@ -364,6 +364,11 @@ export const getPasskeyExpirationSeconds = async (): Promise<number> => {
|
||||
);
|
||||
};
|
||||
|
||||
// These are shared with the service worker and should be a constant. Look for the same name in additional-scripts.js
|
||||
export const DAILY_CHECK_TITLE = "DAILY_CHECK";
|
||||
// This is a special value that tells the service worker to send a direct notification to the device, skipping filters.
|
||||
export const DIRECT_PUSH_TITLE = "DIRECT_NOTIFICATION";
|
||||
|
||||
export const sendTestThroughPushServer = async (
|
||||
subscriptionJSON: PushSubscriptionJSON,
|
||||
skipFilter: boolean,
|
||||
@@ -374,16 +379,12 @@ export const sendTestThroughPushServer = async (
|
||||
pushUrl = settings.webPushServer;
|
||||
}
|
||||
|
||||
// This is shared with the service worker and should be a constant. Look for the same name in additional-scripts.js
|
||||
// This is a special value that tells the service worker to send a direct notification to the device, skipping filters.
|
||||
// Use something other than "Daily Update" https://gitea.anomalistdesign.com/trent_larson/py-push-server/src/commit/3c0e196c11bc98060ec5934e99e7dbd591b5da4d/app.py#L213
|
||||
const DIRECT_PUSH_TITLE = "DIRECT_NOTIFICATION";
|
||||
|
||||
const newPayload = {
|
||||
...subscriptionJSON,
|
||||
// ... overridden with the following
|
||||
// eslint-disable-next-line prettier/prettier
|
||||
message: `Test, where you will see this message ${ skipFilter ? "un" : "" }filtered.`,
|
||||
title: skipFilter ? DIRECT_PUSH_TITLE : "Your Web Push",
|
||||
...subscriptionJSON,
|
||||
};
|
||||
console.log("Sending a test web push message:", newPayload);
|
||||
const payloadStr = JSON.stringify(newPayload);
|
||||
|
||||
Reference in New Issue
Block a user