mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08: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:
@ -238,15 +238,13 @@ after_initialize do
|
||||
add_to_serializer(:current_user, :chat_channels) do
|
||||
structured = Chat::ChannelFetcher.structured(self.scope)
|
||||
|
||||
if SiteSetting.enable_experimental_chat_threaded_discussions
|
||||
structured[:unread_thread_overview] = ::Chat::TrackingStateReportQuery.call(
|
||||
guardian: self.scope,
|
||||
channel_ids: structured[:public_channels].map(&:id),
|
||||
include_threads: true,
|
||||
include_read: false,
|
||||
include_last_reply_details: true,
|
||||
).thread_unread_overview_by_channel
|
||||
end
|
||||
structured[:unread_thread_overview] = ::Chat::TrackingStateReportQuery.call(
|
||||
guardian: self.scope,
|
||||
channel_ids: structured[:public_channels].map(&:id),
|
||||
include_threads: true,
|
||||
include_read: false,
|
||||
include_last_reply_details: true,
|
||||
).thread_unread_overview_by_channel
|
||||
|
||||
Chat::ChannelIndexSerializer.new(structured, scope: self.scope, root: false).as_json
|
||||
end
|
||||
|
Reference in New Issue
Block a user