Compare commits

...
Author SHA1 Message Date
Robin a11bcd85d0 catch errors 2025-02-24 11:43:15 +07:00
Robin c719f33337 rageshake button 2025-02-24 11:32:09 +07:00
2 changed files with 12 additions and 2 deletions
+2
View File
@@ -22,6 +22,7 @@ import { Initializer } from "./initializer";
import { MediaDevicesProvider } from "./livekit/MediaDevicesContext"; import { MediaDevicesProvider } from "./livekit/MediaDevicesContext";
import { widget } from "./widget"; import { widget } from "./widget";
import { useTheme } from "./useTheme"; import { useTheme } from "./useTheme";
import { RageshakeButton } from "./settings/RageshakeButton";
const SentryRoute = Sentry.withSentryReactRouterV7Routing(Route); const SentryRoute = Sentry.withSentryReactRouterV7Routing(Route);
@@ -70,6 +71,7 @@ export const App: FC = () => {
<TooltipProvider> <TooltipProvider>
{loaded ? ( {loaded ? (
<Suspense fallback={null}> <Suspense fallback={null}>
<RageshakeButton description='Logs for Robin' />
<ClientProvider> <ClientProvider>
<MediaDevicesProvider> <MediaDevicesProvider>
<Sentry.ErrorBoundary fallback={ErrorPage}> <Sentry.ErrorBoundary fallback={ErrorPage}>
+10 -2
View File
@@ -144,11 +144,19 @@ const widgetPostHangupProcedure = async (
// We send the hangup event after the memberships have been updated // We send the hangup event after the memberships have been updated
// calling leaveRTCSession. // calling leaveRTCSession.
// We need to wait because this makes the client hosting this widget killing the IFrame. // We need to wait because this makes the client hosting this widget killing the IFrame.
await widget.api.transport.send(ElementWidgetActions.HangupCall, {}); try {
await widget.api.transport.send(ElementWidgetActions.HangupCall, {});
} catch (e) {
logger.error("Failed to send hangup action", e)
}
// On a normal user hangup we can shut down and close the widget. But if an // On a normal user hangup we can shut down and close the widget. But if an
// error occurs we should keep the widget open until the user reads it. // error occurs we should keep the widget open until the user reads it.
if (cause === "user") { if (cause === "user") {
await widget.api.transport.send(ElementWidgetActions.Close, {}); try {
await widget.api.transport.send(ElementWidgetActions.Close, {});
} catch (e) {
logger.error("Failed to send close action", e)
}
widget.api.transport.stop(); widget.api.transport.stop();
PosthogAnalytics.instance.logout(); PosthogAnalytics.instance.logout();
} }