feat: auto-friend invite bound users

This commit is contained in:
richjohnrambo
2026-09-11 10:46:20 +08:00
parent 926b4bbd81
commit b9dc56eccf
4 changed files with 104 additions and 23 deletions
+3
View File
@@ -452,6 +452,9 @@ func validateRegistrationInvite(tenantID types.TenantID, code string, now time.T
if !now.Before(invite.ExpiresAt) {
return types.ErrInviteExpired
}
if invite.MaxUses > 0 && invite.UsageCount >= invite.MaxUses {
return types.ErrInviteInvalid
}
return nil
default:
return types.ErrInviteInvalid