mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-25 06:18:45 +08:00
fix(server): auto-accept pending invitations by link in team workspace (#11433)
close CLOUD-192
This commit is contained in:
@@ -664,6 +664,11 @@ export class WorkspaceResolver {
|
||||
WorkspaceRole.Collaborator,
|
||||
WorkspaceMemberStatus.NeedMoreSeatAndReview
|
||||
);
|
||||
// if status is pending, should accept the invite directly
|
||||
if (role.status === WorkspaceMemberStatus.Pending) {
|
||||
await this.acceptInviteByInviteId(role.id);
|
||||
return;
|
||||
}
|
||||
await this.workspaceService.sendReviewRequestNotification(role.id);
|
||||
const memberCount = await this.models.workspaceUser.count(workspaceId);
|
||||
this.event.emit('workspace.members.updated', {
|
||||
|
||||
Reference in New Issue
Block a user