1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-27 18:13:29 +00:00

respond to review comments

This commit is contained in:
John Harrington
2025-12-30 16:12:02 -07:00
parent 0fd81faabb
commit 07eb16d8ec
6 changed files with 27 additions and 21 deletions

View File

@@ -93,9 +93,9 @@ export class SendCreateCommand {
req.maxAccessCount = maxAccessCount;
req.emails = emails;
if (emails != null && emails.length > 0) {
if (hasEmails) {
req.authType = AuthType.Email;
} else if (password != null && password.trim().length > 0) {
} else if (hasPassword) {
req.authType = AuthType.Password;
} else {
req.authType = AuthType.None;
@@ -149,12 +149,6 @@ export class SendCreateCommand {
const sendView = SendResponse.toView(req);
const [encSend, fileData] = await this.sendService.encrypt(sendView, fileBuffer, password);
// Add dates from template
encSend.deletionDate = sendView.deletionDate;
encSend.expirationDate = sendView.expirationDate;
encSend.emails = emails && emails.join(",");
encSend.authType = req.authType;
await this.sendApiService.save([encSend, fileData]);
const newSend = await this.sendService.getFromState(encSend.id);
const activeUserId = await firstValueFrom(this.accountService.activeAccount$.pipe(getUserId));