mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 09:08:10 +08:00
FEATURE: allows to force a thread (#25987)
Forcing a thread will work even in channel which don't have `threading_enabled` or in direct message channels. For now this feature is only available through the `ChatSDK`: ```ruby ChatSDK::Message.create(in_reply_to_id: 1, guardian: guardian, raw: "foo bar baz", channel_id: 2, force_thread: true) ```
This commit is contained in:
@ -31,6 +31,9 @@ class Chat::Api::ChannelMessagesController < Chat::ApiController
|
||||
end
|
||||
|
||||
def create
|
||||
# users can't force a thread through JSON API
|
||||
params[:force_thread] = false
|
||||
|
||||
Chat::MessageRateLimiter.run!(current_user)
|
||||
|
||||
with_service(Chat::CreateMessage) do
|
||||
|
Reference in New Issue
Block a user