aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/notifications_panel.php
diff options
context:
space:
mode:
authorwinter2025-03-21 21:29:53 +0000
committerwinter2025-03-21 21:29:53 +0000
commit9a6a54e2d6a6f7bff8ca5467c8a2680f4ad735fb (patch)
treee3ad375ec978eadfef4df1719cd89877128109db /templates/notifications_panel.php
parent5e8fa866d9c390e8f364ae9de8cd94bb5a832751 (diff)
add timestamps to notifications
Diffstat (limited to 'templates/notifications_panel.php')
-rw-r--r--templates/notifications_panel.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/templates/notifications_panel.php b/templates/notifications_panel.php
index 574a295..4a671b1 100644
--- a/templates/notifications_panel.php
+++ b/templates/notifications_panel.php
@@ -12,8 +12,8 @@ $notifications = Notification::findAllForUser($user, 50);
if (count($notifications) <= 0) {
call_template('placeholder_text');
}
- foreach ($notifications as $notif) {
- $notif = $notif->toNotifyable();
+ foreach ($notifications as $notification) {
+ $notif = $notification->toNotifyable();
if ($notif == null)
continue;
call_template('notification', [
@@ -21,7 +21,8 @@ $notifications = Notification::findAllForUser($user, 50);
'body' => $notif->getNotificationBody(),
'imageUrl' => $notif->getNotificationImageUrl(),
'titleLink' => $notif->getNotificationTitleLink(),
- 'imageLink' => $notif->getNotificationImageLink()
+ 'imageLink' => $notif->getNotificationImageLink(),
+ 'timestamp' => $notification->created
]);
}
?>