discourse/app/serializers/found_user_with_status_serializer.rb
2022-08-09 14:54:33 +04:00

14 lines
282 B
Ruby

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