From 0292c5196df48f67bb7914e925560ba69e2b2980 Mon Sep 17 00:00:00 2001 From: mei23 Date: Mon, 17 May 2021 05:26:11 +0900 Subject: [PATCH] Fix Announce/Delete AP deliver --- src/remote/activitypub/renderer/announce.ts | 4 ++-- src/services/note/delete.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/remote/activitypub/renderer/announce.ts b/src/remote/activitypub/renderer/announce.ts index f577dbbc89..2a28b954d2 100644 --- a/src/remote/activitypub/renderer/announce.ts +++ b/src/remote/activitypub/renderer/announce.ts @@ -13,8 +13,8 @@ export default (object: any, note: Note) => { } else if (note.visibility === 'home') { to = [`${attributedTo}/followers`]; cc = ['https://www.w3.org/ns/activitystreams#Public']; - } else { - return null; + } else if (note.visibility === 'followers') { + to = [`${attributedTo}/followers`]; } return { diff --git a/src/services/note/delete.ts b/src/services/note/delete.ts index 3f4f8b404c..a7ac86e106 100644 --- a/src/services/note/delete.ts +++ b/src/services/note/delete.ts @@ -35,7 +35,7 @@ export default async function(user: User, note: Note, quiet = false) { }); //#region ローカルの投稿なら削除アクティビティを配送 - if (Users.isLocalUser(user)) { + if (Users.isLocalUser(user) && !note.localOnly) { let renote: Note | undefined; // if deletd note is renote