DEV: Allow `ChatSDK.create` to take extra parameters
Currently, `ChatSDK.create` restricts what parameters can be provided to the underlying service. This prevents the `discourse-ai` plugin from using it in one of its specs. This patch allows extra parameters to be provided.
This commit is contained in:
parent
789aa2d9de
commit
76aa9b66d0
|
@ -116,6 +116,7 @@ module ChatSDK
|
||||||
enforce_membership: false,
|
enforce_membership: false,
|
||||||
force_thread: false,
|
force_thread: false,
|
||||||
strip_whitespaces: true,
|
strip_whitespaces: true,
|
||||||
|
**params,
|
||||||
&block
|
&block
|
||||||
)
|
)
|
||||||
message =
|
message =
|
||||||
|
@ -131,6 +132,7 @@ module ChatSDK
|
||||||
force_thread: force_thread,
|
force_thread: force_thread,
|
||||||
strip_whitespaces: strip_whitespaces,
|
strip_whitespaces: strip_whitespaces,
|
||||||
created_by_sdk: true,
|
created_by_sdk: true,
|
||||||
|
**params,
|
||||||
) do
|
) do
|
||||||
on_model_not_found(:channel) { raise "Couldn't find channel with id: `#{channel_id}`" }
|
on_model_not_found(:channel) { raise "Couldn't find channel with id: `#{channel_id}`" }
|
||||||
on_model_not_found(:membership) do
|
on_model_not_found(:membership) do
|
||||||
|
|
Loading…
Reference in New Issue