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