Skip to content

Commit

Permalink
AP Delete Note できなかったらスキップ
Browse files Browse the repository at this point in the history
  • Loading branch information
mei23 committed Dec 8, 2019
1 parent 33ec316 commit fba85b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/remote/activitypub/kernel/delete/note.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ export default async function(actor: IRemoteUser, uri: string): Promise<void> {
const note = await Note.findOne({ uri });

if (note == null) {
throw new Error('note not found');
logger.warn(`note not found: ${uri}`);
}

if (!note.userId.equals(actor._id)) {
throw new Error('投稿を削除しようとしているユーザーは投稿の作成者ではありません');
logger.warn(`投稿を削除しようとしているユーザーは投稿の作成者ではありません: ${uri}`);
}

await deleteNode(actor, note);
Expand Down

0 comments on commit fba85b7

Please sign in to comment.