mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-26 03:47:40 -07:00
try fetching replies
This commit is contained in:
parent
39c6949321
commit
77f74f51b3
1 changed files with 4 additions and 2 deletions
|
@ -9,6 +9,7 @@ import type { DbUserImportPostsJobData } from "@/queue/types.js";
|
||||||
import { queueLogger } from "../../logger.js";
|
import { queueLogger } from "../../logger.js";
|
||||||
import type Bull from "bull";
|
import type Bull from "bull";
|
||||||
import { htmlToMfm } from "@/remote/activitypub/misc/html-to-mfm.js";
|
import { htmlToMfm } from "@/remote/activitypub/misc/html-to-mfm.js";
|
||||||
|
import { resolveNote } from "@/remote/activitypub/models/note.js";
|
||||||
|
|
||||||
const logger = queueLogger.createSubLogger("import-posts");
|
const logger = queueLogger.createSubLogger("import-posts");
|
||||||
|
|
||||||
|
@ -81,8 +82,9 @@ export async function importPosts(
|
||||||
for (const post of parsed.orderedItems) {
|
for (const post of parsed.orderedItems) {
|
||||||
try {
|
try {
|
||||||
linenum++;
|
linenum++;
|
||||||
|
let reply = null;
|
||||||
if (post.object.inReplyTo != null) {
|
if (post.object.inReplyTo != null) {
|
||||||
continue;
|
reply = await resolveNote(post.object.inReplyTo);
|
||||||
}
|
}
|
||||||
if (post.directMessage) {
|
if (post.directMessage) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -105,7 +107,7 @@ export async function importPosts(
|
||||||
files: undefined,
|
files: undefined,
|
||||||
poll: undefined,
|
poll: undefined,
|
||||||
text: text || undefined,
|
text: text || undefined,
|
||||||
reply: null,
|
reply,
|
||||||
renote: null,
|
renote: null,
|
||||||
cw: post.sensitive,
|
cw: post.sensitive,
|
||||||
localOnly: false,
|
localOnly: false,
|
||||||
|
|
Loading…
Reference in a new issue