From 83993cbbb23faa6d9bc1755f90c01910bbb3f6e8 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 6 Nov 2023 10:49:35 +0100 Subject: [PATCH] fix: telegram text --- app/Jobs/SendMessageToTelegramJob.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Jobs/SendMessageToTelegramJob.php b/app/Jobs/SendMessageToTelegramJob.php index 23d49c40e..4785da669 100644 --- a/app/Jobs/SendMessageToTelegramJob.php +++ b/app/Jobs/SendMessageToTelegramJob.php @@ -46,11 +46,12 @@ public function handle(): void if (!empty($this->buttons)) { foreach ($this->buttons as $button) { $buttonUrl = data_get($button, 'url'); + $text = data_get($button, 'text', 'Click here'); if ($buttonUrl && Str::contains($buttonUrl, 'http://localhost')) { $buttonUrl = str_replace('http://localhost', config('app.url'), $buttonUrl); } $inlineButtons[] = [ - 'text' => $button['text'], + 'text' => $text, 'url' => $buttonUrl, ]; }