fix(workspaces): assign role on workspace join (#2864)

This commit is contained in:
Gergő Jedlicska
2024-09-03 18:54:06 +02:00
committed by GitHub
parent beabb5552b
commit c3b05abd6f
5 changed files with 127 additions and 9 deletions
@@ -46,7 +46,7 @@ export const joinWorkspaceFactory =
await upsertWorkspaceRole({ userId, workspaceId, role, createdAt: new Date() })
await emitWorkspaceEvent({
eventName: WorkspaceEvents.JoinedFromDiscovery,
payload: { userId, workspaceId }
payload: { userId, workspaceId, role }
})
await emitWorkspaceEvent({
eventName: WorkspaceEvents.RoleUpdated,