1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-06-02 19:35:53 +02:00

Mute button

This commit is contained in:
Philipp Heckel 2022-03-08 16:56:41 -05:00
parent d3462d2905
commit 60980df26b
4 changed files with 35 additions and 21 deletions

View file

@ -23,6 +23,7 @@ class SubscriptionManager {
baseUrl: baseUrl,
topic: topic,
ephemeral: ephemeral,
mutedUntil: 0,
last: null
};
await db.subscriptions.put(subscription);
@ -108,6 +109,12 @@ class SubscriptionManager {
.modify({new: 0});
}
async setMutedUntil(subscriptionId, mutedUntil) {
await db.subscriptions.update(subscriptionId, {
mutedUntil: mutedUntil
});
}
async pruneNotifications(thresholdTimestamp) {
await db.notifications
.where("time").below(thresholdTimestamp)