mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: channels can allow/disallow @all/@here mentions (#19317)
The settings tab of each category channel should now present the option to allow or disallow channel wide mentions: @here and @all. When disallowed, using these mentions in the channel should have no effect.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
CHAT_CHANNEL_EDITABLE_PARAMS = %i[name description]
|
||||
CATEGORY_CHAT_CHANNEL_EDITABLE_PARAMS = %i[auto_join_users]
|
||||
CATEGORY_CHAT_CHANNEL_EDITABLE_PARAMS = %i[auto_join_users allow_channel_wide_mentions]
|
||||
|
||||
class Chat::Api::ChatChannelsController < Chat::Api
|
||||
def index
|
||||
|
||||
@@ -121,24 +121,25 @@ end
|
||||
#
|
||||
# Table name: chat_channels
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# chatable_id :integer not null
|
||||
# deleted_at :datetime
|
||||
# deleted_by_id :integer
|
||||
# featured_in_category_id :integer
|
||||
# delete_after_seconds :integer
|
||||
# chatable_type :string not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# name :string
|
||||
# description :text
|
||||
# status :integer default("open"), not null
|
||||
# user_count :integer default(0), not null
|
||||
# last_message_sent_at :datetime not null
|
||||
# auto_join_users :boolean default(FALSE), not null
|
||||
# user_count_stale :boolean default(FALSE), not null
|
||||
# slug :string
|
||||
# type :string
|
||||
# id :bigint not null, primary key
|
||||
# chatable_id :integer not null
|
||||
# deleted_at :datetime
|
||||
# deleted_by_id :integer
|
||||
# featured_in_category_id :integer
|
||||
# delete_after_seconds :integer
|
||||
# chatable_type :string not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# name :string
|
||||
# description :text
|
||||
# status :integer default("open"), not null
|
||||
# user_count :integer default(0), not null
|
||||
# last_message_sent_at :datetime not null
|
||||
# auto_join_users :boolean default(FALSE), not null
|
||||
# allow_channel_wide_mentions :boolean default(TRUE), not null
|
||||
# user_count_stale :boolean default(FALSE), not null
|
||||
# slug :string
|
||||
# type :string
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
class ChatChannelSerializer < ApplicationSerializer
|
||||
attributes :id,
|
||||
:auto_join_users,
|
||||
:allow_channel_wide_mentions,
|
||||
:chatable,
|
||||
:chatable_id,
|
||||
:chatable_type,
|
||||
|
||||
Reference in New Issue
Block a user