Fix not disconnecting from livekit session. (#1920)
Signed-off-by: Timo K <toger5@hotmail.de>
This commit is contained in:
@@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
import { MatrixRTCSession } from "matrix-js-sdk/src/matrixrtc/MatrixRTCSession";
|
||||
import { Room } from "livekit-client";
|
||||
|
||||
import { PosthogAnalytics } from "./analytics/PosthogAnalytics";
|
||||
import { LivekitFocus } from "./livekit/LivekitFocus";
|
||||
@@ -68,7 +69,9 @@ const widgetPostHangupProcedure = async (
|
||||
|
||||
export async function leaveRTCSession(
|
||||
rtcSession: MatrixRTCSession,
|
||||
livekitRoom: Room | undefined,
|
||||
): Promise<void> {
|
||||
await livekitRoom?.disconnect();
|
||||
await rtcSession.leaveRoomSession();
|
||||
if (widget) {
|
||||
await widgetPostHangupProcedure(widget);
|
||||
|
||||
Reference in New Issue
Block a user