mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 12:34:34 +08:00
FEATURE: Actually show more notifications
The "Show more notifications..." link in the notifications dropdown now links to /my/notifications, which is a historical view of all notifications you have recieved. Notification history is loaded in blocks of 60 at a time. Admins can see others' notification history. (This was requested for 'debugging purposes', though that's what impersonation is for, IMO.)
This commit is contained in:
@ -43,6 +43,7 @@ class UserSerializer < BasicUserSerializer
|
||||
:suspended_till,
|
||||
:uploaded_avatar_id,
|
||||
:badge_count,
|
||||
:unread_notification_count,
|
||||
:has_title_badges,
|
||||
:edit_history_public,
|
||||
:custom_fields
|
||||
@ -76,6 +77,7 @@ class UserSerializer < BasicUserSerializer
|
||||
:tracked_category_ids,
|
||||
:watched_category_ids,
|
||||
:private_messages_stats,
|
||||
:unread_notification_count,
|
||||
:disable_jump_reply,
|
||||
:gravatar_avatar_upload_id,
|
||||
:custom_avatar_upload_id,
|
||||
@ -242,6 +244,10 @@ class UserSerializer < BasicUserSerializer
|
||||
object.badges.where(allow_title: true).count > 0
|
||||
end
|
||||
|
||||
def unread_notification_count
|
||||
Notification.where(user_id: object.id, read: false).count
|
||||
end
|
||||
|
||||
def include_edit_history_public?
|
||||
can_edit && !SiteSetting.edit_history_visible_to_public
|
||||
end
|
||||
|
Reference in New Issue
Block a user