no message

This commit is contained in:
hellcat 2025-03-22 19:16:44 +08:00
parent c61c060f35
commit b99b242f8c
2 changed files with 3 additions and 1 deletions

View File

@ -63,6 +63,7 @@ final class TicketController extends BaseController
{
$id = $args['id'];
$comment = $request->getParam('comment') ?? '';
$admin_name = $request->getParam('admin_name') ?? 'fuuu';
if ($comment === '') {
return $response->withJson([
@ -84,7 +85,7 @@ final class TicketController extends BaseController
$content_new = [
[
'comment_id' => $content_old[count($content_old) - 1]['comment_id'] + 1,
'commenter_name' => 'Admin',
'commenter_name' => $admin_name,
'comment' => $comment,
'datetime' => time(),
],

View File

@ -77,6 +77,7 @@ final class HookController
$oHttp->sToUrl = $_ENV['baseUrl']."/api/tg/ticket/".$number;
$oHttp->bIsJson = true;
$aData['comment'] = $variableText;
$aData['admin_name'] = $aData["message"]["from"]["first_name"];
$oHttp->aData = $aData;
$r = @json_decode($oHttp->send(), true);