fix(server): auto-accept pending invitations by link in team workspace (#11433)

close CLOUD-192
This commit is contained in:
fengmk2
2025-04-03 07:19:14 +00:00
parent a4c76ff485
commit 70a318f1c4
2 changed files with 56 additions and 0 deletions
@@ -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', {