mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-22 00:10:25 +01:00
fix: improper cc and object fields in announceObject
This commit is contained in:
@@ -69,8 +69,10 @@ Feps.announceObject = async function announceObject(id) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const author = await posts.getPostField(id, 'uid');
|
let author = await posts.getPostField(id, 'uid');
|
||||||
if (!utils.isNumber(author) && !author.startsWith(nconf.get('url'))) {
|
if (utils.isNumber(author)) {
|
||||||
|
author = `${nconf.get('url')}/uid/${author}`;
|
||||||
|
} else if (!author.startsWith(nconf.get('url'))) {
|
||||||
followers.unshift(author);
|
followers.unshift(author);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,6 +83,6 @@ Feps.announceObject = async function announceObject(id) {
|
|||||||
actor: `${nconf.get('url')}/category/${cid}`,
|
actor: `${nconf.get('url')}/category/${cid}`,
|
||||||
to: [`${nconf.get('url')}/category/${cid}/followers`],
|
to: [`${nconf.get('url')}/category/${cid}/followers`],
|
||||||
cc: [author, activitypub._constants.publicAddress],
|
cc: [author, activitypub._constants.publicAddress],
|
||||||
object: id,
|
object: utils.isNumber(id) ? `${nconf.get('url')}/post/${id}` : id,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user