diff --git a/go.mod b/go.mod index ffe2500cc2..6ab2813061 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/go-faster/jx v1.0.0 github.com/go-faster/xor v1.0.0 github.com/go-openapi/inflect v0.19.0 - github.com/gotd/getdoc v0.28.0 + github.com/gotd/getdoc v0.29.0 github.com/gotd/ige v0.2.2 github.com/gotd/neo v0.1.5 github.com/gotd/tl v0.4.0 @@ -16,7 +16,7 @@ require ( github.com/klauspost/compress v1.16.5 github.com/quasilyte/go-ruleguard/dsl v0.3.22 github.com/rogpeppe/go-internal v1.10.0 - github.com/stretchr/testify v1.8.2 + github.com/stretchr/testify v1.8.3 go.opentelemetry.io/otel v1.15.1 go.opentelemetry.io/otel/trace v1.15.1 go.uber.org/atomic v1.11.0 diff --git a/go.sum b/go.sum index b3bfa4a734..007bc9ee3b 100644 --- a/go.sum +++ b/go.sum @@ -50,6 +50,8 @@ github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvK github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gotd/getdoc v0.28.0 h1:tDF/f7pF5BSWY3T2k80kyLkdaNmMbMZLmctdL60/04Y= github.com/gotd/getdoc v0.28.0/go.mod h1:/RwYdCKuZU4vIjCpry7gf6eG6U1ZHvC/Y7WNT/pRTcw= +github.com/gotd/getdoc v0.29.0 h1:hf8l4LunGVAGVsBxPAsTG54IgqwPyNwByuDgdsEDFAw= +github.com/gotd/getdoc v0.29.0/go.mod h1:RXkV6eH+7fBIDFQV6f4JQcFl3n+AdxyvJ4ruf5+O9Ik= github.com/gotd/ige v0.2.2 h1:XQ9dJZwBfDnOGSTxKXBGP4gMud3Qku2ekScRjDWWfEk= github.com/gotd/ige v0.2.2/go.mod h1:tuCRb+Y5Y3eNTo3ypIfNpQ4MFjrnONiL2jN2AKZXmb0= github.com/gotd/neo v0.1.5 h1:oj0iQfMbGClP8xI59x7fE/uHoTJD7NZH9oV1WNuPukQ= @@ -109,6 +111,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= diff --git a/tg/e2e/tl_message_entity_gen.go b/tg/e2e/tl_message_entity_gen.go index 5d9675f621..6dd8e9d95f 100644 --- a/tg/e2e/tl_message_entity_gen.go +++ b/tg/e2e/tl_message_entity_gen.go @@ -1662,11 +1662,15 @@ func (m *MessageEntityPre) GetLanguage() (value string) { // MessageEntityTextURL represents TL type `messageEntityTextUrl#76a6d327`. // Message entity representing a text url¹: for in-text urls like https://google.com² // use messageEntityUrl³. +// Note that an additional confirmation popup with the full URL must be displayed to the +// user before opening this link, unless the domain is one of the whitelisted domains +// specified in the whitelisted_domains client configuration parameter »¹. // // Links: // 1. https://google.com // 2. https://google.com // 3. https://core.telegram.org/constructor/messageEntityUrl +// 4. https://core.telegram.org/api/config#whitelisted-domains // // See https://core.telegram.org/constructor/messageEntityTextUrl for reference. type MessageEntityTextURL struct { diff --git a/tg/tl_auth_sent_code_type_gen.go b/tg/tl_auth_sent_code_type_gen.go index e44528c55f..d26394c5e6 100644 --- a/tg/tl_auth_sent_code_type_gen.go +++ b/tg/tl_auth_sent_code_type_gen.go @@ -765,11 +765,12 @@ type AuthSentCodeTypeEmailCode struct { EmailPattern string // Length of the sent verification code Length int - // The login email can be reset by invoking auth.resetLoginEmail¹ and waiting for the - // specified amount of seconds. + // Clients should wait for the specified amount of seconds before allowing the user to + // invoke auth.resetLoginEmail¹ (will be 0 for Premium² users). // // Links: // 1) https://core.telegram.org/method/auth.resetLoginEmail + // 2) https://core.telegram.org/api/premium // // Use SetResetAvailablePeriod and GetResetAvailablePeriod helpers. ResetAvailablePeriod int diff --git a/tg/tl_channels_update_username_gen.go b/tg/tl_channels_update_username_gen.go index 7df6aa2c5d..1d7524a236 100644 --- a/tg/tl_channels_update_username_gen.go +++ b/tg/tl_channels_update_username_gen.go @@ -32,13 +32,13 @@ var ( ) // ChannelsUpdateUsernameRequest represents TL type `channels.updateUsername#3514b3de`. -// Change the username of a supergroup/channel +// Change or remove the username of a supergroup/channel // // See https://core.telegram.org/method/channels.updateUsername for reference. type ChannelsUpdateUsernameRequest struct { // Channel Channel InputChannelClass - // New username + // New username, pass an empty string to remove the username Username string } @@ -199,7 +199,7 @@ func (u *ChannelsUpdateUsernameRequest) GetChannelAsNotEmpty() (NotEmptyInputCha } // ChannelsUpdateUsername invokes method channels.updateUsername#3514b3de returning error if any. -// Change the username of a supergroup/channel +// Change or remove the username of a supergroup/channel // // Possible errors: // diff --git a/tg/tl_help_get_user_info_gen.go b/tg/tl_help_get_user_info_gen.go index bf76f843bd..6bc8b35bab 100644 --- a/tg/tl_help_get_user_info_gen.go +++ b/tg/tl_help_get_user_info_gen.go @@ -32,7 +32,7 @@ var ( ) // HelpGetUserInfoRequest represents TL type `help.getUserInfo#38a08d3`. -// Internal use +// Can only be used by TSF members to obtain internal information. // // See https://core.telegram.org/method/help.getUserInfo for reference. type HelpGetUserInfoRequest struct { @@ -167,7 +167,7 @@ func (g *HelpGetUserInfoRequest) GetUserID() (value InputUserClass) { } // HelpGetUserInfo invokes method help.getUserInfo#38a08d3 returning error if any. -// Internal use +// Can only be used by TSF members to obtain internal information. // // Possible errors: // diff --git a/tg/tl_message_entity_gen.go b/tg/tl_message_entity_gen.go index 125b09c78e..adb9e89d92 100644 --- a/tg/tl_message_entity_gen.go +++ b/tg/tl_message_entity_gen.go @@ -1754,11 +1754,15 @@ func (m *MessageEntityPre) GetLanguage() (value string) { // MessageEntityTextURL represents TL type `messageEntityTextUrl#76a6d327`. // Message entity representing a text url¹: for in-text urls like https://google.com² // use messageEntityUrl³. +// Note that an additional confirmation popup with the full URL must be displayed to the +// user before opening this link, unless the domain is one of the whitelisted domains +// specified in the whitelisted_domains client configuration parameter »¹. // // Links: // 1. https://google.com // 2. https://google.com // 3. https://core.telegram.org/constructor/messageEntityUrl +// 4. https://core.telegram.org/api/config#whitelisted-domains // // See https://core.telegram.org/constructor/messageEntityTextUrl for reference. type MessageEntityTextURL struct { diff --git a/tg/tl_messages_send_reaction_gen.go b/tg/tl_messages_send_reaction_gen.go index 23d03f55dc..68df1c86fa 100644 --- a/tg/tl_messages_send_reaction_gen.go +++ b/tg/tl_messages_send_reaction_gen.go @@ -32,7 +32,12 @@ var ( ) // MessagesSendReactionRequest represents TL type `messages.sendReaction#d30d78d4`. -// React to message +// React to message. +// Starting from layer 159, the reaction will be sent from the peer specified using +// messages.saveDefaultSendAs¹. +// +// Links: +// 1. https://core.telegram.org/method/messages.saveDefaultSendAs // // See https://core.telegram.org/method/messages.sendReaction for reference. type MessagesSendReactionRequest struct { @@ -52,7 +57,7 @@ type MessagesSendReactionRequest struct { Peer InputPeerClass // Message ID to react to MsgID int - // Reaction (a UTF8 emoji) + // A list of reactions // // Use SetReaction and GetReaction helpers. Reaction []ReactionClass @@ -362,7 +367,12 @@ func (s *MessagesSendReactionRequest) MapReaction() (value ReactionClassArray, o } // MessagesSendReaction invokes method messages.sendReaction#d30d78d4 returning error if any. -// React to message +// React to message. +// Starting from layer 159, the reaction will be sent from the peer specified using +// messages.saveDefaultSendAs¹. +// +// Links: +// 1. https://core.telegram.org/method/messages.saveDefaultSendAs // // Possible errors: // diff --git a/tg/tl_messages_set_chat_wall_paper_gen.go b/tg/tl_messages_set_chat_wall_paper_gen.go index 9b57f0fec6..16ee031b2a 100644 --- a/tg/tl_messages_set_chat_wall_paper_gen.go +++ b/tg/tl_messages_set_chat_wall_paper_gen.go @@ -46,8 +46,9 @@ type MessagesSetChatWallPaperRequest struct { Flags bin.Fields // The private chat where the wallpaper will be set Peer InputPeerClass - // The wallpaper »¹, obtained as described in the wallpaper documentation »² or from - // a messageActionSetChatWallPaper³ service message. + // The wallpaper »¹, obtained as described in the wallpaper documentation »²; must + // not be provided when installing a wallpaper obtained from a + // messageActionSetChatWallPaper³ service message (id must be provided, instead). // // Links: // 1) https://core.telegram.org/api/wallpapers