Revert "fix: run post import async"

This reverts commit 3bedd1b347.
This commit is contained in:
April John 2023-05-08 22:46:51 +02:00
parent a929dc11de
commit b10f9beef2
1 changed files with 40 additions and 42 deletions

View File

@ -81,7 +81,6 @@ export async function importPosts(
} else if (parsed instanceof Object) { } else if (parsed instanceof Object) {
logger.info("Parsing animal style posts"); logger.info("Parsing animal style posts");
for (const post of parsed.orderedItems) { for (const post of parsed.orderedItems) {
async () => {
try { try {
linenum++; linenum++;
let reply: Note | null = null; let reply: Note | null = null;
@ -89,18 +88,18 @@ export async function importPosts(
reply = await resolveNote(post.object.inReplyTo); reply = await resolveNote(post.object.inReplyTo);
} }
if (post.directMessage) { if (post.directMessage) {
return; continue;
} }
if (job.data.signatureCheck) { if (job.data.signatureCheck) {
if (!post.signature) { if (!post.signature) {
return; continue;
} }
} }
let text; let text;
try { try {
text = htmlToMfm(post.object.content, post.object.tag); text = htmlToMfm(post.object.content, post.object.tag);
} catch (e) { } catch (e) {
return; continue;
} }
logger.info(`Posting[${linenum}] ...`); logger.info(`Posting[${linenum}] ...`);
@ -123,7 +122,6 @@ export async function importPosts(
} catch (e) { } catch (e) {
logger.warn(`Error in line:${linenum} ${e}`); logger.warn(`Error in line:${linenum} ${e}`);
} }
};
} }
} }
} catch (e) { } catch (e) {