mirror of
https://github.com/bitwarden/server.git
synced 2024-11-30 13:33:24 +01:00
update the cipher revision date when an attachment is added or deleted
This commit is contained in:
parent
d93524030c
commit
d9d313e498
@ -210,6 +210,10 @@ public class CipherService : ICipherService
|
||||
AttachmentData = JsonSerializer.Serialize(data)
|
||||
});
|
||||
cipher.AddAttachment(attachmentId, data);
|
||||
|
||||
// Update the revision date when an attachment is added
|
||||
cipher.RevisionDate = DateTime.UtcNow;
|
||||
|
||||
await _pushService.PushSyncCipherUpdateAsync(cipher, null);
|
||||
|
||||
return (attachmentId, uploadUrl);
|
||||
@ -259,6 +263,9 @@ public class CipherService : ICipherService
|
||||
throw;
|
||||
}
|
||||
|
||||
// Update the revision date when an attachment is added
|
||||
cipher.RevisionDate = DateTime.UtcNow;
|
||||
|
||||
// push
|
||||
await _pushService.PushSyncCipherUpdateAsync(cipher, null);
|
||||
}
|
||||
@ -1021,6 +1028,9 @@ public class CipherService : ICipherService
|
||||
await _attachmentStorageService.DeleteAttachmentAsync(cipher.Id, attachmentData);
|
||||
await _eventService.LogCipherEventAsync(cipher, Bit.Core.Enums.EventType.Cipher_AttachmentDeleted);
|
||||
|
||||
// Update the revision date when an attachment is deleted
|
||||
cipher.RevisionDate = DateTime.UtcNow;
|
||||
|
||||
// push
|
||||
await _pushService.PushSyncCipherUpdateAsync(cipher, null);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user