Skip to content

Commit aca559b

Browse files
committed
insertMessageRequest inserts new fields too
1 parent af87d9f commit aca559b

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/DB.php

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,24 +1131,26 @@ public static function insertMessageRequest(Message $message): bool
11311131
$sth = self::$pdo->prepare('
11321132
INSERT IGNORE INTO `' . TB_MESSAGE . '`
11331133
(
1134-
`id`, `user_id`, `chat_id`, `sender_chat_id`, `date`, `forward_from`, `forward_from_chat`, `forward_from_message_id`,
1135-
`forward_signature`, `forward_sender_name`, `forward_date`,
1134+
`id`, `user_id`, `chat_id`, `message_thread_id`, `sender_chat_id`, `date`, `forward_from`, `forward_from_chat`, `forward_from_message_id`,
1135+
`forward_signature`, `forward_sender_name`, `forward_date`, `is_topic_message`,
11361136
`reply_to_chat`, `reply_to_message`, `via_bot`, `edit_date`, `media_group_id`, `author_signature`, `text`, `entities`, `caption_entities`,
11371137
`audio`, `document`, `animation`, `game`, `photo`, `sticker`, `video`, `voice`, `video_note`, `caption`, `contact`,
11381138
`location`, `venue`, `poll`, `dice`, `new_chat_members`, `left_chat_member`,
11391139
`new_chat_title`, `new_chat_photo`, `delete_chat_photo`, `group_chat_created`,
11401140
`supergroup_chat_created`, `channel_chat_created`, `message_auto_delete_timer_changed`, `migrate_to_chat_id`, `migrate_from_chat_id`,
11411141
`pinned_message`, `invoice`, `successful_payment`, `connected_website`, `passport_data`, `proximity_alert_triggered`,
1142+
`forum_topic_created`, `forum_topic_closed`, `forum_topic_reopened`,
11421143
`video_chat_scheduled`, `video_chat_started`, `video_chat_ended`, `video_chat_participants_invited`, `web_app_data`, `reply_markup`
11431144
) VALUES (
1144-
:message_id, :user_id, :chat_id, :sender_chat_id, :date, :forward_from, :forward_from_chat, :forward_from_message_id,
1145-
:forward_signature, :forward_sender_name, :forward_date,
1145+
:message_id, :user_id, :chat_id, :message_thread_id, :sender_chat_id, :date, :forward_from, :forward_from_chat, :forward_from_message_id,
1146+
:forward_signature, :forward_sender_name, :forward_date, :is_topic_message,
11461147
:reply_to_chat, :reply_to_message, :via_bot, :edit_date, :media_group_id, :author_signature, :text, :entities, :caption_entities,
11471148
:audio, :document, :animation, :game, :photo, :sticker, :video, :voice, :video_note, :caption, :contact,
11481149
:location, :venue, :poll, :dice, :new_chat_members, :left_chat_member,
11491150
:new_chat_title, :new_chat_photo, :delete_chat_photo, :group_chat_created,
11501151
:supergroup_chat_created, :channel_chat_created, :message_auto_delete_timer_changed, :migrate_to_chat_id, :migrate_from_chat_id,
11511152
:pinned_message, :invoice, :successful_payment, :connected_website, :passport_data, :proximity_alert_triggered,
1153+
:forum_topic_created, :forum_topic_closed, :forum_topic_reopened,
11521154
:video_chat_scheduled, :video_chat_started, :video_chat_ended, :video_chat_participants_invited, :web_app_data, :reply_markup
11531155
)
11541156
');
@@ -1167,6 +1169,7 @@ public static function insertMessageRequest(Message $message): bool
11671169
$sth->bindValue(':message_id', $message->getMessageId());
11681170
$sth->bindValue(':chat_id', $chat_id);
11691171
$sth->bindValue(':sender_chat_id', $sender_chat_id);
1172+
$sth->bindValue(':message_thread_id', $message->getMessageThreadId());
11701173
$sth->bindValue(':user_id', $user_id);
11711174
$sth->bindValue(':date', $date);
11721175
$sth->bindValue(':forward_from', $forward_from);
@@ -1175,6 +1178,7 @@ public static function insertMessageRequest(Message $message): bool
11751178
$sth->bindValue(':forward_signature', $message->getForwardSignature());
11761179
$sth->bindValue(':forward_sender_name', $message->getForwardSenderName());
11771180
$sth->bindValue(':forward_date', $forward_date);
1181+
$sth->bindValue(':is_topic_message', $message->getIsTopicMessage());
11781182

11791183
$reply_to_chat_id = null;
11801184
if ($reply_to_message_id !== null) {
@@ -1222,6 +1226,9 @@ public static function insertMessageRequest(Message $message): bool
12221226
$sth->bindValue(':connected_website', $message->getConnectedWebsite());
12231227
$sth->bindValue(':passport_data', $message->getPassportData());
12241228
$sth->bindValue(':proximity_alert_triggered', $message->getProximityAlertTriggered());
1229+
$sth->bindValue(':forum_topic_created', $message->getForumTopicCreated());
1230+
$sth->bindValue(':forum_topic_closed', $message->getForumTopicClosed());
1231+
$sth->bindValue(':forum_topic_reopened', $message->getForumTopicReopened());
12251232
$sth->bindValue(':video_chat_scheduled', $message->getVideoChatScheduled());
12261233
$sth->bindValue(':video_chat_started', $message->getVideoChatStarted());
12271234
$sth->bindValue(':video_chat_ended', $message->getVideoChatEnded());

0 commit comments

Comments
 (0)