mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
feat: handle 1b14 announce for remote content too
This commit is contained in:
@@ -40,6 +40,19 @@ inbox.create = async (req) => {
|
||||
const response = await activitypub.notes.assert(0, object);
|
||||
if (response) {
|
||||
winston.verbose(`[activitypub/inbox] Parsing ${response.count} notes into topic ${response.tid}`);
|
||||
|
||||
// todo: put this somewhere better if need be... maybe this is better as api.activitypub.announce.note?
|
||||
const cid = await topics.getTopicField(response.tid, 'cid');
|
||||
const followers = await activitypub.notes.getCategoryFollowers(cid);
|
||||
if (followers.length) {
|
||||
await activitypub.send('cid', cid, followers, {
|
||||
id: `${object.id}#activity/announce`,
|
||||
type: 'Announce',
|
||||
to: [`${nconf.get('url')}/category/${cid}/followers`],
|
||||
cc: [activitypub._constants.publicAddress],
|
||||
object,
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user