mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-30 16:07:24 +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')]);
|
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);
|
return $this->success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -65,13 +65,13 @@ class Plugin extends AbstractPlugin
|
|||||||
$this->telegramService->sendMessageWithAdmin($message, true);
|
$this->telegramService->sendMessageWithAdmin($message, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function sendTicketNotify(array $data): void
|
public function sendTicketNotify(Ticket $ticket): void
|
||||||
{
|
{
|
||||||
if (!$this->getConfig('enable_ticket_notify', true)) {
|
if (!$this->getConfig('enable_ticket_notify', true)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
[$ticket, $message] = $data;
|
$message = $ticket->messages()->latest()->first();
|
||||||
$user = User::find($ticket->user_id);
|
$user = User::find($ticket->user_id);
|
||||||
if (!$user)
|
if (!$user)
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user