Bugfix: Desktop-notifs - show notifs which have seen = false or seen = 0

2022.09-rc
rabuzarus 2017-04-09 14:24:26 +02:00
rodzic 0e177e6d5e
commit 836e0b2799
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -249,7 +249,7 @@
// Desktop Notifications
$(data.notifications.reverse()).each(function(key, e){
notification_id = parseInt(e.timestamp);
if (notification_lastitem !== null && notification_id > notification_lastitem && !e.seen) {
if (notification_lastitem !== null && notification_id > notification_lastitem && Number(e.seen) === 0) {
if (getNotificationPermission() === "granted") {
var notification = new Notification(document.title, {
body: decodeHtml(e.message.replace('→ ', '').format(e.name)),