fix: telegram text
This commit is contained in:
parent
6840ddd3e6
commit
83993cbbb2
@ -46,11 +46,12 @@ class SendMessageToTelegramJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
if (!empty($this->buttons)) {
|
if (!empty($this->buttons)) {
|
||||||
foreach ($this->buttons as $button) {
|
foreach ($this->buttons as $button) {
|
||||||
$buttonUrl = data_get($button, 'url');
|
$buttonUrl = data_get($button, 'url');
|
||||||
|
$text = data_get($button, 'text', 'Click here');
|
||||||
if ($buttonUrl && Str::contains($buttonUrl, 'http://localhost')) {
|
if ($buttonUrl && Str::contains($buttonUrl, 'http://localhost')) {
|
||||||
$buttonUrl = str_replace('http://localhost', config('app.url'), $buttonUrl);
|
$buttonUrl = str_replace('http://localhost', config('app.url'), $buttonUrl);
|
||||||
}
|
}
|
||||||
$inlineButtons[] = [
|
$inlineButtons[] = [
|
||||||
'text' => $button['text'],
|
'text' => $text,
|
||||||
'url' => $buttonUrl,
|
'url' => $buttonUrl,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user