mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-21 07:50:37 +01:00
fix: rename activitypub.out.announce.category, federate out Delete on topic move to cid -1
This commit is contained in:
@@ -267,7 +267,7 @@ Notes.assert = async (uid, input, options = { skipChecks: false }) => {
|
|||||||
|
|
||||||
if (!hasTid && options.cid) {
|
if (!hasTid && options.cid) {
|
||||||
// New topic, have category announce it
|
// New topic, have category announce it
|
||||||
activitypub.out.announce.category(tid);
|
activitypub.out.announce.topic(tid);
|
||||||
}
|
}
|
||||||
|
|
||||||
return { tid, count };
|
return { tid, count };
|
||||||
|
|||||||
@@ -279,7 +279,7 @@ Out.like.note = enabledCheck(async (uid, pid) => {
|
|||||||
|
|
||||||
Out.announce = {};
|
Out.announce = {};
|
||||||
|
|
||||||
Out.announce.category = enabledCheck(async (tid) => {
|
Out.announce.topic = enabledCheck(async (tid) => {
|
||||||
const { mainPid: pid, cid } = await topics.getTopicFields(tid, ['mainPid', 'cid']);
|
const { mainPid: pid, cid } = await topics.getTopicFields(tid, ['mainPid', 'cid']);
|
||||||
|
|
||||||
// Only local categories can announce
|
// Only local categories can announce
|
||||||
|
|||||||
@@ -323,11 +323,12 @@ topicsAPI.move = async (caller, { tid, cid }) => {
|
|||||||
socketHelpers.sendNotificationToTopicOwner(tid, caller.uid, 'move', 'notifications:moved-your-topic');
|
socketHelpers.sendNotificationToTopicOwner(tid, caller.uid, 'move', 'notifications:moved-your-topic');
|
||||||
|
|
||||||
if (utils.isNumber(cid) && parseInt(cid, 10) === -1) {
|
if (utils.isNumber(cid) && parseInt(cid, 10) === -1) {
|
||||||
activitypub.out.remove.context(caller.uid, tid);
|
activitypub.out.remove.context(caller.uid, tid); // 7888-style
|
||||||
// tbd: activitypubApi.undo.announce?
|
activitypub.out.delete.note(caller.uid, topicData.mainPid); // threadiverse
|
||||||
|
// tbd: activitypubApi.undo.announce? // microblogs
|
||||||
} else {
|
} else {
|
||||||
activitypub.out.move.context(caller.uid, tid);
|
activitypub.out.move.context(caller.uid, tid);
|
||||||
activitypub.out.announce.category(tid);
|
activitypub.out.announce.topic(tid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user