Merge branch 'hotfix/3.5.16' into develop

This commit is contained in:
Baptiste Grob
2021-01-20 14:38:20 +01:00
2 changed files with 7 additions and 4 deletions

View File

@@ -3,7 +3,8 @@ import {
EncryptionIntent,
ContentType,
SNNote,
BackupFile
BackupFile,
PayloadContent,
} from '@standardnotes/snjs';
function zippableTxtName(name: string, suffix = ""): string {
@@ -106,8 +107,8 @@ export class ArchiveManager {
let name, contents;
if (item.content_type === ContentType.Note) {
const note = item as SNNote;
name = note.title;
contents = note.text;
name = (note.content as PayloadContent).title;
contents = (note.content as PayloadContent).text;
} else {
name = item.content_type;
contents = JSON.stringify(item.content, null, 2);

View File

@@ -197,7 +197,9 @@ export class DesktopManager extends ApplicationService {
}
async desktop_requestBackupFile() {
const data = this.application!.createBackupFile(EncryptionIntent.FileEncrypted);
const data = await this.application!.createBackupFile(
EncryptionIntent.FileEncrypted
);
if (data) {
return JSON.stringify(data, null, 2);
}