mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 14:11:16 +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:
@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user