mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 08:03:38 +08:00
14 lines
282 B
Ruby
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
|