mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 08:49:03 +08: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:
@ -277,6 +277,17 @@ describe Chat::Api::ChatChannelsController do
|
||||
expect(response.parsed_body).to match_response_schema("category_chat_channel")
|
||||
end
|
||||
|
||||
describe "when updating allow_channel_wide_mentions" do
|
||||
it "sets the new value" do
|
||||
put "/chat/api/chat_channels/#{chat_channel.id}.json",
|
||||
params: {
|
||||
allow_channel_wide_mentions: false,
|
||||
}
|
||||
|
||||
expect(response.parsed_body["allow_channel_wide_mentions"]).to eq(false)
|
||||
end
|
||||
end
|
||||
|
||||
describe "Updating a channel to add users automatically" do
|
||||
it "sets the channel to auto-update users automatically" do
|
||||
put "/chat/api/chat_channels/#{chat_channel.id}.json", params: { auto_join_users: true }
|
||||
|
Reference in New Issue
Block a user