Also save the Message reply_markup to DB.

parent a9b15e84
......@@ -927,7 +927,7 @@ class DB
`location`, `venue`, `poll`, `new_chat_members`, `left_chat_member`,
`new_chat_title`, `new_chat_photo`, `delete_chat_photo`, `group_chat_created`,
`supergroup_chat_created`, `channel_chat_created`, `migrate_to_chat_id`, `migrate_from_chat_id`,
`pinned_message`, `invoice`, `successful_payment`, `connected_website`, `passport_data`
`pinned_message`, `invoice`, `successful_payment`, `connected_website`, `passport_data`, `reply_markup`
) VALUES (
:message_id, :user_id, :chat_id, :date, :forward_from, :forward_from_chat, :forward_from_message_id,
:forward_signature, :forward_sender_name, :forward_date,
......@@ -936,7 +936,7 @@ class DB
:location, :venue, :poll, :new_chat_members, :left_chat_member,
:new_chat_title, :new_chat_photo, :delete_chat_photo, :group_chat_created,
:supergroup_chat_created, :channel_chat_created, :migrate_to_chat_id, :migrate_from_chat_id,
:pinned_message, :invoice, :successful_payment, :connected_website, :passport_data
:pinned_message, :invoice, :successful_payment, :connected_website, :passport_data, :reply_markup
)
');
......@@ -1008,6 +1008,7 @@ class DB
$sth->bindValue(':successful_payment', $message->getSuccessfulPayment());
$sth->bindValue(':connected_website', $message->getConnectedWebsite());
$sth->bindValue(':passport_data', $message->getPassportData());
$sth->bindValue(':reply_markup', $message->getReplyMarkup());
return $sth->execute();
} catch (PDOException $e) {
......
......@@ -315,6 +315,7 @@ class Message extends Entity
'invoice',
'successful_payment',
'passport_data',
'reply_markup',
];
$is_command = strlen($this->getCommand()) > 0;
......
......@@ -115,6 +115,7 @@ CREATE TABLE IF NOT EXISTS `message` (
`successful_payment` TEXT NULL COMMENT 'Message is a service message about a successful payment, information about the payment',
`connected_website` TEXT NULL COMMENT 'The domain name of the website on which the user has logged in.',
`passport_data` TEXT NULL COMMENT 'Telegram Passport data',
`reply_markup` TEXT NULL COMMENT 'Inline keyboard attached to the message',
PRIMARY KEY (`chat_id`, `id`),
KEY `user_id` (`user_id`),
......
ALTER TABLE `message` ADD COLUMN `reply_markup` TEXT NULL COMMENT 'Inline keyboard attached to the message' AFTER `passport_data`;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment