1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-06-18 10:33:11 +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
web/src/app

View file

@ -22,7 +22,7 @@ class Notifier {
if (notification.click) {
n.onclick = (e) => openUrl(notification.click);
} else {
n.onclick = onClickFallback;
n.onclick = () => onClickFallback(subscription);
}
// Play sound
@ -51,6 +51,9 @@ class Notifier {
}
async shouldNotify(subscription, notification) {
if (subscription.mutedUntil === 1) {
return false;
}
const priority = (notification.priority) ? notification.priority : 3;
const minPriority = await prefs.minPriority();
if (priority < minPriority) {