From 402528d97e6c46fc02727dd746fd2de3333db425 Mon Sep 17 00:00:00 2001 From: Martin Filser Date: Tue, 7 Nov 2023 19:05:11 +0100 Subject: [PATCH] notifications are now displayed correctly again --- client/components/notifications/notificationsDrawer.jade | 2 +- models/users.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/client/components/notifications/notificationsDrawer.jade b/client/components/notifications/notificationsDrawer.jade index fee6aef67..2fd2bb229 100644 --- a/client/components/notifications/notificationsDrawer.jade +++ b/client/components/notifications/notificationsDrawer.jade @@ -11,7 +11,7 @@ template(name='notificationsDrawer') a.fa.fa-times-thin.close ul.notifications each transformedProfile.notifications - +notification(activityData=activity index=dbIndex read=read) + +notification(activityData=activityObj index=dbIndex read=read) if($gt unreadNotifications 0) a.all-read {{_ 'mark-all-as-read'}} if ($and ($.Session.get 'showReadNotifications') ($gt readNotifications 0)) diff --git a/models/users.js b/models/users.js index 9afd266c0..3c48241a4 100644 --- a/models/users.js +++ b/models/users.js @@ -852,7 +852,9 @@ Users.helpers({ const notification = notifications[index]; // this preserves their db sort order for editing notification.dbIndex = index; - notification.activity = ReactiveCache.getActivity(notification.activity); + if (!notification.activityObj && typeof(notification.activity) === 'string') { + notification.activityObj = ReactiveCache.getActivity(notification.activity); + } } // this sorts them newest to oldest to match Trello's behavior notifications.reverse();