diff options
| author | Adam Soltys <[email protected]> | 2026-02-24 13:18:42 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-02-24 13:18:42 -0800 |
| commit | ad7b09b43323d0ffc0a8ddabb43e4838a184c697 (patch) | |
| tree | fbf2a59f81771b2938f474c8e7b35a497d2960e4 /lib/notifications.ts | |
| parent | 9e97e040617bfa0b40150c0eba298bf186bbeeaf (diff) | |
| download | coinos-server-ad7b09b43323d0ffc0a8ddabb43e4838a184c697.tar.gz coinos-server-ad7b09b43323d0ffc0a8ddabb43e4838a184c697.zip | |
formatting
Diffstat (limited to 'lib/notifications.ts')
| -rw-r--r-- | lib/notifications.ts | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/lib/notifications.ts b/lib/notifications.ts index d1e43392..261ad4bb 100644 --- a/lib/notifications.ts +++ b/lib/notifications.ts @@ -12,11 +12,7 @@ import { finalizeEvent, nip04 } from "nostr-tools"; import webpush from "web-push"; if (config.vapid) { - webpush.setVapidDetails( - `mailto:${config.support}`, - config.vapid.pk, - config.vapid.sk, - ); + webpush.setVapidDetails(`mailto:${config.support}`, config.vapid.pk, config.vapid.sk); } export const notify = async (p, user, withdrawal) => { @@ -62,12 +58,10 @@ export const notify = async (p, user, withdrawal) => { }; for (const s of subscriptions) { - webpush - .sendNotification(JSON.parse(s), JSON.stringify(payload)) - .catch((e) => { - warn("sub failed", e.message); - db.sRem(`${user.id}:subscriptions`, s); - }); + webpush.sendNotification(JSON.parse(s), JSON.stringify(payload)).catch((e) => { + warn("sub failed", e.message); + db.sRem(`${user.id}:subscriptions`, s); + }); } if (config.mqtt) { |
