]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Кнопки на сообщения в ТГ origin/feature_fomichev_erp-276_create_table_send_test_messages
authorfomichev <vladimir.fomichev@erp-flowers.ru>
Tue, 28 Jan 2025 06:24:45 +0000 (09:24 +0300)
committerfomichev <vladimir.fomichev@erp-flowers.ru>
Tue, 28 Jan 2025 06:24:45 +0000 (09:24 +0300)
erp24/services/TelegramService.php

index eaf28c5caebde1efbc3a2a9233f8234f26ab1ae6..4cfb70bcc795971563e4b1bcca895604bcfa1aeb 100644 (file)
@@ -4,6 +4,7 @@ namespace yii_app\services;
 
 use GuzzleHttp\Client;
 use Yii;
+use yii\helpers\Json;
 use yii_app\records\UsersTelegramMessage;
 
 class TelegramService
@@ -94,6 +95,18 @@ class TelegramService
                     'chat_id' => $chatId,
                     'text' => $message,
                     'parse_mode' => 'MarkdownV2',
+                    'reply_markup' => Json::encode([
+                        "inline_keyboard" => [
+                            [
+                                ['text' => "Наш сайт", "url" => "https://bazacvetov24.ru/"],
+                                ['text' => "Адреса салонов", "url" => "https://bazacvetov24.ru/contacts/"],
+                            ],
+                            [
+                                ['text' => "1000 руб. забрать", "url" => "https://bazacvetov24.ru/akcii/"],
+                                ['text' => 'Списание бонусов', 'url' => 'https://bazacvetov24.ru/bonuses/']
+                            ]
+                        ]
+                    ]),
                 ],
             ]);