Small fix after refactoring.

This commit is contained in:
Alexey Skobkin 2017-01-06 20:24:40 +03:00
parent e6338b0cbd
commit 565ec33a19

View file

@ -36,7 +36,7 @@ class MessageSender
string $parseMode = self::PARSE_MODE_NOPARSE, string $parseMode = self::PARSE_MODE_NOPARSE,
ReplyKeyboardMarkup $keyboardMarkup = null, ReplyKeyboardMarkup $keyboardMarkup = null,
bool $disableWebPreview = false, bool $disableWebPreview = false,
$disableNotifications = false bool $disableNotifications = false
): bool ): bool
{ {
return $this->sendMessageToChat($account->getChatId(), $text, $parseMode, $keyboardMarkup, $disableWebPreview, $disableNotifications); return $this->sendMessageToChat($account->getChatId(), $text, $parseMode, $keyboardMarkup, $disableWebPreview, $disableNotifications);
@ -48,12 +48,16 @@ class MessageSender
string $parseMode = self::PARSE_MODE_NOPARSE, string $parseMode = self::PARSE_MODE_NOPARSE,
ReplyKeyboardMarkup $keyboardMarkup = null, ReplyKeyboardMarkup $keyboardMarkup = null,
bool $disableWebPreview = false, bool $disableWebPreview = false,
$disableNotifications = false bool $disableNotifications = false
): bool ): bool
{ {
$sendMessage = new SendMessage(); $sendMessage = new SendMessage();
$sendMessage->chat_id = (string) $chatId; $sendMessage->chat_id = (string) $chatId;
$sendMessage->text = $text; $sendMessage->text = $text;
$sendMessage->parse_mode = $parseMode;
$sendMessage->disable_web_page_preview = $disableWebPreview;
$sendMessage->disable_notification = $disableNotifications;
$sendMessage->reply_markup = $keyboardMarkup;
try { try {
$this->client->performApiRequest($sendMessage); $this->client->performApiRequest($sendMessage);