Use the same notification pipeline everywhere

This means less duplication and `actions` support for all
notifications.
This commit is contained in:
nimbleghost
2023-06-14 23:20:48 +02:00
parent fa418eef16
commit b197ea3ab6
5 changed files with 102 additions and 73 deletions

View File

@@ -42,7 +42,7 @@ class SubscriptionManager {
return this.db.subscriptions.get(subscriptionId);
}
async notify(subscriptionId, notification, defaultClickAction) {
async notify(subscriptionId, notification) {
const subscription = await this.get(subscriptionId);
if (subscription.mutedUntil > 0) {
return;
@@ -53,7 +53,7 @@ class SubscriptionManager {
return;
}
await Promise.all([notifier.playSound(), notifier.notify(subscription, notification, defaultClickAction)]);
await notifier.notify(subscription, notification);
}
/**