Ken пре 2 дана
родитељ
комит
bfc9f74e2a
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      app/Http/Controllers/admin/Config.php

+ 2 - 2
app/Http/Controllers/admin/Config.php

@@ -378,7 +378,7 @@ class Config extends Controller
                 $msg = [];
                 $msg['chat_id'] = "@{$config['chatId']}";
                 $msg['protect_content'] = false;
-                if (in_array($type, ['image', 'text']) && !empty($config['button'])) {
+                if (!empty($config['button'])) {
                     $msg['reply_markup'] = json_encode(['inline_keyboard' => $config['button']]);
                 }
 
@@ -406,7 +406,7 @@ class Config extends Controller
                     $telegram->pinChatMessage(['chat_id' => "@{$config['chatId']}", 'message_id' => $messageId]);
                 }
             } catch (TelegramSDKException $e) {
-                return $this->error(HttpStatus::CUSTOM_ERROR, '保存成功,发送失败',$e->getMessage());
+                return $this->error(HttpStatus::CUSTOM_ERROR, '保存成功,发送失败', $e->getMessage());
             } catch (Exception $e) {
                 return $this->error($e->getCode(), '保存成功,发送失败');
             }