mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01:00
feat: on post delete, federate out an Update(Tombstone)
This commit is contained in:
@@ -193,7 +193,7 @@ activitypubApi.update.note = enabledCheck(async (caller, { post }) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const payload = {
|
const payload = {
|
||||||
id: `${object.id}#activity/update/${post.edited}`,
|
id: `${object.id}#activity/update/${post.edited || Date.now()}`,
|
||||||
type: 'Update',
|
type: 'Update',
|
||||||
to: object.to,
|
to: object.to,
|
||||||
cc: object.cc,
|
cc: object.cc,
|
||||||
|
|||||||
@@ -193,6 +193,11 @@ async function deleteOrRestore(caller, data, params) {
|
|||||||
tid: postData.tid,
|
tid: postData.tid,
|
||||||
ip: caller.ip,
|
ip: caller.ip,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Explicitly non-awaited
|
||||||
|
posts.getPostSummaryByPids([data.pid], caller.uid, {}).then(([post]) => {
|
||||||
|
require('.').activitypub.update.note(caller, { post });
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function deleteOrRestoreTopicOf(command, pid, caller) {
|
async function deleteOrRestoreTopicOf(command, pid, caller) {
|
||||||
|
|||||||
Reference in New Issue
Block a user