mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: add private messages counters in user activity feed
This commit is contained in:
@@ -69,7 +69,8 @@ class UserSerializer < BasicUserSerializer
|
||||
:uploaded_avatar_template,
|
||||
:muted_category_ids,
|
||||
:tracked_category_ids,
|
||||
:watched_category_ids
|
||||
:watched_category_ids,
|
||||
:private_messages_stats
|
||||
|
||||
|
||||
def auto_track_topics_after_msecs
|
||||
@@ -131,6 +132,10 @@ class UserSerializer < BasicUserSerializer
|
||||
CategoryUser.lookup(object, :watching).pluck(:category_id)
|
||||
end
|
||||
|
||||
def private_messages_stats
|
||||
UserAction.private_messages_stats(object.id, scope)
|
||||
end
|
||||
|
||||
def bio_cooked
|
||||
object.bio_processed
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user