mirror of
https://github.com/v2board/v2board.git
synced 2025-02-25 14:50:26 +08:00
fix: ticket telegram notify
This commit is contained in:
parent
04c06afcff
commit
36bc93e1f8
@ -181,10 +181,15 @@ class TicketController extends Controller
|
|||||||
abort(500, '工单创建失败');
|
abort(500, '工单创建失败');
|
||||||
}
|
}
|
||||||
DB::commit();
|
DB::commit();
|
||||||
$telegramService = new TelegramService();
|
$this->sendNotify($ticket, $ticketMessage);
|
||||||
$telegramService->sendMessageWithAdmin("📮工单提醒 #{$ticket->id}\n———————————————\n主题:\n`{$ticket->subject}`\n内容:\n`{$ticketMessage->message}`");
|
|
||||||
return response([
|
return response([
|
||||||
'data' => true
|
'data' => true
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function sendNotify(Ticket $ticket, TicketMessage $ticketMessage)
|
||||||
|
{
|
||||||
|
$telegramService = new TelegramService();
|
||||||
|
$telegramService->sendMessageWithAdmin("📮工单提醒 #{$ticket->id}\n———————————————\n主题:\n`{$ticket->subject}`\n内容:\n`{$ticketMessage->message}`");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user