fix: don't include recipients array if not necessary

This commit is contained in:
izzy
2025-10-23 11:38:02 +01:00
parent a6f49b9f35
commit a3611e18e3
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "stoat.js",
"version": "7.3.3",
"version": "7.3.4",
"type": "module",
"exports": {
".": "./lib/index.js"
+2 -2
View File
@@ -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
});
}