mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: defer postdata retrieval
This commit is contained in:
@@ -91,10 +91,10 @@ inbox.update = async (req) => {
|
|||||||
|
|
||||||
switch (object.type) {
|
switch (object.type) {
|
||||||
case 'Note': {
|
case 'Note': {
|
||||||
const postData = await activitypub.mocks.post(object);
|
|
||||||
const exists = await posts.exists(object.id);
|
const exists = await posts.exists(object.id);
|
||||||
try {
|
try {
|
||||||
if (exists) {
|
if (exists) {
|
||||||
|
const postData = await activitypub.mocks.post(object);
|
||||||
await posts.edit(postData);
|
await posts.edit(postData);
|
||||||
const isDeleted = await posts.getPostField(object.id, 'deleted');
|
const isDeleted = await posts.getPostField(object.id, 'deleted');
|
||||||
if (isDeleted) {
|
if (isDeleted) {
|
||||||
|
|||||||
Reference in New Issue
Block a user