mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-06-18 10:33:11 +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
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue