fix(server): wrong table used for userspace data (#7969)

This commit is contained in:
forehalo
2024-08-26 06:11:22 +00:00
parent 01c9d1758e
commit 14066965fa
2 changed files with 10 additions and 11 deletions

View File

@@ -11,6 +11,7 @@ import { Socket } from 'socket.io';
import { diffUpdate, encodeStateVectorFromUpdate } from 'yjs';
import {
AlreadyInSpace,
CallTimer,
Config,
DocNotFound,
@@ -579,8 +580,7 @@ abstract class SyncSocketAdapter {
assertNotIn(spaceId: string, roomType: RoomType = 'sync') {
if (this.client.rooms.has(this.room(spaceId, roomType))) {
// TODO(@forehalo): use new AlreadyInSpace({ spaceId }) instead
throw new NotInSpace({ spaceId });
throw new AlreadyInSpace({ spaceId });
}
}
@@ -621,11 +621,6 @@ class WorkspaceSyncAdapter extends SyncSocketAdapter {
super(SpaceType.Workspace, client, storage);
}
// backward compatibility
override room(spaceId: string, roomType: RoomType = 'sync') {
return Room(spaceId, roomType);
}
override push(spaceId: string, docId: string, updates: Buffer[]) {
const id = new DocID(docId, spaceId);
return super.push(spaceId, id.guid, updates);