mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-08 20:09:19 +00:00
Rename function to be accurate.
This commit is contained in:
@@ -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 }));
|
||||||
|
|||||||
Reference in New Issue
Block a user