prevent sending email when no recipients
This commit is contained in:
@@ -284,6 +284,7 @@ func (s *serviceImpl) AcceptInvitation(ctx context.Context, networkID, email, hu
|
||||
}
|
||||
}
|
||||
|
||||
if len(emailRecipients) > 0 {
|
||||
newMemberEmailPrefix := strings.Split(normalized, "@")[0]
|
||||
_, err = s.aeroSvc.ShootEmail(ctx, &pbaero.ShootEmailRequest{
|
||||
ToEmails: emailRecipients,
|
||||
@@ -298,6 +299,7 @@ func (s *serviceImpl) AcceptInvitation(ctx context.Context, networkID, email, hu
|
||||
flog.Warn("unable to send email notification", "email", email, "network", network.Name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
s.mirrorAddMembership(ctx, humanId, networkID)
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user