We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a4dac5 commit fcc8b0eCopy full SHA for fcc8b0e
1 file changed
src/classes/Channel.ts
@@ -795,6 +795,22 @@ export class Channel {
795
);
796
}
797
798
+ /**
799
+ * Join a call
800
+ * @param node Target node
801
+ * @param forceDisconnect Whether to disconnect existing call
802
+ * @param recipients Ring targets
803
+ * @returns LiveKit URL and Token
804
+ */
805
+ async joinCall(node = undefined, forceDisconnect = true, recipients: (User | string)[]) {
806
+ return await this.#collection.client.api.post(
807
+ `/channels/${this.id as ''}/join_call`, {
808
+ node,
809
+ recipients: recipients.map(entry => typeof entry === 'string' ? entry : entry.id),
810
+ force_disconnect: forceDisconnect
811
+ });
812
+ }
813
+
814
/**
815
* Start typing in this channel
816
* @requires `DirectMessage`, `Group`, `TextChannel`
0 commit comments