1
0
mirror of https://github.com/bitwarden/server synced 2026-02-12 06:23:28 +00:00

support importing archived ciphers

This commit is contained in:
John Harrington
2026-01-10 09:03:38 -07:00
parent 5320878295
commit 638f400373

View File

@@ -76,6 +76,12 @@ public class ImportCiphersCommand : IImportCiphersCommand
{
cipher.Favorites = $"{{\"{cipher.UserId.ToString().ToUpperInvariant()}\":\"true\"}}";
}
if (cipher.ArchivedDate.HasValue)
{
cipher.Archives = $"{{\"{cipher.UserId.ToString().ToUpperInvariant()}\":\"" +
$"{cipher.ArchivedDate.Value:yyyy-MM-ddTHH:mm:ss.fffffffZ}\"}}";
}
}
var userfoldersIds = (await _folderRepository.GetManyByUserIdAsync(importingUserId)).Select(f => f.Id).ToList();