discourse/app/serializers/user_status_serializer.rb
2023-10-05 20:41:12 +02:00

14 lines
273 B
Ruby

# frozen_string_literal: true
class UserStatusSerializer < ApplicationSerializer
attributes :description, :emoji, :ends_at, :message_bus_last_id
def ends_at
object.ends_at&.iso8601
end
def message_bus_last_id
MessageBus.last_id("/user-status")
end
end