mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: getCidByPid call returning improper values because a remote url to a local post was passed in
This commit is contained in:
@@ -33,7 +33,11 @@ function reject(type, object, target, senderType = 'uid', id = 0) {
|
||||
|
||||
// FEP 1b12
|
||||
async function announce(id, activity) {
|
||||
const cid = await posts.getCidByPid(id);
|
||||
let localId;
|
||||
if (id.startsWith(nconf.get('url'))) {
|
||||
({ id: localId } = await activitypub.helpers.resolveLocalId(id));
|
||||
}
|
||||
const cid = await posts.getCidByPid(localId || id);
|
||||
|
||||
const followers = await activitypub.notes.getCategoryFollowers(cid);
|
||||
if (!followers.length) {
|
||||
|
||||
Reference in New Issue
Block a user