feat: add tomorrow weather brief notifications
This commit is contained in:
@@ -93,3 +93,13 @@ export async function sendMorningBriefNotification(preference: WarningPushSubscr
|
||||
});
|
||||
await webPush.sendNotification(preference.subscription as PushSubscription, payload);
|
||||
}
|
||||
|
||||
export async function sendTomorrowBriefNotification(preference: WarningPushSubscription, brief: WeatherBrief) {
|
||||
ensureWebPushConfigured();
|
||||
const payload = JSON.stringify({
|
||||
title: preference.language === "pl" ? "wtr.: jutro" : "wtr.: tomorrow",
|
||||
body: brief.pushBody,
|
||||
url: "/",
|
||||
});
|
||||
await webPush.sendNotification(preference.subscription as PushSubscription, payload);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user