mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-06-02 19:35:53 +02:00
Mute button
This commit is contained in:
parent
d3462d2905
commit
60980df26b
4 changed files with 35 additions and 21 deletions
web/src/app
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue