mirror of
https://github.com/flarum/core.git
synced 2025-10-19 10:46:06 +02:00
Return both unread and new notification count from the API
Related to #500.
This commit is contained in:
@@ -23,6 +23,7 @@ class CurrentUserSerializer extends UserSerializer
|
||||
$attributes += [
|
||||
'readTime' => $user->read_time ? $user->read_time->toRFC3339String() : null,
|
||||
'unreadNotificationsCount' => $user->getUnreadNotificationsCount(),
|
||||
'newNotificationsCount' => $user->getNewNotificationsCount(),
|
||||
'preferences' => $user->preferences
|
||||
];
|
||||
}
|
||||
|
Reference in New Issue
Block a user