From 068c4fa90ea3b693428365004c4431fca9891a91 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 14 Feb 2024 22:53:14 -0500 Subject: [PATCH] fix: wrong id parsed in announce --- src/activitypub/inbox.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/activitypub/inbox.js b/src/activitypub/inbox.js index cb5fa19a35..ea4e501242 100644 --- a/src/activitypub/inbox.js +++ b/src/activitypub/inbox.js @@ -93,7 +93,10 @@ inbox.announce = async (req) => { tid = await posts.getPostField(id, 'tid'); } else { pid = object; - tid = await activitypub.notes.assertTopic(0, object); + ([pid, tid] = await Promise.all([ + activitypub.notes.resolveId(0, pid), + activitypub.notes.assertTopic(0, pid), + ])); if (!tid) { return; }