1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-06 18:43:25 +00:00

[PM-22992] Send lastKnownRevisionDate with Attachment API calls (#16862)

* Add lastKnownRevisionDate to Attachment methods.

* Address issues raised by Claude PR

* Fix string errors

* Show error to user in event of attachment upload failure

* Improve error handling for missing cipher

* Add unit tests for attachment lastKnownRevisionDate

* Remove generic title from toast errors

* Move lastKnwonRevisionDate to function input
This commit is contained in:
Nik Gilmore
2025-10-22 16:19:57 -07:00
committed by GitHub
parent 740fe0787f
commit 0ec3f661d5
8 changed files with 183 additions and 2 deletions

View File

@@ -5,4 +5,5 @@ export class AttachmentRequest {
key: string;
fileSize: number;
adminRequest: boolean;
lastKnownRevisionDate: Date;
}

View File

@@ -201,6 +201,7 @@ export class CipherRequest {
this.attachments[attachment.id] = fileName;
const attachmentRequest = new AttachmentRequest();
attachmentRequest.fileName = fileName;
attachmentRequest.lastKnownRevisionDate = cipher.revisionDate;
if (attachment.key != null) {
attachmentRequest.key = attachment.key.encryptedString;
}