File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -795,6 +795,22 @@ export class Channel {
795795 ) ;
796796 }
797797
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+
798814 /**
799815 * Start typing in this channel
800816 * @requires `DirectMessage`, `Group`, `TextChannel`
You can’t perform that action at this time.
0 commit comments