mirror of
https://github.com/stoatchat/javascript-client-sdk.git
synced 2026-07-20 01:23:33 -04:00
fix: don't include recipients array if not necessary
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "stoat.js",
|
||||
"version": "7.3.3",
|
||||
"version": "7.3.4",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": "./lib/index.js"
|
||||
|
||||
@@ -802,11 +802,11 @@ export class Channel {
|
||||
* @param recipients Ring targets
|
||||
* @returns LiveKit URL and Token
|
||||
*/
|
||||
async joinCall(node?: string, forceDisconnect = true, recipients: (User | string)[] = []) {
|
||||
async joinCall(node?: string, forceDisconnect = true, recipients?: (User | string)[]) {
|
||||
return await this.#collection.client.api.post(
|
||||
`/channels/${this.id as ''}/join_call`, {
|
||||
node,
|
||||
recipients: recipients.map(entry => typeof entry === 'string' ? entry : entry.id),
|
||||
recipients: recipients?.map(entry => typeof entry === 'string' ? entry : entry.id),
|
||||
force_disconnect: forceDisconnect
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user