Fix multiplayer collab for data

This commit is contained in:
Andrew Kingston 2024-11-01 15:38:18 +00:00
parent be27bdba66
commit dc7cc49410
No known key found for this signature in database
1 changed files with 4 additions and 2 deletions

View File

@ -80,7 +80,8 @@ export default class GridSocket extends BaseSocket {
}
emitRowUpdate(ctx: any, row: Row) {
const resourceId = ctx.params?.viewId || getSourceId(ctx)
const source = getSourceId(ctx)
const resourceId = source.viewId ?? source.tableId
const room = `${ctx.appId}-${resourceId}`
this.emitToRoom(ctx, room, GridSocketEvent.RowChange, {
id: row._id,
@ -89,7 +90,8 @@ export default class GridSocket extends BaseSocket {
}
emitRowDeletion(ctx: any, row: Row) {
const resourceId = ctx.params?.viewId || getSourceId(ctx)
const source = getSourceId(ctx)
const resourceId = source.viewId ?? source.tableId
const room = `${ctx.appId}-${resourceId}`
this.emitToRoom(ctx, room, GridSocketEvent.RowChange, {
id: row._id,