mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-24 21:51:41 +08:00
15 lines
393 B
Ruby
Vendored
15 lines
393 B
Ruby
Vendored
# frozen_string_literal: true
|
|
|
|
class DiscourseChatIntegration::RuleSerializer < ApplicationSerializer
|
|
attributes :id, :channel_id, :type, :group_id, :group_name, :category_id, :tags, :filter
|
|
|
|
def group_name
|
|
if object.group_id
|
|
if group = Group.find_by(id: object.group_id)
|
|
group.name
|
|
else
|
|
I18n.t("chat_integration.deleted_group")
|
|
end
|
|
end
|
|
end
|
|
end
|