mirror of
https://github.com/discourse/discourse.git
synced 2024-12-25 01:55:58 +08:00
14 lines
278 B
Ruby
14 lines
278 B
Ruby
# 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
|