mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-14 11:20:53 +08:00
fix: resolve Telegram ticket notification issue
This commit is contained in:
@@ -87,7 +87,7 @@ class TicketController extends Controller
|
||||
) {
|
||||
return $this->fail([400, __('Ticket reply failed')]);
|
||||
}
|
||||
HookManager::call('ticket.reply.user.after', [$ticket, $this->getLastMessage($ticket->id)]);
|
||||
HookManager::call('ticket.reply.user.after', $ticket);
|
||||
return $this->success(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -65,13 +65,13 @@ class Plugin extends AbstractPlugin
|
||||
$this->telegramService->sendMessageWithAdmin($message, true);
|
||||
}
|
||||
|
||||
public function sendTicketNotify(array $data): void
|
||||
public function sendTicketNotify(Ticket $ticket): void
|
||||
{
|
||||
if (!$this->getConfig('enable_ticket_notify', true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
[$ticket, $message] = $data;
|
||||
$message = $ticket->messages()->latest()->first();
|
||||
$user = User::find($ticket->user_id);
|
||||
if (!$user)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user