@@ -21,7 +21,8 @@ class Update extends TelegramTypes
21
21
/**
22
22
* The update‘s unique identifier. Update identifiers start from a certain positive number and increase
23
23
* sequentially. This ID becomes especially handy if you’re using Webhooks, since it allows you to ignore repeated
24
- * updates or to restore the correct update sequence, should they get out of order.
24
+ * updates or to restore the correct update sequence, should they get out of order. If there are no new updates for
25
+ * at least a week, then identifier of the next update will be chosen randomly instead of sequentially.
25
26
* @var int
26
27
*/
27
28
public $ update_id = 0 ;
@@ -57,7 +58,9 @@ class Update extends TelegramTypes
57
58
public $ inline_query ;
58
59
59
60
/**
60
- * Optional. The result of a inline query that was chosen by a user and sent to their chat partner
61
+ * Optional. The result of a inline query that was chosen by a user and sent to their chat partner. Please see our
62
+ * documentation on the feedback collecting for details on how to enable these updates for your bot.
63
+ * @see https://core.telegram.org/bots/inline#collecting-feedback
61
64
* @var ChosenResult
62
65
*/
63
66
public $ chosen_inline_result ;
@@ -94,6 +97,30 @@ class Update extends TelegramTypes
94
97
*/
95
98
public $ poll_answer ;
96
99
100
+ /**
101
+ * Optional. The bot's chat member status was updated in a chat. For private chats, this update is received only
102
+ * when the bot is blocked or unblocked by the user.
103
+ *
104
+ * @var ChatMemberUpdated
105
+ */
106
+ public $ my_chat_member ;
107
+
108
+ /**
109
+ * Optional. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must
110
+ * explicitly specify “chat_member” in the list of allowed_updates to receive these updates.
111
+ *
112
+ * @var ChatMemberUpdated
113
+ */
114
+ public $ chat_member ;
115
+
116
+ /**
117
+ * Optional. A request to join the chat has been sent. The bot must have the can_invite_users administrator right
118
+ * in the chat to receive these updates.
119
+ *
120
+ * @var ChatJoinRequest
121
+ */
122
+ public $ chat_join_request ;
123
+
97
124
protected function mapSubObjects (string $ key , array $ data ): TelegramTypes
98
125
{
99
126
switch ($ key ) {
@@ -116,6 +143,11 @@ protected function mapSubObjects(string $key, array $data): TelegramTypes
116
143
return new Poll ($ data , $ this ->logger );
117
144
case 'poll_answer ' :
118
145
return new PollAnswer ($ data , $ this ->logger );
146
+ case 'my_chat_member ' :
147
+ case 'chat_member ' :
148
+ return new ChatMemberUpdated ($ data , $ this ->logger );
149
+ case 'chat_join_request ' :
150
+ return new ChatJoinRequest ($ data , $ this ->logger );
119
151
}
120
152
121
153
return parent ::mapSubObjects ($ key , $ data );
0 commit comments