Node.js based forum software built for the modern web
feat: extend pid handling to include main post announcers for non-root-level posts
Julian Lamf40582fd1917
diff --git a/src/activitypub/index.js b/src/activitypub/index.jsindex 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);