diff --git a/src/Core/Services/Implementations/CipherService.cs b/src/Core/Services/Implementations/CipherService.cs index 6bafcb6783..11da1be194 100644 --- a/src/Core/Services/Implementations/CipherService.cs +++ b/src/Core/Services/Implementations/CipherService.cs @@ -288,7 +288,18 @@ namespace Bit.Core.Services public async Task DeleteManyAsync(IEnumerable cipherIds, Guid deletingUserId) { + var cipherIdsSet = new HashSet(cipherIds); + var ciphers = await _cipherRepository.GetManyByUserIdAsync(deletingUserId); + var deletingCiphers = ciphers.Where(c => cipherIdsSet.Contains(c.Id)); + await _cipherRepository.DeleteAsync(cipherIds, deletingUserId); + + // TODO: move this to a single event? + foreach(var cipher in deletingCiphers) + { + await _eventService.LogCipherEventAsync(cipher, Enums.EventType.Cipher_Deleted); + } + // push await _pushService.PushSyncCiphersAsync(deletingUserId); }