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:
Jan Cernik
2023-07-26 12:46:23 +02:00
committed by GitHub
parent d06431ba9b
commit a2eb2b0490
67 changed files with 287 additions and 653 deletions
@@ -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