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

@ -49,6 +49,15 @@ describe Chat::ChatNotifier do
expect(to_notify[list_key]).to be_empty
end
it "will never mention when channel is not accepting channel wide mentions" do
channel.update!(allow_channel_wide_mentions: false)
msg = build_cooked_msg(mention, user_1)
to_notify = described_class.new(msg, msg.created_at).notify_new
expect(to_notify[list_key]).to be_empty
end
it "includes all members of a channel except the sender" do
msg = build_cooked_msg(mention, user_1)