From f40582fd1917f62d5c83c0c1b6c9e1d802f46bd3 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 20 Apr 2026 14:44:43 -0400 Subject: [PATCH] feat: extend pid handling to include main post announcers for non-root-level posts Co-authored-by: aider (ollama/ministral-3:8b) --- src/activitypub/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/activitypub/index.js b/src/activitypub/index.js index 3c3d67711e..1b785e32b8 100644 --- a/src/activitypub/index.js +++ b/src/activitypub/index.js @@ -487,6 +487,11 @@ ActivityPub.buildRecipients = async function (object, options) { * - `pid`: includes post announcers and all topic participants * - `targets`: boolean; whether to calculate targets (default: true) */ + + const getMainPid = async (pid) => { + const { tid } = await posts.getPostField(pid, 'tid'); + return db.getSortedSetMember('tid:' + tid + ':posts', 0); + }; let { to, cc } = object; to = new Set(to); cc = new Set(cc);