1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-28 13:15:12 +01:00

store the updated cipher in the DB when an attachment is altered

This commit is contained in:
Nick Krantz 2024-10-11 11:49:08 -05:00
parent d9d313e498
commit a3b73b09f4
No known key found for this signature in database
GPG Key ID: FF670021ABCAB82E

View File

@ -213,6 +213,7 @@ public class CipherService : ICipherService
// Update the revision date when an attachment is added // Update the revision date when an attachment is added
cipher.RevisionDate = DateTime.UtcNow; cipher.RevisionDate = DateTime.UtcNow;
await _cipherRepository.ReplaceAsync((CipherDetails)cipher);
await _pushService.PushSyncCipherUpdateAsync(cipher, null); await _pushService.PushSyncCipherUpdateAsync(cipher, null);
@ -265,6 +266,7 @@ public class CipherService : ICipherService
// Update the revision date when an attachment is added // Update the revision date when an attachment is added
cipher.RevisionDate = DateTime.UtcNow; cipher.RevisionDate = DateTime.UtcNow;
await _cipherRepository.ReplaceAsync((CipherDetails)cipher);
// push // push
await _pushService.PushSyncCipherUpdateAsync(cipher, null); await _pushService.PushSyncCipherUpdateAsync(cipher, null);
@ -1030,6 +1032,7 @@ public class CipherService : ICipherService
// Update the revision date when an attachment is deleted // Update the revision date when an attachment is deleted
cipher.RevisionDate = DateTime.UtcNow; cipher.RevisionDate = DateTime.UtcNow;
await _cipherRepository.ReplaceAsync((CipherDetails)cipher);
// push // push
await _pushService.PushSyncCipherUpdateAsync(cipher, null); await _pushService.PushSyncCipherUpdateAsync(cipher, null);