mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-27 13:45:29 +08:00
13 lines
363 B
Ruby
Vendored
13 lines
363 B
Ruby
Vendored
# frozen_string_literal: true
|
|
|
|
require_relative "./rule_serializer"
|
|
|
|
class DiscourseChatIntegration::ChannelSerializer < ApplicationSerializer
|
|
attributes :id, :provider, :error_key, :error_info, :data, :rules
|
|
|
|
def rules
|
|
object.rules.order_by_precedence.map do |rule|
|
|
DiscourseChatIntegration::RuleSerializer.new(rule, root: false)
|
|
end
|
|
end
|
|
end
|