From 3a8e6a19b2b254dfd543cafdbecc80844f00b2f2 Mon Sep 17 00:00:00 2001 From: April John Date: Mon, 8 May 2023 22:08:29 +0200 Subject: [PATCH] import replies too --- packages/backend/src/queue/processors/db/import-posts.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/queue/processors/db/import-posts.ts b/packages/backend/src/queue/processors/db/import-posts.ts index cd24029fb..47096d414 100644 --- a/packages/backend/src/queue/processors/db/import-posts.ts +++ b/packages/backend/src/queue/processors/db/import-posts.ts @@ -10,6 +10,7 @@ import { queueLogger } from "../../logger.js"; import type Bull from "bull"; import { htmlToMfm } from "@/remote/activitypub/misc/html-to-mfm.js"; import { resolveNote } from "@/remote/activitypub/models/note.js"; +import { Note } from "@/models/entities/note.js"; const logger = queueLogger.createSubLogger("import-posts"); @@ -82,7 +83,7 @@ export async function importPosts( for (const post of parsed.orderedItems) { try { linenum++; - let reply = null; + let reply: Note | null = null; if (post.object.inReplyTo != null) { reply = await resolveNote(post.object.inReplyTo); }