mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05: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.
24 lines
404 B
Ruby
24 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
|