Add room not found view
This commit is contained in:
@@ -2,6 +2,8 @@ import React from "react";
|
||||
import { useLoadGroupCall } from "./useLoadGroupCall";
|
||||
import { ErrorView, FullScreenView } from "../FullScreenView";
|
||||
import { usePageTitle } from "../usePageTitle";
|
||||
import { isLocalRoomId } from "../matrix-utils";
|
||||
import { RoomNotFoundView } from "./RoomNotFoundView";
|
||||
|
||||
export function GroupCallLoader({ client, roomId, viaServers, children }) {
|
||||
const { loading, error, groupCall } = useLoadGroupCall(
|
||||
@@ -20,6 +22,10 @@ export function GroupCallLoader({ client, roomId, viaServers, children }) {
|
||||
);
|
||||
}
|
||||
|
||||
if (error && error.errcode === "M_UNKNOWN" && isLocalRoomId(roomId)) {
|
||||
return <RoomNotFoundView client={client} roomId={roomId} />;
|
||||
}
|
||||
|
||||
if (error) {
|
||||
return <ErrorView error={error} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user