fix: add collabration name (#879)

This commit is contained in:
zuomeng wang 2023-02-09 10:15:30 +08:00 committed by GitHub
parent 53d60a13b2
commit 9d350059d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;