|
|
|
@ -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.
|
|
|
|
|