Use Tombstone for Delete

This commit is contained in:
mei23 2018-09-02 02:57:34 +09:00 committed by syuilo
parent a4678e45de
commit 0177023ead
2 changed files with 7 additions and 2 deletions

View File

@ -0,0 +1,4 @@
export default (id: string) => ({
id,
type: 'Tombstone'
});

View File

@ -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,