mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-06 17:16:28 +02:00
feat: #13255 new topics in remote category addresses remote category, tests, fixes to tests
This commit is contained in:
@@ -701,7 +701,8 @@ Mocks.notes.public = async (post) => {
|
||||
* audience is exposed as part of 1b12 but is now ignored by Lemmy.
|
||||
* Remove this and most references to audience in 2026.
|
||||
*/
|
||||
let audience = `${nconf.get('url')}/category/${post.category.cid}`; // default
|
||||
let audience = utils.isNumber(post.category.cid) ? // default
|
||||
`${nconf.get('url')}/category/${post.category.cid}` : post.category.cid;
|
||||
if (inReplyTo) {
|
||||
const chain = await activitypub.notes.getParentChain(post.uid, inReplyTo);
|
||||
chain.forEach((post) => {
|
||||
|
||||
@@ -129,7 +129,7 @@ activitypubApi.create.note = enabledCheck(async (caller, { pid, post }) => {
|
||||
await Promise.all([
|
||||
activitypub.send('uid', caller.uid, Array.from(targets), activity),
|
||||
activitypub.feps.announce(pid, activity),
|
||||
activitypubApi.add(caller, { pid }),
|
||||
utils.isNumber(post.cid) ? activitypubApi.add(caller, { pid }) : undefined,
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
@@ -87,9 +87,7 @@ topicsAPI.create = async function (caller, data) {
|
||||
socketHelpers.notifyNew(caller.uid, 'newTopic', { posts: [result.postData], topic: result.topicData });
|
||||
|
||||
if (!isScheduling) {
|
||||
setTimeout(() => {
|
||||
activitypubApi.create.note(caller, { pid: result.postData.pid });
|
||||
}, 5000);
|
||||
await activitypubApi.create.note(caller, { pid: result.postData.pid });
|
||||
}
|
||||
|
||||
return result.topicData;
|
||||
|
||||
Reference in New Issue
Block a user