feat: auto-friend invite bound users
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user