From 209d69ac66e7aa29e977f3c62d26b6cc2a676b42 Mon Sep 17 00:00:00 2001 From: Dan Cunningham Date: Sun, 14 Jul 2024 10:55:40 -0700 Subject: [PATCH 1/2] Change the title to "hide notification" if the message is a hide type Signed-off-by: Dan Cunningham --- views/notifications.ejs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/views/notifications.ejs b/views/notifications.ejs index a2c1b5f8..6413bc22 100644 --- a/views/notifications.ejs +++ b/views/notifications.ejs @@ -36,8 +36,9 @@ WhenWhat <% for (var i=0; i + <% const title = notifications[i].payload && notifications[i].payload.type === 'notification' ? notifications[i].message : '(Hide Notification)'%> <%= date_util(notifications[i].created, timeZone).toRelativeCalendar() %> - <%= notifications[i].message %> + <%= title %> <% } %> From 6c08891acf376d4eb4e281b92e4a6fac9b01a9c2 Mon Sep 17 00:00:00 2001 From: Dan Cunningham Date: Sun, 14 Jul 2024 10:58:48 -0700 Subject: [PATCH 2/2] switch order of operations Signed-off-by: Dan Cunningham --- views/notifications.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/notifications.ejs b/views/notifications.ejs index 6413bc22..2790b31b 100644 --- a/views/notifications.ejs +++ b/views/notifications.ejs @@ -36,7 +36,7 @@ WhenWhat <% for (var i=0; i - <% const title = notifications[i].payload && notifications[i].payload.type === 'notification' ? notifications[i].message : '(Hide Notification)'%> + <% const title = notifications[i].payload && notifications[i].payload.type === 'hideNotification' ? '(Hide Notification)' : notifications[i].message %> <%= date_util(notifications[i].created, timeZone).toRelativeCalendar() %> <%= title %>