mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-06 23:52:58 +01:00
fix: send actor with 1b12 announce, fixes #13072
This commit is contained in:
@@ -4,6 +4,7 @@ const nconf = require('nconf');
|
||||
const winston = require('winston');
|
||||
|
||||
const posts = require('../posts');
|
||||
const utils = require('../utils');
|
||||
|
||||
const activitypub = module.parent.exports;
|
||||
const Feps = module.exports;
|
||||
@@ -14,6 +15,7 @@ Feps.announce = async function announce(id, activity) {
|
||||
({ id: localId } = await activitypub.helpers.resolveLocalId(id));
|
||||
}
|
||||
const cid = await posts.getCidByPid(localId || id);
|
||||
const uid = await posts.getPostField(localId || id, 'uid');
|
||||
|
||||
const followers = await activitypub.notes.getCategoryFollowers(cid);
|
||||
if (!followers.length) {
|
||||
@@ -29,6 +31,7 @@ Feps.announce = async function announce(id, activity) {
|
||||
await activitypub.send('cid', cid, followers, {
|
||||
id: `${nconf.get('url')}/post/${encodeURIComponent(id)}#activity/announce/${Date.now()}`,
|
||||
type: 'Announce',
|
||||
actor: utils.isNumber(uid) ? `${nconf.get('url')}/uid/${uid}` : uid,
|
||||
to: [`${nconf.get('url')}/category/${cid}/followers`],
|
||||
cc: [actor, activitypub._constants.publicAddress],
|
||||
object: activity,
|
||||
|
||||
Reference in New Issue
Block a user