forked from FoundKeyGang/FoundKey
Use Tombstone for Delete
This commit is contained in:
parent
a4678e45de
commit
0177023ead
2 changed files with 7 additions and 2 deletions
4
src/remote/activitypub/renderer/tombstone.ts
Normal file
4
src/remote/activitypub/renderer/tombstone.ts
Normal file
|
@ -0,0 +1,4 @@
|
|||
export default (id: string) => ({
|
||||
id,
|
||||
type: 'Tombstone'
|
||||
});
|
|
@ -5,8 +5,9 @@ import renderDelete from '../../remote/activitypub/renderer/delete';
|
|||
import pack from '../../remote/activitypub/renderer';
|
||||
import { deliver } from '../../queue';
|
||||
import Following from '../../models/following';
|
||||
import renderNote from '../../remote/activitypub/renderer/note';
|
||||
import renderTombstone from '../../remote/activitypub/renderer/tombstone';
|
||||
import { updateNoteStats } from '../update-chart';
|
||||
import config from '../../config';
|
||||
|
||||
/**
|
||||
* 投稿を削除します。
|
||||
|
@ -32,7 +33,7 @@ export default async function(user: IUser, note: INote) {
|
|||
|
||||
//#region ローカルの投稿なら削除アクティビティを配送
|
||||
if (isLocalUser(user)) {
|
||||
const content = pack(renderDelete(await renderNote(note), user));
|
||||
const content = pack(renderDelete(renderTombstone(`${config.url}/notes/${note._id}`), user));
|
||||
|
||||
const followings = await Following.find({
|
||||
followeeId: user._id,
|
||||
|
|
Loading…
Reference in a new issue