diff --git a/readthedocs/misc/changelog.rst b/readthedocs/misc/changelog.rst index 406d3eea..af77d83b 100644 --- a/readthedocs/misc/changelog.rst +++ b/readthedocs/misc/changelog.rst @@ -13,6 +13,39 @@ it can take advantage of new goodies! .. contents:: List of All Versions +New Layer and some Bug fixes (v1.26) +==================================== + +This new layer includes things such as emoji status, more admin log events, +forum topics and message reactions, among other things. You can access these +using raw API. It also contains a few bug fixes. + +These were fixed in the v1.25 series: + +* ``client.edit_admin`` did not work on small group chats. +* ``client.get_messages`` could stop early in some channels. +* ``client.download_profile_photo`` now should work even if ``User.min``. +* ``client.disconnect`` should no longer hang when being called from within + an event handlers. +* ``client.get_dialogs`` now initializes the update state for channels. +* The message sender should not need to be fetched in more cases. +* Lowered the severity of some log messages to be less spammy. + +These are new to v1.26.0: + +* Layer update. +* New documented RPC errors. +* Sometimes the first message update to a channel could be missed if said + message was read immediately. +* ``client.get_dialogs`` would fail when the total count evenly divided + the chunk size of 100. +* ``client.get_messages`` could get stuck during a global search. +* Potentially fixed some issues when sending certain videos. +* Update handling should be more resilient. +* The client should handle having its auth key destroyed more gracefully. +* Fixed some issues when logging certain messages. + + Bug fixes (v1.25.1) =================== diff --git a/telethon/version.py b/telethon/version.py index a8524931..c261638c 100644 --- a/telethon/version.py +++ b/telethon/version.py @@ -1,3 +1,3 @@ # Versions should comply with PEP440. # This line is parsed in setup.py: -__version__ = '1.25.4' +__version__ = '1.26.0' diff --git a/telethon_generator/data/api.tl b/telethon_generator/data/api.tl index 742f02e1..be5012ab 100644 --- a/telethon_generator/data/api.tl +++ b/telethon_generator/data/api.tl @@ -266,7 +266,7 @@ messages.dialogsNotModified#f0e3e596 count:int = messages.Dialogs; messages.messages#8c718e87 messages:Vector chats:Vector users:Vector = messages.Messages; messages.messagesSlice#3a54685e flags:# inexact:flags.1?true count:int next_rate:flags.0?int offset_id_offset:flags.2?int messages:Vector chats:Vector users:Vector = messages.Messages; -messages.channelMessages#64479808 flags:# inexact:flags.1?true pts:int count:int offset_id_offset:flags.2?int messages:Vector chats:Vector users:Vector = messages.Messages; +messages.channelMessages#c776ba4e flags:# inexact:flags.1?true pts:int count:int offset_id_offset:flags.2?int messages:Vector topics:Vector chats:Vector users:Vector = messages.Messages; messages.messagesNotModified#74535f21 count:int = messages.Messages; messages.chats#64ff9fd5 chats:Vector = messages.Chats; @@ -401,7 +401,8 @@ updateRecentEmojiStatuses#30f443db = Update; updateRecentReactions#6f7863f4 = Update; updateMoveStickerSetToTop#86fccf85 flags:# masks:flags.0?true emojis:flags.1?true stickerset:long = Update; updateMessageExtendedMedia#5a73a98c peer:Peer msg_id:int extended_media:MessageExtendedMedia = Update; -updateChannelPinnedTopic#f694b0ae flags:# channel_id:long topic_id:flags.0?int = Update; +updateChannelPinnedTopic#192efbe3 flags:# pinned:flags.0?true channel_id:long topic_id:int = Update; +updateChannelPinnedTopics#fe198602 flags:# channel_id:long order:flags.0?Vector = Update; updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State; @@ -1466,7 +1467,7 @@ stickerKeyword#fcfeb29c document_id:long keyword:Vector = StickerKeyword username#b4073647 flags:# editable:flags.0?true active:flags.1?true username:string = Username; forumTopicDeleted#23f109b id:int = ForumTopic; -forumTopic#71701da9 flags:# my:flags.1?true closed:flags.2?true pinned:flags.3?true id:int date:int title:string icon_color:int icon_emoji_id:flags.0?long top_message:int read_inbox_max_id:int read_outbox_max_id:int unread_count:int unread_mentions_count:int unread_reactions_count:int from_id:Peer notify_settings:PeerNotifySettings draft:flags.4?DraftMessage = ForumTopic; +forumTopic#71701da9 flags:# my:flags.1?true closed:flags.2?true pinned:flags.3?true short:flags.5?true id:int date:int title:string icon_color:int icon_emoji_id:flags.0?long top_message:int read_inbox_max_id:int read_outbox_max_id:int unread_count:int unread_mentions_count:int unread_reactions_count:int from_id:Peer notify_settings:PeerNotifySettings draft:flags.4?DraftMessage = ForumTopic; messages.forumTopics#367617d3 flags:# order_by_create_date:flags.0?true count:int topics:Vector messages:Vector chats:Vector users:Vector pts:int = messages.ForumTopics; @@ -1880,6 +1881,7 @@ channels.getForumTopicsByID#b0831eb9 channel:InputChannel topics:Vector = m channels.editForumTopic#6c883e2d flags:# channel:InputChannel topic_id:int title:flags.0?string icon_emoji_id:flags.1?long closed:flags.2?Bool = Updates; channels.updatePinnedForumTopic#6c2d9026 channel:InputChannel topic_id:int pinned:Bool = Updates; channels.deleteTopicHistory#34435f2d channel:InputChannel top_msg_id:int = messages.AffectedHistory; +channels.reorderPinnedForumTopics#2950a18f flags:# force:flags.0?true channel:InputChannel order:Vector = Updates; bots.sendCustomRequest#aa2769ed custom_method:string params:DataJSON = DataJSON; bots.answerWebhookJSONQuery#e6213f4d query_id:long data:DataJSON = Bool; @@ -1958,4 +1960,4 @@ stats.getMegagroupStats#dcdf8607 flags:# dark:flags.0?true channel:InputChannel stats.getMessagePublicForwards#5630281b channel:InputChannel msg_id:int offset_rate:int offset_peer:InputPeer offset_id:int limit:int = messages.Messages; stats.getMessageStats#b6e0a3f5 flags:# dark:flags.0?true channel:InputChannel msg_id:int = stats.MessageStats; -// LAYER 148 +// LAYER 149 diff --git a/telethon_generator/data/errors.csv b/telethon_generator/data/errors.csv index 61a4a2f7..856bf98d 100644 --- a/telethon_generator/data/errors.csv +++ b/telethon_generator/data/errors.csv @@ -57,6 +57,7 @@ CALL_PEER_INVALID,400,The provided call peer object is invalid CALL_PROTOCOL_FLAGS_INVALID,400,Call protocol flags invalid CDN_METHOD_INVALID,400,This method cannot be invoked on a CDN server. Refer to https://core.telegram.org/cdn#schema for available methods CHANNELS_ADMIN_PUBLIC_TOO_MUCH,400,"You're admin of too many public channels, make some channels private to change the username of this channel" +CHANNEL_TOO_BIG,400, CHANNELS_TOO_MUCH,400,You have joined too many channels/supergroups CHANNEL_BANNED,400,The channel is banned CHANNEL_INVALID,400,"Invalid channel object. Make sure to pass the right types, for instance making sure that the request is designed for channels or otherwise look for a different one more suited" @@ -252,6 +253,7 @@ PASSWORD_REQUIRED,400,The account must have 2-factor authentication enabled (a p PASSWORD_TOO_FRESH_X,400,The password was added too recently and {seconds} seconds must pass before using the method PAYMENT_PROVIDER_INVALID,400,The payment provider was not recognised or its token was invalid PEER_FLOOD,400,Too many requests +PEER_HISTORY_EMPTY,400, PEER_ID_INVALID,400,"An invalid Peer was used. Make sure to pass the right peer type and that the value is valid (for instance, bots cannot start conversations)" PEER_ID_NOT_SUPPORTED,400,The provided peer ID is not supported PERSISTENT_TIMESTAMP_EMPTY,400,Persistent timestamp empty diff --git a/telethon_generator/data/methods.csv b/telethon_generator/data/methods.csv index a1981b39..e32f5a24 100644 --- a/telethon_generator/data/methods.csv +++ b/telethon_generator/data/methods.csv @@ -92,7 +92,7 @@ channels.checkUsername,user,CHANNEL_INVALID CHAT_ID_INVALID USERNAME_INVALID channels.convertToGigagroup,user,PARTICIPANTS_TOO_FEW channels.createChannel,user,CHAT_TITLE_EMPTY USER_RESTRICTED channels.deleteChannel,user,CHANNEL_INVALID CHANNEL_PRIVATE CHANNEL_TOO_LARGE -channels.deleteHistory,user, +channels.deleteHistory,user,CHANNEL_TOO_BIG channels.deleteMessages,both,CHANNEL_INVALID CHANNEL_PRIVATE MESSAGE_DELETE_FORBIDDEN channels.deleteUserHistory,user,CHANNEL_INVALID CHAT_ADMIN_REQUIRED channels.editAdmin,both,ADMINS_TOO_MUCH ADMIN_RANK_EMOJI_NOT_ALLOWED ADMIN_RANK_INVALID BOT_CHANNELS_NA CHANNEL_INVALID CHAT_ADMIN_INVITE_REQUIRED CHAT_ADMIN_REQUIRED FRESH_CHANGE_ADMINS_FORBIDDEN RIGHT_FORBIDDEN USER_CREATOR USER_ID_INVALID USER_NOT_MUTUAL_CONTACT USER_PRIVACY_RESTRICTED @@ -299,7 +299,7 @@ messages.setInlineGameScore,bot,MESSAGE_ID_INVALID USER_BOT_REQUIRED messages.setTyping,both,CHANNEL_INVALID CHANNEL_PRIVATE CHAT_ID_INVALID CHAT_WRITE_FORBIDDEN PEER_ID_INVALID USER_BANNED_IN_CHANNEL USER_IS_BLOCKED USER_IS_BOT messages.startBot,user,BOT_INVALID PEER_ID_INVALID START_PARAM_EMPTY START_PARAM_INVALID messages.startHistoryImport,user,IMPORT_ID_INVALID -messages.toggleDialogPin,user,PEER_ID_INVALID PINNED_DIALOGS_TOO_MUCH +messages.toggleDialogPin,user,PEER_HISTORY_EMPTY PEER_ID_INVALID PINNED_DIALOGS_TOO_MUCH messages.toggleStickerSets,user, messages.uninstallStickerSet,user,STICKERSET_INVALID messages.updateDialogFilter,user,