report = $report; } /** * Get the message envelope. * * @return \Illuminate\Mail\Mailables\Envelope */ public function envelope() { return new Envelope( subject: '['.config('pixelfed.domain.app').'] Spam Post Detected (Ref: autospam-'.$this->report->id.')', ); } /** * Get the message content definition. * * @return \Illuminate\Mail\Mailables\Content */ public function content() { $data = $this->report->toArray(); $reported_status = null; $reported_account = null; $url = url('/i/admin/reports/autospam/'.$this->report->id.'?ref=email'); if ($data['item_type'] === 'App\Status') { $reported_status = StatusService::get($this->report->item_id, false); $reported_account = AccountService::get($reported_status['account']['id'], true); } return new Content( markdown: 'emails.admin.new_autospam', with: [ 'report' => $data, 'url' => $url, 'reported_status' => $reported_status, 'reported_account' => $reported_account, ] ); } /** * Get the attachments for the message. * * @return array */ public function attachments() { return []; } }