discourse/app/serializers/topic_post_count_serializer.rb
Sam 6c1c8be794 Work in progress, keeping avatars locally
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.
2014-05-27 10:08:03 +10:00

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