integrate deletion to collab sessions
This commit is contained in:
@@ -315,3 +315,10 @@ export const loadFilesFromFirebase = async (
|
||||
|
||||
return { loadedFiles, erroredFiles };
|
||||
};
|
||||
|
||||
export const deleteRoomFromFirebase = async (
|
||||
roomId: string,
|
||||
roomKey: string,
|
||||
): Promise<void> => {
|
||||
// TODO: delete the room...
|
||||
};
|
||||
|
||||
@@ -119,6 +119,13 @@ export type SocketUpdateDataSource = {
|
||||
username: string;
|
||||
};
|
||||
};
|
||||
ROOM_DELETED: {
|
||||
type: WS_SUBTYPES.DELETE;
|
||||
payload: {
|
||||
socketId: SocketId;
|
||||
roomId: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
export type SocketUpdateDataIncoming =
|
||||
@@ -310,7 +317,7 @@ export const exportToBackend = async (
|
||||
|
||||
const response = await fetch(BACKEND_V2_POST, {
|
||||
method: "POST",
|
||||
body: payload.buffer,
|
||||
body: new Uint8Array(payload.buffer),
|
||||
});
|
||||
const json = await response.json();
|
||||
if (json.id) {
|
||||
|
||||
@@ -186,7 +186,7 @@ class RoomManager {
|
||||
return false;
|
||||
}
|
||||
|
||||
const [, roomId] = match;
|
||||
const roomId = match[1];
|
||||
return rooms.some((room) => room.roomId === roomId);
|
||||
} catch (error) {
|
||||
console.warn("Failed to check room ownership:", error);
|
||||
|
||||
Reference in New Issue
Block a user