From 9d350059d94fecd1029837b5319389961b081321 Mon Sep 17 00:00:00 2001 From: zuomeng wang Date: Thu, 9 Feb 2023 10:15:30 +0800 Subject: [PATCH] fix: add collabration name (#879) --- packages/data-center/src/provider/affine/affine.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/data-center/src/provider/affine/affine.ts b/packages/data-center/src/provider/affine/affine.ts index 8749db5fa6..a4a25e4ee4 100644 --- a/packages/data-center/src/provider/affine/affine.ts +++ b/packages/data-center/src/provider/affine/affine.ts @@ -176,6 +176,12 @@ export class AffineProvider extends BaseProvider { // @ts-expect-error ignore the type awareness: workspace.awarenessStore.awareness, }); + workspace.awarenessStore.awareness.setLocalStateField('user', { + name: token.user?.name ?? 'other', + id: Number(token.user?.id ?? -1), + color: '#ffa500', + }); + this._wsMap.set(workspace, ws); } return ws;