|
14 | 14 |
|
15 | 15 | use Longman\TelegramBot\Entities\CallbackQuery;
|
16 | 16 | use Longman\TelegramBot\Entities\Chat;
|
| 17 | +use Longman\TelegramBot\Entities\ChatJoinRequest; |
17 | 18 | use Longman\TelegramBot\Entities\ChatMemberUpdated;
|
18 | 19 | use Longman\TelegramBot\Entities\ChosenInlineResult;
|
19 | 20 | use Longman\TelegramBot\Entities\InlineQuery;
|
@@ -146,6 +147,7 @@ protected static function defineTables(): void
|
146 | 147 | $tables = [
|
147 | 148 | 'callback_query',
|
148 | 149 | 'chat',
|
| 150 | + 'chat_join_request', |
149 | 151 | 'chat_member_updated',
|
150 | 152 | 'chosen_inline_result',
|
151 | 153 | 'edited_message',
|
@@ -351,7 +353,7 @@ protected static function insertTelegramUpdate(
|
351 | 353 | ?string $chat_member_updated_id = null,
|
352 | 354 | ?string $chat_join_request_id = null
|
353 | 355 | ): ?bool {
|
354 |
| - if ($message_id === null && $edited_message_id === null && $channel_post_id === null && $edited_channel_post_id === null && $inline_query_id === null && $chosen_inline_result_id === null && $callback_query_id === null && $shipping_query_id === null && $pre_checkout_query_id === null && $poll_id === null && $poll_answer_poll_id === null && $my_chat_member_updated_id === null && $chat_member_updated_id === null) { |
| 356 | + if ($message_id === null && $edited_message_id === null && $channel_post_id === null && $edited_channel_post_id === null && $inline_query_id === null && $chosen_inline_result_id === null && $callback_query_id === null && $shipping_query_id === null && $pre_checkout_query_id === null && $poll_id === null && $poll_answer_poll_id === null && $my_chat_member_updated_id === null && $chat_member_updated_id === null && $chat_join_request_id === null) { |
355 | 357 | throw new TelegramException('message_id, edited_message_id, channel_post_id, edited_channel_post_id, inline_query_id, chosen_inline_result_id, callback_query_id, shipping_query_id, pre_checkout_query_id, poll_id, poll_answer_poll_id, my_chat_member_updated_id, chat_member_updated_id are all null');
|
356 | 358 | }
|
357 | 359 |
|
@@ -1021,7 +1023,7 @@ public static function insertChatJoinRequestRequest(ChatJoinRequest $chat_join_r
|
1021 | 1023 |
|
1022 | 1024 | try {
|
1023 | 1025 | $sth = self::$pdo->prepare('
|
1024 |
| - INSERT INTO `' . TB_CHAT_MEMBER_UPDATED . '` |
| 1026 | + INSERT INTO `' . TB_CHAT_JOIN_REQUEST . '` |
1025 | 1027 | (`chat_id`, `user_id`, `date`, `bio`, `invite_link`, `created_at`)
|
1026 | 1028 | VALUES
|
1027 | 1029 | (:chat_id, :user_id, :date, :bio, :invite_link, :created_at)
|
|
0 commit comments