feat: extend pid handling to include main post announcers for non-root-level posts

Co-authored-by: aider (ollama/ministral-3:8b) <aider@aider.chat>
This commit is contained in:
Julian Lam
2026-04-20 14:44:43 -04:00
parent a99f1237b8
commit f40582fd19

View File

@@ -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);