mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 23:41:04 +08:00
FIX: allows listing messages of any thread (#27259)
Before this fix we could only list messages of a thread if it was part of a `threading_enabled` channel or if the thread was set to `force`. Due to our design of also using a thread id when this is just a chain of replies so we can switch from threading enabled to disabled at any time, we will allow `Chat:: ListChannelThreadMessages` to list the messages of any thread, the only important requirements are: - having a thread id - being able to access this thread To allow this, this commit simply removes the check on `threading_enabled` or `force`.
This commit is contained in:
@ -86,9 +86,6 @@ module ChatSDK
|
||||
on_success { result.messages }
|
||||
on_failed_policy(:can_view_thread) { raise "Guardian can't view thread" }
|
||||
on_failed_policy(:target_message_exists) { raise "Target message doesn't exist" }
|
||||
on_failed_policy(:ensure_thread_enabled) do
|
||||
raise "Threading is not enabled for this channel"
|
||||
end
|
||||
on_failure { raise "Unexpected error" }
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user