From 9d5e2d4f1f4917ebd4027244fe5a9f736efa5e16 Mon Sep 17 00:00:00 2001 From: Shlee Date: Tue, 11 Aug 2026 21:49:02 +0930 Subject: [PATCH] Update Inbox.php --- app/Util/ActivityPub/Inbox.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Util/ActivityPub/Inbox.php b/app/Util/ActivityPub/Inbox.php index 7fd407e58..32c6b8f5c 100644 --- a/app/Util/ActivityPub/Inbox.php +++ b/app/Util/ActivityPub/Inbox.php @@ -416,9 +416,13 @@ class Inbox public function handleDirectMessage() { $activity = $this->payload['object']; + $to = $activity['to'] ?? []; + if (is_string($to)) { + $to = [$to]; + } $actor = $this->actorFirstOrCreate($this->payload['actor']); $profile = Profile::whereNull('domain') - ->whereUsername(array_last(explode('/', $activity['to'][0]))) + ->whereUsername(array_last(explode('/', $to[0]))) ->firstOrFail(); if (! $actor || in_array($actor->id, $profile->blockedIds()->toArray())) {