Unverified Commit 51ed7784 authored by Robin's avatar Robin Committed by GitHub
Browse files

Show a dialog when Jitsi encounters an error (#22352)

parent 359e0e20
......@@ -300,12 +300,12 @@ function createJWTToken() {
);
}
async function notifyHangup() {
async function notifyHangup(errorMessage?: string) {
if (widgetApi) {
// We send the hangup event before setAlwaysOnScreen, because the latter
// can cause the receiving side to instantly stop listening.
try {
await widgetApi.transport.send(ElementWidgetActions.HangupCall, {});
await widgetApi.transport.send(ElementWidgetActions.HangupCall, { errorMessage });
} finally {
await widgetApi.setAlwaysOnScreen(false);
}
......@@ -418,7 +418,7 @@ function joinConference(audioDevice?: string, videoDevice?: string) {
if (error.isFatal) {
// We got disconnected. Since Jitsi Meet might send us back to the
// prejoin screen, we're forced to act as if we hung up entirely.
notifyHangup();
notifyHangup(error.message);
meetApi = null;
closeConference();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment