mirror of
https://github.com/vector-im/element-call.git
synced 2026-03-31 07:00:26 +00:00
Enable lint rules for Promise handling to discourage misuse of them.
Squashed all of Hugh's commits into one.
This commit is contained in:
@@ -36,6 +36,7 @@ export function makeActiveFocus(): LivekitFocusActive {
|
||||
};
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/require-await
|
||||
async function makePreferredLivekitFoci(
|
||||
rtcSession: MatrixRTCSession,
|
||||
livekitAlias: string,
|
||||
@@ -128,13 +129,13 @@ const widgetPostHangupProcedure = async (
|
||||
// we need to wait until the callEnded event is tracked on posthog.
|
||||
// Otherwise the iFrame gets killed before the callEnded event got tracked.
|
||||
await new Promise((resolve) => window.setTimeout(resolve, 10)); // 10ms
|
||||
widget.api.setAlwaysOnScreen(false);
|
||||
await widget.api.setAlwaysOnScreen(false);
|
||||
PosthogAnalytics.instance.logout();
|
||||
|
||||
// We send the hangup event after the memberships have been updated
|
||||
// calling leaveRTCSession.
|
||||
// We need to wait because this makes the client hosting this widget killing the IFrame.
|
||||
widget.api.transport.send(ElementWidgetActions.HangupCall, {});
|
||||
await widget.api.transport.send(ElementWidgetActions.HangupCall, {});
|
||||
};
|
||||
|
||||
export async function leaveRTCSession(
|
||||
|
||||
Reference in New Issue
Block a user