mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 20:24:05 -06:00
6c1c8be794
This introduces a new model to store the avatars and 3 uploads per user (gravatar, system and custom) user can then pick which they want.
25 lines
404 B
Ruby
25 lines
404 B
Ruby
class TopicPostCountSerializer < BasicUserSerializer
|
|
|
|
attributes :post_count
|
|
|
|
def id
|
|
object[:user].id
|
|
end
|
|
|
|
def username
|
|
object[:user].username
|
|
end
|
|
|
|
def post_count
|
|
object[:post_count]
|
|
end
|
|
|
|
def uploaded_avatar_id
|
|
object[:user].uploaded_avatar_id
|
|
end
|
|
|
|
def include_uploaded_avatar_id?
|
|
SiteSetting.allow_uploaded_avatars? && object[:user].use_uploaded_avatar
|
|
end
|
|
end
|