mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-06 15:36:24 +02:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user