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:
@@ -5,4 +5,5 @@ export class AttachmentRequest {
|
||||
key: string;
|
||||
fileSize: number;
|
||||
adminRequest: boolean;
|
||||
lastKnownRevisionDate: Date;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user