Fix: Keep Anonymous Requests Anonymous in Approved Fill Notification

This commit is contained in:
clandestine8
2021-09-09 19:29:29 -04:00
parent 84d037a5d8
commit 4327d0741f

View File

@@ -50,10 +50,18 @@ class NewRequestFillApprove extends Notification implements ShouldQueue
*/
public function toArray($notifiable)
{
if ($this->torrentRequest->anon == 0) {
return [
'title' => $this->sender.' Has Approved Your Fill Of A Requested Torrent',
'body' => $this->sender.' has approved your fill of Requested Torrent '.$this->torrentRequest->name,
'url' => \sprintf('/requests/%s', $this->torrentRequest->id),
];
}
return [
'title' => $this->sender.' Has Approved Your Fill Of A Requested Torrent',
'body' => $this->sender.' has approved your fill of Requested Torrent '.$this->torrentRequest->name,
'title' => 'An anonymous user has Approved Your Fill Of A Requested Torrent',
'body' => 'An anonymous user has approved your fill of Requested Torrent '.$this->torrentRequest->name,
'url' => \sprintf('/requests/%s', $this->torrentRequest->id),
];
}
}