mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-08 20:09:19 +00:00
Merge pull request #3057 from element-hq/robin/backport-return-to-lobby
Backport "Avoid closing the widget in returnToLobby mode" to v0.7
This commit is contained in:
@@ -17,6 +17,7 @@ import {
|
|||||||
import { PosthogAnalytics } from "./analytics/PosthogAnalytics";
|
import { PosthogAnalytics } from "./analytics/PosthogAnalytics";
|
||||||
import { Config } from "./config/Config";
|
import { Config } from "./config/Config";
|
||||||
import { ElementWidgetActions, WidgetHelpers, widget } from "./widget";
|
import { ElementWidgetActions, WidgetHelpers, widget } from "./widget";
|
||||||
|
import { getUrlParams } from "./UrlParams";
|
||||||
|
|
||||||
const FOCI_WK_KEY = "org.matrix.msc4143.rtc_foci";
|
const FOCI_WK_KEY = "org.matrix.msc4143.rtc_foci";
|
||||||
|
|
||||||
@@ -144,10 +145,12 @@ const widgetPostHangupProcedure = async (
|
|||||||
// of Element Call will do, we additionally send a close action (even though
|
// of Element Call will do, we additionally send a close action (even though
|
||||||
// we're not yet employing the distinction between 'hangup' and 'close' to
|
// we're not yet employing the distinction between 'hangup' and 'close' to
|
||||||
// display error screens)
|
// display error screens)
|
||||||
try {
|
if (!getUrlParams().returnToLobby) {
|
||||||
await widget.api.transport.send(ElementWidgetActions.Close, {});
|
try {
|
||||||
} catch (e) {
|
await widget.api.transport.send(ElementWidgetActions.Close, {});
|
||||||
logger.error("Failed to send close action", e);
|
} catch (e) {
|
||||||
|
logger.error("Failed to send close action", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user