From ee44de8004826cf5c22828b2e9fc2ba43940276f Mon Sep 17 00:00:00 2001 From: Roardom Date: Sun, 16 Feb 2025 18:10:02 +0000 Subject: [PATCH] fix: similar torrent bulk deletion These objects passed to the notification must be users, not ids. --- app/Http/Livewire/SimilarTorrent.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Http/Livewire/SimilarTorrent.php b/app/Http/Livewire/SimilarTorrent.php index 713a1be38..cf6e8e08f 100644 --- a/app/Http/Livewire/SimilarTorrent.php +++ b/app/Http/Livewire/SimilarTorrent.php @@ -27,6 +27,7 @@ use App\Models\Torrent; use App\Models\TorrentRequest; use App\Models\Tv; use App\Models\Type; +use App\Models\User; use App\Notifications\TorrentsDeleted; use App\Services\Unit3dAnnounce; use App\Traits\CastLivewireProperties; @@ -469,7 +470,10 @@ class SimilarTorrent extends Component $torrent->delete(); } - Notification::send($users, new TorrentsDeleted($torrents, $title, $this->reason)); + Notification::send( + array_map(fn ($userId) => new User(['id' => $userId]), $users), + new TorrentsDeleted($torrents, $title, $this->reason) + ); $this->checked = []; $this->selectPage = false;