Merge pull request #6674 from pixelfed/shleeable-patch-7

Fix: Update type on handleDirectMessage
pull/6697/head
dansup 1 month ago committed by GitHub
commit a5aba15752
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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())) {

Loading…
Cancel
Save