mirror of
https://github.com/bitwarden/server.git
synced 2025-02-01 23:31:41 +01:00
Correct seat counts (#1621)
This commit is contained in:
parent
f63a0711dc
commit
5a2d988375
@ -1499,12 +1499,13 @@ namespace Bit.Core.Services
|
||||
|
||||
var ownerEmails = (await _organizationUserRepository.GetManyByMinimumRoleAsync(organization.Id,
|
||||
OrganizationUserType.Owner)).Select(u => u.Email).Distinct();
|
||||
var initialSeatCount = organization.Seats.Value;
|
||||
|
||||
await AdjustSeatsAsync(organization, seatsToAdd, prorationDate, ownerEmails);
|
||||
|
||||
if (!organization.OwnersNotifiedOfAutoscaling.HasValue)
|
||||
{
|
||||
await _mailService.SendOrganizationAutoscaledEmailAsync(organization, organization.Seats.Value + seatsToAdd,
|
||||
await _mailService.SendOrganizationAutoscaledEmailAsync(organization, initialSeatCount,
|
||||
ownerEmails);
|
||||
organization.OwnersNotifiedOfAutoscaling = DateTime.UtcNow;
|
||||
await _organizationRepository.UpsertAsync(organization);
|
||||
|
Loading…
Reference in New Issue
Block a user