From 3c69fa7d110f7510fca21f5f416b2e1f0a61897a Mon Sep 17 00:00:00 2001 From: Andrey Platov Date: Sun, 10 Oct 2021 13:51:59 +0200 Subject: [PATCH] broadcast derived data Signed-off-by: Andrey Platov --- server/ws/src/server.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/ws/src/server.ts b/server/ws/src/server.ts index 1d530c4f76..4d0184425e 100644 --- a/server/ws/src/server.ts +++ b/server/ws/src/server.ts @@ -43,7 +43,7 @@ class Session implements Storage { const derived = await this.storage.tx(tx) this.manager.broadcast(this, this.token, { result: tx }) for (const tx of derived) { - this.manager.broadcast(this, this.token, { result: tx }) + this.manager.broadcast(null, this.token, { result: tx }) } } } @@ -87,7 +87,7 @@ class SessionManager { } } - broadcast (from: Session, token: Token, resp: Response): void { + broadcast (from: Session | null, token: Token, resp: Response): void { const workspace = this.workspaces.get(token.workspace) if (workspace === undefined) { throw new Error('internal: cannot find sessions')