feat: add tomorrow weather brief notifications

This commit is contained in:
zv
2026-06-12 22:10:22 +02:00
parent 3309e03acb
commit 7c3706c3f6
15 changed files with 414 additions and 15 deletions

View File

@@ -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);
}