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:
Joffrey JAFFEUX
2022-12-05 17:03:51 +01:00
committed by GitHub
parent 569299b7a9
commit 68c4f16a73
23 changed files with 417 additions and 126 deletions

View File

@ -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 }