fix: defer postdata retrieval

This commit is contained in:
Julian Lam
2024-10-12 22:49:09 -04:00
parent e0e2051dda
commit 9062691aa2

View File

@@ -91,10 +91,10 @@ inbox.update = async (req) => {
switch (object.type) {
case 'Note': {
const postData = await activitypub.mocks.post(object);
const exists = await posts.exists(object.id);
try {
if (exists) {
const postData = await activitypub.mocks.post(object);
await posts.edit(postData);
const isDeleted = await posts.getPostField(object.id, 'deleted');
if (isDeleted) {