mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +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 = {
|
||||
id: `${object.id}#activity/update/${post.edited}`,
|
||||
id: `${object.id}#activity/update/${post.edited || Date.now()}`,
|
||||
type: 'Update',
|
||||
to: object.to,
|
||||
cc: object.cc,
|
||||
|
||||
@@ -193,6 +193,11 @@ async function deleteOrRestore(caller, data, params) {
|
||||
tid: postData.tid,
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user