Rename function to be accurate.

This commit is contained in:
Half-Shot
2026-01-05 09:06:06 +00:00
parent e032b71f9f
commit d8ada2d395

View File

@@ -232,7 +232,7 @@ export const useLoadGroupCall = (
}); });
}; };
const fetchOrCreateRoom = async (): Promise<Room> => { const fetchRoom = async (): Promise<Room> => {
let room: Room | null = null; let room: Room | null = null;
if (roomIdOrAlias[0] === "#") { if (roomIdOrAlias[0] === "#") {
const alias = roomIdOrAlias; const alias = roomIdOrAlias;
@@ -330,8 +330,8 @@ export const useLoadGroupCall = (
return room; return room;
}; };
const fetchOrCreateGroupCall = async (): Promise<MatrixRTCSession> => { const fetchGroupCall = async (): Promise<MatrixRTCSession> => {
const room = await fetchOrCreateRoom(); const room = await fetchRoom();
activeRoom.current = room; activeRoom.current = room;
logger.debug(`Fetched / joined room ${roomIdOrAlias}`); logger.debug(`Fetched / joined room ${roomIdOrAlias}`);
@@ -369,7 +369,7 @@ export const useLoadGroupCall = (
if (state.kind === "loading") { if (state.kind === "loading") {
logger.log("Start loading group call"); logger.log("Start loading group call");
waitForClientSyncing() waitForClientSyncing()
.then(fetchOrCreateGroupCall) .then(fetchGroupCall)
.then((rtcSession) => setState({ kind: "loaded", rtcSession })) .then((rtcSession) => setState({ kind: "loaded", rtcSession }))
.then(observeMyMembership) .then(observeMyMembership)
.catch((error) => setState({ kind: "failed", error })); .catch((error) => setState({ kind: "failed", error }));