ship highest staff post number to staff

This commit is contained in:
Sam 2016-12-05 17:22:08 +11:00
parent b45fd21ed9
commit c2a17826e7
1 changed files with 4 additions and 0 deletions

View File

@ -26,6 +26,10 @@ class ListableTopicSerializer < BasicTopicSerializer
has_one :last_poster, serializer: BasicUserSerializer, embed: :objects has_one :last_poster, serializer: BasicUserSerializer, embed: :objects
def highest_post_number
(scope.is_staff? && object.highest_staff_post_number) || object.highest_post_num
end
def liked def liked
object.user_data && object.user_data.liked object.user_data && object.user_data.liked
end end