mirror of
https://github.com/discourse/discourse.git
synced 2026-08-17 16:35:03 -05:00
DEV: Remove experimental site setting for chat threads (#22720)
We are removing the experimental site setting. Admins can now decide on a per channel basis to enable/disable threading. It's disabled by default.
This commit is contained in:
@@ -233,20 +233,8 @@ describe Chat::MessageSerializer do
|
||||
describe "threading data" do
|
||||
before { message_1.update!(thread: Fabricate(:chat_thread, channel: chat_channel)) }
|
||||
|
||||
context "when enable_experimental_chat_threaded_discussions is disabled" do
|
||||
before { SiteSetting.enable_experimental_chat_threaded_discussions = false }
|
||||
|
||||
it "does not include thread data" do
|
||||
serialized = described_class.new(message_1, scope: guardian, root: nil).as_json
|
||||
expect(serialized).not_to have_key(:thread_id)
|
||||
end
|
||||
end
|
||||
|
||||
context "when the channel has threading_enabled false" do
|
||||
before do
|
||||
SiteSetting.enable_experimental_chat_threaded_discussions = true
|
||||
chat_channel.update!(threading_enabled: false)
|
||||
end
|
||||
before { chat_channel.update!(threading_enabled: false) }
|
||||
|
||||
it "does not include thread data" do
|
||||
serialized = described_class.new(message_1, scope: guardian, root: nil).as_json
|
||||
@@ -254,11 +242,8 @@ describe Chat::MessageSerializer do
|
||||
end
|
||||
end
|
||||
|
||||
context "when the channel has threading_enabled true and enable_experimental_chat_threaded_discussions is true" do
|
||||
before do
|
||||
SiteSetting.enable_experimental_chat_threaded_discussions = true
|
||||
chat_channel.update!(threading_enabled: true)
|
||||
end
|
||||
context "when the channel has threading_enabled true" do
|
||||
before { chat_channel.update!(threading_enabled: true) }
|
||||
|
||||
it "does include thread data" do
|
||||
serialized = described_class.new(message_1, scope: guardian, root: nil).as_json
|
||||
|
||||
Reference in New Issue
Block a user