fix: telegram text

This commit is contained in:
Andras Bacsai 2023-11-06 10:49:35 +01:00
parent 6840ddd3e6
commit 83993cbbb2

View File

@ -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,
];
}