fixes in opml export and note content loading

This commit is contained in:
zadam
2019-02-10 22:45:44 +01:00
parent 6be8a3f343
commit 8aa7e2d0a0
4 changed files with 13 additions and 4 deletions

View File

@@ -12,11 +12,9 @@ async function getNote(req) {
return [404, "Note " + noteId + " has not been found."];
}
if (["text", "code", "relation-map"].includes(note.type) || note.mime.startsWith('text/')) {
if (note.isStringNote()) {
const noteContent = await note.getNoteContent();
noteContent.content = noteContent.content.toString("UTF-8");
if (note.type === 'file') {
noteContent.content = noteContent.content.substr(0, 10000);
}