From 59d0d507d5cc9b87a517b9fbec3aa288dc0859f2 Mon Sep 17 00:00:00 2001
From: syuilo <Syuilotan@yahoo.co.jp>
Date: Sun, 9 Apr 2023 10:19:57 +0900
Subject: [PATCH] =?UTF-8?q?fix(backend):=20=E9=80=A3=E5=90=88=E3=81=97?=
 =?UTF-8?q?=E3=81=A6=E3=81=84=E3=82=8B=E3=82=A4=E3=83=B3=E3=82=B9=E3=82=BF?=
 =?UTF-8?q?=E3=83=B3=E3=82=B9=E3=81=AB=E3=81=A4=E3=81=84=E3=81=A6=E4=BA=88?=
 =?UTF-8?q?=E6=9C=9F=E3=81=9B=E3=81=9A=E9=85=8D=E9=80=81=E3=81=8C=E5=85=A8?=
 =?UTF-8?q?=E3=81=A6=E5=81=9C=E6=AD=A2=E3=81=95=E3=82=8C=E3=82=8B=E3=81=93?=
 =?UTF-8?q?=E3=81=A8=E3=81=8C=E3=81=82=E3=82=8B=E5=95=8F=E9=A1=8C=E3=82=92?=
 =?UTF-8?q?=E4=BF=AE=E6=AD=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fix #10499
---
 CHANGELOG.md                                                    | 1 +
 .../backend/src/core/activitypub/ApDeliverManagerService.ts     | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8ec1b2277..5e6fa2cf4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -30,6 +30,7 @@
 - 通知読み込みでエラーが発生する場合がある問題を修正
 - リアクションできないことがある問題を修正
 - IDをaid以外に設定している場合の問題を修正
+- 連合しているインスタンスについて予期せず配送が全て停止されることがある問題を修正
 
 ## 13.11.0
 
diff --git a/packages/backend/src/core/activitypub/ApDeliverManagerService.ts b/packages/backend/src/core/activitypub/ApDeliverManagerService.ts
index 70a6d32fe..62a2a33a1 100644
--- a/packages/backend/src/core/activitypub/ApDeliverManagerService.ts
+++ b/packages/backend/src/core/activitypub/ApDeliverManagerService.ts
@@ -186,7 +186,7 @@ class DeliverManager {
 
 			for (const following of followers) {
 				const inbox = following.followerSharedInbox ?? following.followerInbox;
-				inboxes.set(inbox, following.followerSharedInbox === null);
+				inboxes.set(inbox, following.followerSharedInbox != null);
 			}
 		}