diff --git a/src/RichError.tsx b/src/RichError.tsx index 8099be9b..82852258 100644 --- a/src/RichError.tsx +++ b/src/RichError.tsx @@ -15,7 +15,7 @@ import { import type { ComponentType, FC, ReactNode, SVGAttributes } from "react"; import { ErrorView } from "./ErrorView"; -import { type ElementCallError, ErrorCategory } from "./utils/ec-errors.ts"; +import { type ElementCallError, ErrorCategory } from "./utils/errors.ts"; /** * An error consisting of a terse message to be logged to the console and a @@ -96,9 +96,7 @@ const GenericECError: FC<{ error: ElementCallError }> = ({ return (

- {error.localisedMessage ? ( - error.localisedMessage - ) : ( + {error.localisedMessage ?? ( , ]} diff --git a/src/room/GroupCallView.tsx b/src/room/GroupCallView.tsx index 31ab776c..48238c0a 100644 --- a/src/room/GroupCallView.tsx +++ b/src/room/GroupCallView.tsx @@ -61,7 +61,7 @@ import { callEventAudioSounds } from "./CallEventAudioRenderer"; import { useLatest } from "../useLatest"; import { usePageTitle } from "../usePageTitle"; import { ErrorView } from "../ErrorView"; -import { ConnectionLostError, ElementCallError } from "../utils/ec-errors.ts"; +import { ConnectionLostError, ElementCallError } from "../utils/errors.ts"; import { ElementCallRichError } from "../RichError.tsx"; declare global { diff --git a/src/room/InCallView.tsx b/src/room/InCallView.tsx index bd6098ff..17ca63bb 100644 --- a/src/room/InCallView.tsx +++ b/src/room/InCallView.tsx @@ -97,7 +97,7 @@ import { useSetting, } from "../settings/settings"; import { ReactionsReader } from "../reactions/ReactionsReader"; -import { ConnectionLostError } from "../utils/ec-errors.ts"; +import { ConnectionLostError } from "../utils/errors.ts"; const canScreenshare = "getDisplayMedia" in (navigator.mediaDevices ?? {}); diff --git a/src/rtcSessionHelpers.test.ts b/src/rtcSessionHelpers.test.ts index ef924750..21ee2cd3 100644 --- a/src/rtcSessionHelpers.test.ts +++ b/src/rtcSessionHelpers.test.ts @@ -13,7 +13,7 @@ import EventEmitter from "events"; import { enterRTCSession, leaveRTCSession } from "../src/rtcSessionHelpers"; import { mockConfig } from "./utils/test"; import { ElementWidgetActions, widget } from "./widget"; -import { ErrorCode } from "./utils/ec-errors.ts"; +import { ErrorCode } from "./utils/errors.ts"; const actualWidget = await vi.hoisted(async () => vi.importActual("./widget")); vi.mock("./widget", () => ({ diff --git a/src/rtcSessionHelpers.ts b/src/rtcSessionHelpers.ts index 974679b1..719af998 100644 --- a/src/rtcSessionHelpers.ts +++ b/src/rtcSessionHelpers.ts @@ -18,7 +18,7 @@ import { AutoDiscovery } from "matrix-js-sdk/src/autodiscovery"; import { PosthogAnalytics } from "./analytics/PosthogAnalytics"; import { Config } from "./config/Config"; import { ElementWidgetActions, widget, type WidgetHelpers } from "./widget"; -import { MatrixRTCFocusMissingError } from "./utils/ec-errors.ts"; +import { MatrixRTCFocusMissingError } from "./utils/errors.ts"; const FOCI_WK_KEY = "org.matrix.msc4143.rtc_foci"; diff --git a/src/utils/ec-errors.ts b/src/utils/errors.ts similarity index 94% rename from src/utils/ec-errors.ts rename to src/utils/errors.ts index 0ba87249..14436977 100644 --- a/src/utils/ec-errors.ts +++ b/src/utils/errors.ts @@ -17,7 +17,7 @@ export enum ErrorCode { } export enum ErrorCategory { - /** Calling is not supported, server miss-configured (JWT service missing, no MSC support ...)*/ + /** Calling is not supported, server misconfigured (JWT service missing, no MSC support ...)*/ CONFIGURATION_ISSUE = "CONFIGURATION_ISSUE", NETWORK_CONNECTIVITY = "NETWORK_CONNECTIVITY", // SYSTEM_FAILURE / FEDERATION_FAILURE ..