discourse/app/serializers/basic_user_with_status_serializer.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
278 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class BasicUserWithStatusSerializer < BasicUserSerializer
attributes :status
def include_status?
SiteSetting.enable_user_status && user.has_status?
end
def status
UserStatusSerializer.new(user.user_status, root: false)
end
end