Skip to content

Commit a3611e1

Browse files
committed
fix: don't include recipients array if not necessary
1 parent a6f49b9 commit a3611e1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "stoat.js",
3-
"version": "7.3.3",
3+
"version": "7.3.4",
44
"type": "module",
55
"exports": {
66
".": "./lib/index.js"

src/classes/Channel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -802,11 +802,11 @@ export class Channel {
802802
* @param recipients Ring targets
803803
* @returns LiveKit URL and Token
804804
*/
805-
async joinCall(node?: string, forceDisconnect = true, recipients: (User | string)[] = []) {
805+
async joinCall(node?: string, forceDisconnect = true, recipients?: (User | string)[]) {
806806
return await this.#collection.client.api.post(
807807
`/channels/${this.id as ''}/join_call`, {
808808
node,
809-
recipients: recipients.map(entry => typeof entry === 'string' ? entry : entry.id),
809+
recipients: recipients?.map(entry => typeof entry === 'string' ? entry : entry.id),
810810
force_disconnect: forceDisconnect
811811
});
812812
}

0 commit comments

Comments
 (0)