aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2020-05-26 00:22:15 +0300
committerHenry Jameson <me@hjkos.com>2020-05-26 00:22:15 +0300
commit83e5ee549472591b782c36d2321aceec0547cf18 (patch)
tree0232de71daee0bc18e44459d8e269ace6c9bab3b
parentb5c1d074f83d08473a19a3885f6ff5eeb95274e5 (diff)
fix non-mention notifs
-rw-r--r--src/modules/statuses.js19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/modules/statuses.js b/src/modules/statuses.js
index f73fde25..c809cf1c 100644
--- a/src/modules/statuses.js
+++ b/src/modules/statuses.js
@@ -381,13 +381,18 @@ const addNewNotifications = (state, { dispatch, notifications, older, visibleNot
notifObj.image = status.attachments[0].url
}
- if (
- !notification.seen &&
- !state.notifications.desktopNotificationSilence &&
- visibleNotificationTypes.includes(notification.type) &&
- !status.muted &&
- muteWordHits(status, rootGetters.mergedConfig.muteWords).length === 0
- ) {
+ const reasonsToMuteNotif = (
+ notification.seen ||
+ state.notifications.desktopNotificationSilence ||
+ !visibleNotificationTypes.includes(notification.type) ||
+ (
+ status && (
+ status.muted ||
+ muteWordHits(status, rootGetters.mergedConfig.muteWords).length === 0
+ )
+ )
+ )
+ if (!reasonsToMuteNotif) {
let desktopNotification = new window.Notification(title, notifObj)
// Chrome is known for not closing notifications automatically
// according to MDN, anyway.