55)
66
77// InitData contains init data.
8- // https://docs.telegram-mini-apps.com/launch-parameters /init-data#parameters-list
8+ // https://docs.telegram-mini-apps.com/platform /init-data
99type InitData struct {
1010 // The date the initialization data was created. Is a number representing a
1111 // Unix timestamp.
@@ -14,20 +14,20 @@ type InitData struct {
1414 // Optional. The number of seconds after which a message can be sent via
1515 // the method answerWebAppQuery.
1616 // https://core.telegram.org/bots/api#answerwebappquery
17- CanSendAfterRaw int `json:"can_send_after"`
17+ CanSendAfterRaw int `json:"can_send_after,omitempty "`
1818
1919 // Optional. An object containing information about the chat with the bot in
2020 // which the Mini Apps was launched. It is returned only for Mini Apps
2121 // opened through the attachment menu.
22- Chat Chat `json:"chat"`
22+ Chat * Chat `json:"chat,omitempty "`
2323
2424 // Optional. The type of chat from which the Mini Apps was opened.
2525 // Returned only for applications opened by direct link.
26- ChatType ChatType `json:"chat_type"`
26+ ChatType ChatType `json:"chat_type,omitempty "`
2727
2828 // Optional. A global identifier indicating the chat from which the Mini
2929 // Apps was opened. Returned only for applications opened by direct link.
30- ChatInstance int64 `json:"chat_instance"`
30+ ChatInstance int64 `json:"chat_instance,omitempty "`
3131
3232 // Initialization data signature.
3333 // https://core.telegram.org/bots/webapps#validating-data-received-via-the-web-app
@@ -36,21 +36,21 @@ type InitData struct {
3636 // Optional. The unique session ID of the Mini App. Used in the process of
3737 // sending a message via the method answerWebAppQuery.
3838 // https://core.telegram.org/bots/api#answerwebappquery
39- QueryID string `json:"query_id"`
39+ QueryID string `json:"query_id,omitempty "`
4040
4141 // Optional. An object containing data about the chat partner of the current
4242 // user in the chat where the bot was launched via the attachment menu.
4343 // Returned only for private chats and only for Mini Apps launched via the
4444 // attachment menu.
45- Receiver User `json:"receiver"`
45+ Receiver * User `json:"receiver,omitempty "`
4646
4747 // Optional. The value of the startattach or startapp query parameter
4848 // specified in the link. It is returned only for Mini Apps opened through
4949 // the attachment menu.
50- StartParam string `json:"start_param"`
50+ StartParam string `json:"start_param,omitempty "`
5151
5252 // Optional. An object containing information about the current user.
53- User User `json:"user"`
53+ User * User `json:"user,omitempty "`
5454}
5555
5656// AuthDate returns AuthDateRaw as time.Time.
0 commit comments