mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +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:
@ -113,6 +113,7 @@ module ChatSDK
|
||||
upload_ids: nil,
|
||||
streaming: false,
|
||||
enforce_membership: false,
|
||||
force_thread: false,
|
||||
&block
|
||||
)
|
||||
message =
|
||||
@ -126,6 +127,7 @@ module ChatSDK
|
||||
upload_ids: upload_ids,
|
||||
streaming: streaming,
|
||||
enforce_membership: enforce_membership,
|
||||
force_thread: force_thread,
|
||||
) do
|
||||
on_model_not_found(:channel) { raise "Couldn't find channel with id: `#{channel_id}`" }
|
||||
on_model_not_found(:channel_membership) do
|
||||
|
Reference in New Issue
Block a user