2022-08-09 14:54:33 +04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class FoundUserWithStatusSerializer < FoundUserSerializer
|
2024-02-26 13:40:48 +00:00
|
|
|
include UserStatusMixin
|
2022-08-09 14:54:33 +04:00
|
|
|
|
2024-02-26 13:40:48 +00:00
|
|
|
def initialize(object, options = {})
|
|
|
|
super
|
|
|
|
options[:include_status] = true
|
2024-02-29 16:20:48 +00:00
|
|
|
deprecated
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def deprecated
|
|
|
|
message =
|
|
|
|
"FoundUserWithStatusSerializer is deprecated. " \
|
|
|
|
"Use FoundUserSerializer with the include_status option instead."
|
|
|
|
|
2024-03-14 16:36:56 +00:00
|
|
|
Discourse.deprecate(message, since: "3.3.0.beta1", drop_from: "3.3.0.beta2")
|
2022-08-09 14:54:33 +04:00
|
|
|
end
|
|
|
|
end
|