Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

core: fix audio attachments not linked to note when attached

Ammar Ahmed04d422b4118d
diff --git a/packages/core/src/collections/attachments.ts b/packages/core/src/collections/attachments.ts
index 5f4e0ff78..7e94fb1cf 100644
--- a/packages/core/src/collections/attachments.ts
+++ b/packages/core/src/collections/attachments.ts
@@ -615,6 +615,9 @@ export class Attachments implements ICollection {
async removeOrphaned() {
const orphaned = await this.db.attachments.orphaned.items();
+ logger.info("Deleting orphaned attachments", {
+ attachments: orphaned
+ });
await this.bulkRemove(orphaned, false);
}
}
diff --git a/packages/core/src/content-types/tiptap.ts b/packages/core/src/content-types/tiptap.ts
index 2aea7f3c0..2a2f667f8 100644
--- a/packages/core/src/content-types/tiptap.ts
+++ b/packages/core/src/content-types/tiptap.ts
@@ -363,6 +363,7 @@ export class Tiptap {
break;
}
case "iframe":
+ case "audio":
case "span": {
const hash = attr[ATTRIBUTES.hash];
if (!hash) return;