Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-Telethon for openSUSE:Factory
checked in at 2025-07-30 11:45:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Telethon (Old)
and /work/SRC/openSUSE:Factory/.python-Telethon.new.13279 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Telethon"
Wed Jul 30 11:45:57 2025 rev:15 rq:1296402 version:1.40.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Telethon/python-Telethon.changes
2025-04-20 20:07:07.330976527 +0200
+++
/work/SRC/openSUSE:Factory/.python-Telethon.new.13279/python-Telethon.changes
2025-07-30 11:47:01.758824548 +0200
@@ -1,0 +2,23 @@
+Wed Jul 30 02:43:53 UTC 2025 - Steve Kowalik <[email protected]>
+
+- Update to 1.40.0:
+ * Additions
+ + send_as and effect added to send_message and related methods.
+ + MessageMediaGeoLive is now recognized for auto-input conversion.
+ * Enhancements
+ + Improved wording when using a likely unintended session file.
+ + Improved behaviour for matching Markdown links.
+ + A truly clean update-state is now fetched upon login.
+ + Time offset is now updated more reliably after connecting. This should
+ fix legitimate “message too old/new” issues.
+ * Bug fixes
+ + ChannelParticipantLeft is now skipped in iter_participants.
+ + spoiler flag was lost on MessageMediaPhoto auto-input conversion.
+ + KeyboardButtonCopy is now recognized as an inline button.
+ + Downloading web-documents should now work again. Note that this still
+ fetches the file from the original server.
+- Add patch stop-using-event_loop-fixture.patch:
+ * Stop using removed event_loop fixture.
+- Support both upper and lower case metadata directory names.
+
+-------------------------------------------------------------------
Old:
----
Telethon-1.39.0.tar.gz
New:
----
Telethon-1.40.0.tar.gz
stop-using-event_loop-fixture.patch
----------(New B)----------
New: fetches the file from the original server.
- Add patch stop-using-event_loop-fixture.patch:
* Stop using removed event_loop fixture.
----------(New E)----------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-Telethon.spec ++++++
--- /var/tmp/diff_new_pack.vQvxIY/_old 2025-07-30 11:47:02.350849038 +0200
+++ /var/tmp/diff_new_pack.vQvxIY/_new 2025-07-30 11:47:02.354849204 +0200
@@ -19,12 +19,14 @@
%define modname Telethon
%{?sle15_python_module_pythons}
Name: python-Telethon
-Version: 1.39.0
+Version: 1.40.0
Release: 0
Summary: Full-featured Telegram client library for Python 3
License: MIT
URL: https://github.com/LonamiWebs/Telethon
Source:
https://github.com/LonamiWebs/%{modname}/archive/refs/tags/v%{version}.tar.gz#/%{modname}-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM gh#LonamiWebs/Telethon#4670
+Patch0: stop-using-event_loop-fixture.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pyaes}
BuildRequires: %{python_module pytest-asyncio}
@@ -46,7 +48,7 @@
as a user or through a bot account (bot API alternative).
%prep
-%setup -q -n Telethon-%{version}
+%autosetup -p1 -n Telethon-%{version}
chmod -x *.rst LICENSE
%build
@@ -58,11 +60,11 @@
%check
# test_all_methods_present needs readthedocs available
-%pytest -k 'not test_all_methods_present'
+%pytest -k 'not (test_all_methods_present or test_send_msg_and_file)'
%files %{python_files}
%doc README.rst
%license LICENSE
%{python_sitelib}/telethon
-%{python_sitelib}/telethon-%{version}.dist-info
+%{python_sitelib}/[Tt]elethon-%{version}.dist-info
++++++ Telethon-1.39.0.tar.gz -> Telethon-1.40.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Telethon-1.39.0/readthedocs/index.rst
new/Telethon-1.40.0/readthedocs/index.rst
--- old/Telethon-1.39.0/readthedocs/index.rst 2025-02-20 18:26:00.000000000
+0100
+++ new/Telethon-1.40.0/readthedocs/index.rst 2025-04-21 11:05:32.000000000
+0200
@@ -103,7 +103,6 @@
:caption: Miscellaneous
misc/changelog
- misc/wall-of-shame.rst
misc/compatibility-and-convenience
.. toctree::
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Telethon-1.39.0/readthedocs/misc/changelog.rst
new/Telethon-1.40.0/readthedocs/misc/changelog.rst
--- old/Telethon-1.39.0/readthedocs/misc/changelog.rst 2025-02-20
18:26:00.000000000 +0100
+++ new/Telethon-1.40.0/readthedocs/misc/changelog.rst 2025-04-21
11:05:32.000000000 +0200
@@ -13,6 +13,38 @@
.. contents:: List of All Versions
+New layer (v1.40)
+=================
+
++------------------------+
+| Scheme layer used: 201 |
++------------------------+
+
+`View new and changed raw API methods
<https://diff.telethon.dev/?from=199&to=201>`__.
+
+Additions
+~~~~~~~~~
+
+* ``send_as`` and ``effect`` added to ``send_message`` and related methods.
+* :tl:`MessageMediaGeoLive` is now recognized for auto-input conversion.
+
+Enhancements
+~~~~~~~~~~~~
+
+* Improved wording when using a likely unintended session file.
+* Improved behaviour for matching Markdown links.
+* A truly clean update-state is now fetched upon login. This was most notably
important for bots.
+* Time offset is now updated more reliably after connecting. This should fix
legitimate "message too old/new" issues.
+
+Bug fixes
+~~~~~~~~~
+
+* :tl:`ChannelParticipantLeft` is now skipped in ``iter_participants``.
+* ``spoiler`` flag was lost on :tl:`MessageMediaPhoto` auto-input conversion.
+* :tl:`KeyboardButtonCopy` is now recognized as an inline button.
+* Downloading web-documents should now work again. Note that this still
fetches the file from the original server.
+
+
New layer (v1.39)
=================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Telethon-1.39.0/readthedocs/misc/wall-of-shame.rst
new/Telethon-1.40.0/readthedocs/misc/wall-of-shame.rst
--- old/Telethon-1.39.0/readthedocs/misc/wall-of-shame.rst 2025-02-20
18:26:00.000000000 +0100
+++ new/Telethon-1.40.0/readthedocs/misc/wall-of-shame.rst 1970-01-01
01:00:00.000000000 +0100
@@ -1,65 +0,0 @@
-=============
-Wall of Shame
-=============
-
-
-This project has an
-`issues <https://github.com/LonamiWebs/Telethon/issues>`__ section for
-you to file **issues** whenever you encounter any when working with the
-library. Said section is **not** for issues on *your* program but rather
-issues with Telethon itself.
-
-If you have not made the effort to 1. read through the docs and 2.
-`look for the method you need <https://tl.telethon.dev/>`__,
-you will end up on the `Wall of
-Shame
<https://github.com/LonamiWebs/Telethon/issues?q=is%3Aissue+label%3ARTFM+is%3Aclosed>`__,
-i.e. all issues labeled
-`"RTFM" <http://www.urbandictionary.com/define.php?term=RTFM>`__:
-
- **rtfm**
- Literally "Read The F--king Manual"; a term showing the
- frustration of being bothered with questions so trivial that the asker
- could have quickly figured out the answer on their own with minimal
- effort, usually by reading readily-available documents. People who
- say"RTFM!" might be considered rude, but the true rude ones are the
- annoying people who take absolutely no self-responibility and expect to
- have all the answers handed to them personally.
-
- *"Damn, that's the twelveth time that somebody posted this question
- to the messageboard today! RTFM, already!"*
-
- *by Bill M. July 27, 2004*
-
-If you have indeed read the docs, and have tried looking for the method,
-and yet you didn't find what you need, **that's fine**. Telegram's API
-can have some obscure names at times, and for this reason, there is a
-`"question"
-label
<https://github.com/LonamiWebs/Telethon/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20label%3Aquestion%20>`__
-with questions that are okay to ask. Just state what you've tried so
-that we know you've made an effort, or you'll go to the Wall of Shame.
-
-Of course, if the issue you're going to open is not even a question but
-a real issue with the library (thankfully, most of the issues have been
-that!), you won't end up here. Don't worry.
-
-Current winner
---------------
-
-The current winner is `issue
-213 <https://github.com/LonamiWebs/Telethon/issues/213>`__:
-
-**Issue:**
-
-.. figure::
https://user-images.githubusercontent.com/6297805/29822978-9a9a6ef0-8ccd-11e7-9ec5-934ea0f57681.jpg
-
-:alt: Winner issue
-
-Winner issue
-
-**Answer:**
-
-.. figure::
https://user-images.githubusercontent.com/6297805/29822983-9d523402-8ccd-11e7-9fb1-5783740ee366.jpg
-
-:alt: Winner issue answer
-
-Winner issue answer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Telethon-1.39.0/telethon/_updates/session.py
new/Telethon-1.40.0/telethon/_updates/session.py
--- old/Telethon-1.39.0/telethon/_updates/session.py 2025-02-20
18:26:00.000000000 +0100
+++ new/Telethon-1.40.0/telethon/_updates/session.py 2025-04-21
11:05:32.000000000 +0200
@@ -1,7 +1,7 @@
from typing import Optional, Tuple
from enum import IntEnum
from ..tl.types import InputPeerUser, InputPeerChat, InputPeerChannel
-
+import struct
class SessionState:
"""
@@ -173,7 +173,7 @@
try:
ty, id, hash = struct.unpack('<Bqq', blob)
except struct.error:
- raise ValueError(f'malformed entity data, got {string!r}') from
None
+ raise ValueError(f'malformed entity data, got {blob!r}') from None
return cls(EntityType(ty), id, hash)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Telethon-1.39.0/telethon/client/auth.py
new/Telethon-1.40.0/telethon/client/auth.py
--- old/Telethon-1.39.0/telethon/client/auth.py 2025-02-20 18:26:00.000000000
+0100
+++ new/Telethon-1.40.0/telethon/client/auth.py 2025-04-21 11:05:32.000000000
+0200
@@ -147,14 +147,16 @@
if bot_token[:bot_token.find(':')] != str(me.id):
warnings.warn(
'the session already had an authorized user so it did '
- 'not login to the bot account using the provided '
- 'bot_token (it may not be using the user you expect)'
+ 'not login to the bot account using the provided
bot_token; '
+ 'if you were expecting a different user, check whether
'
+ 'you are accidentally reusing an existing session'
)
elif phone and not callable(phone) and utils.parse_phone(phone) !=
me.phone:
warnings.warn(
'the session already had an authorized user so it did '
- 'not login to the user account using the provided '
- 'phone (it may not be using the user you expect)'
+ 'not login to the user account using the provided phone; '
+ 'if you were expecting a different user, check whether '
+ 'you are accidentally reusing an existing session'
)
return self
@@ -390,6 +392,16 @@
self._authorized = True
state = await self(functions.updates.GetStateRequest())
+ # the server may send an old qts in getState
+ difference = await
self(functions.updates.GetDifferenceRequest(pts=state.pts, date=state.date,
qts=state.qts))
+
+ if isinstance(difference, types.updates.Difference):
+ state = difference.state
+ elif isinstance(difference, types.updates.DifferenceSlice):
+ state = difference.intermediate_state
+ elif isinstance(difference, types.updates.DifferenceTooLong):
+ state.pts = difference.pts
+
self._message_box.load(SessionState(0, 0, 0, state.pts, state.qts,
int(state.date.timestamp()), state.seq, 0), [])
return user
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Telethon-1.39.0/telethon/client/chats.py
new/Telethon-1.40.0/telethon/client/chats.py
--- old/Telethon-1.39.0/telethon/client/chats.py 2025-02-20
18:26:00.000000000 +0100
+++ new/Telethon-1.40.0/telethon/client/chats.py 2025-04-21
11:05:32.000000000 +0200
@@ -218,8 +218,10 @@
self.requests.offset += len(participants.participants)
users = {user.id: user for user in participants.users}
for participant in participants.participants:
-
- if isinstance(participant, types.ChannelParticipantBanned):
+ if isinstance(participant, types.ChannelParticipantLeft):
+ # See issue #3231 to learn why this is ignored.
+ continue
+ elif isinstance(participant, types.ChannelParticipantBanned):
if not isinstance(participant.peer, types.PeerUser):
# May have the entire channel banned. See #3105.
continue
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Telethon-1.39.0/telethon/client/downloads.py
new/Telethon-1.40.0/telethon/client/downloads.py
--- old/Telethon-1.39.0/telethon/client/downloads.py 2025-02-20
18:26:00.000000000 +0100
+++ new/Telethon-1.40.0/telethon/client/downloads.py 2025-04-21
11:05:32.000000000 +0200
@@ -992,8 +992,8 @@
)
# TODO Better way to get opened handles of files and auto-close
- kind, possible_names = self._get_kind_and_names(web.attributes)
- file = self._get_proper_filename(
+ kind, possible_names = cls._get_kind_and_names(web.attributes)
+ file = cls._get_proper_filename(
file, kind, utils.get_extension(web),
possible_names=possible_names
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Telethon-1.39.0/telethon/client/messages.py
new/Telethon-1.40.0/telethon/client/messages.py
--- old/Telethon-1.39.0/telethon/client/messages.py 2025-02-20
18:26:00.000000000 +0100
+++ new/Telethon-1.40.0/telethon/client/messages.py 2025-04-21
11:05:32.000000000 +0200
@@ -644,6 +644,8 @@
schedule: 'hints.DateLike' = None,
comment_to: 'typing.Union[int, types.Message]' = None,
nosound_video: bool = None,
+ send_as: typing.Optional['hints.EntityLike'] = None,
+ message_effect_id: typing.Optional[int] = None
) -> 'types.Message':
"""
Sends a message to the specified user, chat or channel.
@@ -766,6 +768,16 @@
on non-video files. This is set to ``True`` for albums, as gifs
cannot be sent in albums.
+ send_as (`entity`):
+ Unique identifier (int) or username (str) of the chat or
channel to send the message as.
+ You can use this to send the message on behalf of a chat or
channel where you have appropriate permissions.
+ Use the GetSendAs to return the list of message sender
identifiers, which can be used to send messages in the chat,
+ This setting applies to the current message and will remain
effective for future messages unless explicitly changed.
+ To set this behavior permanently for all messages, use
SaveDefaultSendAs.
+
+ message_effect_id (`int`, optional):
+ Unique identifier of the message effect to be added to the
message; for private chats only
+
Returns
The sent `custom.Message <telethon.tl.custom.message.Message>`.
@@ -838,6 +850,7 @@
formatting_entities=formatting_entities,
comment_to=comment_to, background=background,
nosound_video=nosound_video,
+ send_as=send_as, message_effect_id=message_effect_id
)
entity = await self.get_input_entity(entity)
@@ -867,7 +880,8 @@
buttons=markup,
formatting_entities=message.entities,
parse_mode=None, # explicitly disable parse_mode to force
using even empty formatting_entities
- schedule=schedule
+ schedule=schedule,
+ send_as=send_as, message_effect_id=message_effect_id
)
request = functions.messages.SendMessageRequest(
@@ -881,7 +895,9 @@
clear_draft=clear_draft,
no_webpage=not isinstance(
message.media, types.MessageMediaWebPage),
- schedule_date=schedule
+ schedule_date=schedule,
+ send_as=await self.get_input_entity(send_as) if send_as else
None,
+ effect=message_effect_id
)
message = message.message
else:
@@ -902,7 +918,9 @@
silent=silent,
background=background,
reply_markup=self.build_reply_markup(buttons),
- schedule_date=schedule
+ schedule_date=schedule,
+ send_as=await self.get_input_entity(send_as) if send_as else
None,
+ effect=message_effect_id
)
result = await self(request)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Telethon-1.39.0/telethon/client/uploads.py
new/Telethon-1.40.0/telethon/client/uploads.py
--- old/Telethon-1.39.0/telethon/client/uploads.py 2025-02-20
18:26:00.000000000 +0100
+++ new/Telethon-1.40.0/telethon/client/uploads.py 2025-04-21
11:05:32.000000000 +0200
@@ -140,6 +140,8 @@
comment_to: 'typing.Union[int, types.Message]' = None,
ttl: int = None,
nosound_video: bool = None,
+ send_as: typing.Optional['hints.EntityLike'] = None,
+ message_effect_id: typing.Optional[int] = None,
**kwargs) -> typing.Union[typing.List[typing.Any], typing.Any]:
"""
Sends message with the given file to the specified entity.
@@ -322,6 +324,16 @@
on non-video files. This is set to ``True`` for albums, as gifs
cannot be sent in albums.
+ send_as (`entity`):
+ Unique identifier (int) or username (str) of the chat or
channel to send the message as.
+ You can use this to send the message on behalf of a chat or
channel where you have appropriate permissions.
+ Use the GetSendAs to return the list of message sender
identifiers, which can be used to send messages in the chat,
+ This setting applies to the current message and will remain
effective for future messages unless explicitly changed.
+ To set this behavior permanently for all messages, use
SaveDefaultSendAs.
+
+ message_effect_id (`int`, optional):
+ Unique identifier of the message effect to be added to the
message; for private chats only
+
Returns
The `Message <telethon.tl.custom.message.Message>` (or messages)
containing the sent file, or messages if a list of them was passed.
@@ -421,6 +433,7 @@
parse_mode=parse_mode, silent=silent, schedule=schedule,
supports_streaming=supports_streaming,
clear_draft=clear_draft,
force_document=force_document, background=background,
+ send_as=send_as, message_effect_id=message_effect_id
)
file = file[10:]
captions = captions[10:]
@@ -455,7 +468,9 @@
entity, media, reply_to=reply_to, message=caption,
entities=msg_entities, reply_markup=markup, silent=silent,
schedule_date=schedule, clear_draft=clear_draft,
- background=background
+ background=background,
+ send_as=await self.get_input_entity(send_as) if send_as else None,
+ effect=message_effect_id
)
return self._get_response_message(request, await self(request), entity)
@@ -464,7 +479,9 @@
progress_callback=None, reply_to=None,
parse_mode=(), silent=None, schedule=None,
supports_streaming=None, clear_draft=None,
- force_document=False, background=None, ttl=None):
+ force_document=False, background=None, ttl=None,
+ send_as: typing.Optional['hints.EntityLike'] = None,
+ message_effect_id: typing.Optional[int] = None):
"""Specialized version of .send_file for albums"""
# We don't care if the user wants to avoid cache, we will use it
# anyway. Why? The cached version will be exactly the same thing
@@ -539,7 +556,9 @@
request = functions.messages.SendMultiMediaRequest(
entity, reply_to=None if reply_to is None else
types.InputReplyToMessage(reply_to), multi_media=media,
silent=silent, schedule_date=schedule, clear_draft=clear_draft,
- background=background
+ background=background,
+ send_as=await self.get_input_entity(send_as) if send_as else None,
+ effect=message_effect_id
)
result = await self(request)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Telethon-1.39.0/telethon/extensions/markdown.py
new/Telethon-1.40.0/telethon/extensions/markdown.py
--- old/Telethon-1.39.0/telethon/extensions/markdown.py 2025-02-20
18:26:00.000000000 +0100
+++ new/Telethon-1.40.0/telethon/extensions/markdown.py 2025-04-21
11:05:32.000000000 +0200
@@ -22,7 +22,7 @@
'```': MessageEntityPre
}
-DEFAULT_URL_RE = re.compile(r'\[([\s\S]+?)\]\((.+?)\)')
+DEFAULT_URL_RE = re.compile(r'\[([^]]*?)\]\(([\s\S]*?)\)')
DEFAULT_URL_FORMAT = '[{0}]({1})'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Telethon-1.39.0/telethon/network/mtprotostate.py
new/Telethon-1.40.0/telethon/network/mtprotostate.py
--- old/Telethon-1.39.0/telethon/network/mtprotostate.py 2025-02-20
18:26:00.000000000 +0100
+++ new/Telethon-1.40.0/telethon/network/mtprotostate.py 2025-04-21
11:05:32.000000000 +0200
@@ -152,7 +152,7 @@
"""
Inverse of `encrypt_message_data` for incoming server messages.
"""
- now = time.time() + self.time_offset # get the time as early as
possible, even if other checks make it go unused
+ now = time.time() # get the time as early as possible, even if other
checks make it go unused
if len(body) < 8:
raise InvalidBufferError(body)
@@ -203,9 +203,15 @@
# messages to change server_salt and notifications about invalid time
on the client."
#
# This means we skip the time check for certain types of messages.
- if obj.CONSTRUCTOR_ID not in (BadServerSalt.CONSTRUCTOR_ID,
BadMsgNotification.CONSTRUCTOR_ID):
+ if obj.CONSTRUCTOR_ID in (BadServerSalt.CONSTRUCTOR_ID,
BadMsgNotification.CONSTRUCTOR_ID):
+ if not self._highest_remote_id and not self.time_offset:
+ # If the first message we receive is a bad notification, take
this opportunity
+ # to adjust the time offset. Assume it will remain stable
afterwards. Updating
+ # the offset unconditionally would make the next checks
pointless.
+ self.update_time_offset(remote_msg_id)
+ else:
remote_msg_time = remote_msg_id >> 32
- time_delta = now - remote_msg_time
+ time_delta = (now + self.time_offset) - remote_msg_time
if time_delta > MSG_TOO_OLD_DELTA:
self._log.warning('Server sent a very old message with ID %d,
ignoring (see FAQ for details)', remote_msg_id)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Telethon-1.39.0/telethon/tl/custom/button.py
new/Telethon-1.40.0/telethon/tl/custom/button.py
--- old/Telethon-1.39.0/telethon/tl/custom/button.py 2025-02-20
18:26:00.000000000 +0100
+++ new/Telethon-1.40.0/telethon/tl/custom/button.py 2025-04-21
11:05:32.000000000 +0200
@@ -49,6 +49,7 @@
Returns `True` if the button belongs to an inline keyboard.
"""
return isinstance(button, (
+ types.KeyboardButtonCopy,
types.KeyboardButtonBuy,
types.KeyboardButtonCallback,
types.KeyboardButtonGame,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Telethon-1.39.0/telethon/tl/custom/message.py
new/Telethon-1.40.0/telethon/tl/custom/message.py
--- old/Telethon-1.39.0/telethon/tl/custom/message.py 2025-02-20
18:26:00.000000000 +0100
+++ new/Telethon-1.40.0/telethon/tl/custom/message.py 2025-04-21
11:05:32.000000000 +0200
@@ -177,7 +177,7 @@
id: int, peer_id: types.TypePeer,
date: Optional[datetime]=None, message: Optional[str]=None,
# Copied from Message.__init__ signature
- out: Optional[bool]=None, mentioned: Optional[bool]=None,
media_unread: Optional[bool]=None, silent: Optional[bool]=None, post:
Optional[bool]=None, from_scheduled: Optional[bool]=None, legacy:
Optional[bool]=None, edit_hide: Optional[bool]=None, pinned:
Optional[bool]=None, noforwards: Optional[bool]=None, invert_media:
Optional[bool]=None, offline: Optional[bool]=None, video_processing_pending:
Optional[bool]=None, from_id: Optional[types.TypePeer]=None,
from_boosts_applied: Optional[int]=None, saved_peer_id:
Optional[types.TypePeer]=None, fwd_from:
Optional[types.TypeMessageFwdHeader]=None, via_bot_id: Optional[int]=None,
via_business_bot_id: Optional[int]=None, reply_to:
Optional[types.TypeMessageReplyHeader]=None, media:
Optional[types.TypeMessageMedia]=None, reply_markup:
Optional[types.TypeReplyMarkup]=None, entities:
Optional[List[types.TypeMessageEntity]]=None, views: Optional[int]=None,
forwards: Optional[int]=None, replies: Optional[types.TypeMessageReplies]=N
one, edit_date: Optional[datetime]=None, post_author: Optional[str]=None,
grouped_id: Optional[int]=None, reactions:
Optional[types.TypeMessageReactions]=None, restriction_reason:
Optional[List[types.TypeRestrictionReason]]=None, ttl_period:
Optional[int]=None, quick_reply_shortcut_id: Optional[int]=None, effect:
Optional[int]=None, factcheck: Optional[types.TypeFactCheck]=None,
report_delivery_until_date: Optional[datetime]=None,
+ out: Optional[bool]=None, mentioned: Optional[bool]=None,
media_unread: Optional[bool]=None, silent: Optional[bool]=None, post:
Optional[bool]=None, from_scheduled: Optional[bool]=None, legacy:
Optional[bool]=None, edit_hide: Optional[bool]=None, pinned:
Optional[bool]=None, noforwards: Optional[bool]=None, invert_media:
Optional[bool]=None, offline: Optional[bool]=None, video_processing_pending:
Optional[bool]=None, from_id: Optional[types.TypePeer]=None,
from_boosts_applied: Optional[int]=None, saved_peer_id:
Optional[types.TypePeer]=None, fwd_from:
Optional[types.TypeMessageFwdHeader]=None, via_bot_id: Optional[int]=None,
via_business_bot_id: Optional[int]=None, reply_to:
Optional[types.TypeMessageReplyHeader]=None, media:
Optional[types.TypeMessageMedia]=None, reply_markup:
Optional[types.TypeReplyMarkup]=None, entities:
Optional[List[types.TypeMessageEntity]]=None, views: Optional[int]=None,
forwards: Optional[int]=None, replies: Optional[types.TypeMessageReplies]=N
one, edit_date: Optional[datetime]=None, post_author: Optional[str]=None,
grouped_id: Optional[int]=None, reactions:
Optional[types.TypeMessageReactions]=None, restriction_reason:
Optional[List[types.TypeRestrictionReason]]=None, ttl_period:
Optional[int]=None, quick_reply_shortcut_id: Optional[int]=None, effect:
Optional[int]=None, factcheck: Optional[types.TypeFactCheck]=None,
report_delivery_until_date: Optional[datetime]=None, paid_message_stars:
Optional[int]=None,
# Copied from MessageService.__init__ signature
action: Optional[types.TypeMessageAction]=None,
reactions_are_possible: Optional[bool]=None
):
@@ -222,6 +222,7 @@
self.effect = effect
self.factcheck = factcheck
self.report_delivery_until_date = report_delivery_until_date
+ self.paid_message_stars = paid_message_stars
# Copied from MessageService.__init__ body
self.action = action
self.reactions_are_possible = reactions_are_possible
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Telethon-1.39.0/telethon/utils.py
new/Telethon-1.40.0/telethon/utils.py
--- old/Telethon-1.39.0/telethon/utils.py 2025-02-20 18:26:00.000000000
+0100
+++ new/Telethon-1.40.0/telethon/utils.py 2025-04-21 11:05:32.000000000
+0200
@@ -445,6 +445,7 @@
if isinstance(media, types.MessageMediaPhoto):
return types.InputMediaPhoto(
id=get_input_photo(media.photo),
+ spoiler=media.spoiler,
ttl_seconds=ttl or media.ttl_seconds
)
@@ -499,6 +500,14 @@
if isinstance(media, types.MessageMediaGeo):
return types.InputMediaGeoPoint(geo_point=get_input_geo(media.geo))
+ if isinstance(media, types.MessageMediaGeoLive):
+ return types.InputMediaGeoLive(
+ geo_point=get_input_geo(media.geo),
+ period=media.period,
+ heading=media.heading,
+ proximity_notification_radius=media.proximity_notification_radius,
+ )
+
if isinstance(media, types.MessageMediaVenue):
return types.InputMediaVenue(
geo_point=get_input_geo(media.geo),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Telethon-1.39.0/telethon/version.py
new/Telethon-1.40.0/telethon/version.py
--- old/Telethon-1.39.0/telethon/version.py 2025-02-20 18:26:00.000000000
+0100
+++ new/Telethon-1.40.0/telethon/version.py 2025-04-21 11:05:32.000000000
+0200
@@ -1,3 +1,3 @@
# Versions should comply with PEP440.
# This line is parsed in setup.py:
-__version__ = '1.39.0'
+__version__ = '1.40.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Telethon-1.39.0/telethon_generator/data/api.tl
new/Telethon-1.40.0/telethon_generator/data/api.tl
--- old/Telethon-1.39.0/telethon_generator/data/api.tl 2025-02-20
18:26:00.000000000 +0100
+++ new/Telethon-1.40.0/telethon_generator/data/api.tl 2025-04-21
11:05:32.000000000 +0200
@@ -84,7 +84,7 @@
storage.fileWebp#1081464c = storage.FileType;
userEmpty#d3bc4b7a id:long = User;
-user#4b46c37e flags:# self:flags.10?true contact:flags.11?true
mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true
bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true
restricted:flags.18?true min:flags.20?true bot_inline_geo:flags.21?true
support:flags.23?true scam:flags.24?true apply_min_photo:flags.25?true
fake:flags.26?true bot_attach_menu:flags.27?true premium:flags.28?true
attach_menu_enabled:flags.29?true flags2:# bot_can_edit:flags2.1?true
close_friend:flags2.2?true stories_hidden:flags2.3?true
stories_unavailable:flags2.4?true contact_require_premium:flags2.10?true
bot_business:flags2.11?true bot_has_main_app:flags2.13?true id:long
access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string
username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto
status:flags.6?UserStatus bot_info_version:flags.14?int
restriction_reason:flags.18?Vector<RestrictionReason>
bot_inline_placeholder:flags.19?string lan
g_code:flags.22?string emoji_status:flags.30?EmojiStatus
usernames:flags2.0?Vector<Username> stories_max_id:flags2.5?int
color:flags2.8?PeerColor profile_color:flags2.9?PeerColor
bot_active_users:flags2.12?int bot_verification_icon:flags2.14?long = User;
+user#20b1422 flags:# self:flags.10?true contact:flags.11?true
mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true
bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true
restricted:flags.18?true min:flags.20?true bot_inline_geo:flags.21?true
support:flags.23?true scam:flags.24?true apply_min_photo:flags.25?true
fake:flags.26?true bot_attach_menu:flags.27?true premium:flags.28?true
attach_menu_enabled:flags.29?true flags2:# bot_can_edit:flags2.1?true
close_friend:flags2.2?true stories_hidden:flags2.3?true
stories_unavailable:flags2.4?true contact_require_premium:flags2.10?true
bot_business:flags2.11?true bot_has_main_app:flags2.13?true id:long
access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string
username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto
status:flags.6?UserStatus bot_info_version:flags.14?int
restriction_reason:flags.18?Vector<RestrictionReason>
bot_inline_placeholder:flags.19?string lang
_code:flags.22?string emoji_status:flags.30?EmojiStatus
usernames:flags2.0?Vector<Username> stories_max_id:flags2.5?int
color:flags2.8?PeerColor profile_color:flags2.9?PeerColor
bot_active_users:flags2.12?int bot_verification_icon:flags2.14?long
send_paid_messages_stars:flags2.15?long = User;
userProfilePhotoEmpty#4f11bae1 = UserProfilePhoto;
userProfilePhoto#82d1f706 flags:# has_video:flags.0?true personal:flags.2?true
photo_id:long stripped_thumb:flags.1?bytes dc_id:int = UserProfilePhoto;
@@ -99,11 +99,11 @@
chatEmpty#29562865 id:long = Chat;
chat#41cbf256 flags:# creator:flags.0?true left:flags.2?true
deactivated:flags.5?true call_active:flags.23?true call_not_empty:flags.24?true
noforwards:flags.25?true id:long title:string photo:ChatPhoto
participants_count:int date:int version:int migrated_to:flags.6?InputChannel
admin_rights:flags.14?ChatAdminRights
default_banned_rights:flags.18?ChatBannedRights = Chat;
chatForbidden#6592a1a7 id:long title:string = Chat;
-channel#e00998b7 flags:# creator:flags.0?true left:flags.2?true
broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true
restricted:flags.9?true signatures:flags.11?true min:flags.12?true
scam:flags.19?true has_link:flags.20?true has_geo:flags.21?true
slowmode_enabled:flags.22?true call_active:flags.23?true
call_not_empty:flags.24?true fake:flags.25?true gigagroup:flags.26?true
noforwards:flags.27?true join_to_send:flags.28?true join_request:flags.29?true
forum:flags.30?true flags2:# stories_hidden:flags2.1?true
stories_hidden_min:flags2.2?true stories_unavailable:flags2.3?true
signature_profiles:flags2.12?true id:long access_hash:flags.13?long
title:string username:flags.6?string photo:ChatPhoto date:int
restriction_reason:flags.9?Vector<RestrictionReason>
admin_rights:flags.14?ChatAdminRights banned_rights:flags.15?ChatBannedRights
default_banned_rights:flags.18?ChatBannedRights participants_count:flags.17?int
usernames:flags2.0?Vector<Username> stories_max_id:flags2.4?
int color:flags2.7?PeerColor profile_color:flags2.8?PeerColor
emoji_status:flags2.9?EmojiStatus level:flags2.10?int
subscription_until_date:flags2.11?int bot_verification_icon:flags2.13?long =
Chat;
+channel#7482147e flags:# creator:flags.0?true left:flags.2?true
broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true
restricted:flags.9?true signatures:flags.11?true min:flags.12?true
scam:flags.19?true has_link:flags.20?true has_geo:flags.21?true
slowmode_enabled:flags.22?true call_active:flags.23?true
call_not_empty:flags.24?true fake:flags.25?true gigagroup:flags.26?true
noforwards:flags.27?true join_to_send:flags.28?true join_request:flags.29?true
forum:flags.30?true flags2:# stories_hidden:flags2.1?true
stories_hidden_min:flags2.2?true stories_unavailable:flags2.3?true
signature_profiles:flags2.12?true id:long access_hash:flags.13?long
title:string username:flags.6?string photo:ChatPhoto date:int
restriction_reason:flags.9?Vector<RestrictionReason>
admin_rights:flags.14?ChatAdminRights banned_rights:flags.15?ChatBannedRights
default_banned_rights:flags.18?ChatBannedRights participants_count:flags.17?int
usernames:flags2.0?Vector<Username> stories_max_id:flags2.4?
int color:flags2.7?PeerColor profile_color:flags2.8?PeerColor
emoji_status:flags2.9?EmojiStatus level:flags2.10?int
subscription_until_date:flags2.11?int bot_verification_icon:flags2.13?long
send_paid_messages_stars:flags2.14?long = Chat;
channelForbidden#17d493d5 flags:# broadcast:flags.5?true
megagroup:flags.8?true id:long access_hash:long title:string
until_date:flags.16?int = Chat;
chatFull#2633421b flags:# can_set_username:flags.7?true
has_scheduled:flags.8?true translations_disabled:flags.19?true id:long
about:string participants:ChatParticipants chat_photo:flags.2?Photo
notify_settings:PeerNotifySettings exported_invite:flags.13?ExportedChatInvite
bot_info:flags.3?Vector<BotInfo> pinned_msg_id:flags.6?int
folder_id:flags.11?int call:flags.12?InputGroupCall ttl_period:flags.14?int
groupcall_default_join_as:flags.15?Peer theme_emoticon:flags.16?string
requests_pending:flags.17?int recent_requesters:flags.17?Vector<long>
available_reactions:flags.18?ChatReactions reactions_limit:flags.20?int =
ChatFull;
-channelFull#52d6806b flags:# can_view_participants:flags.3?true
can_set_username:flags.6?true can_set_stickers:flags.7?true
hidden_prehistory:flags.10?true can_set_location:flags.16?true
has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true
flags2:# can_delete_channel:flags2.0?true antispam:flags2.1?true
participants_hidden:flags2.2?true translations_disabled:flags2.3?true
stories_pinned_available:flags2.5?true view_forum_as_messages:flags2.6?true
restricted_sponsored:flags2.11?true can_view_revenue:flags2.12?true
paid_media_allowed:flags2.14?true can_view_stars_revenue:flags2.15?true
paid_reactions_available:flags2.16?true stargifts_available:flags2.19?true
id:long about:string participants_count:flags.0?int admins_count:flags.1?int
kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int
read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo
notify_settings:PeerNotifySettings exported_invite:flags.23?ExportedChatI
nvite bot_info:Vector<BotInfo> migrated_from_chat_id:flags.4?long
migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int
stickerset:flags.8?StickerSet available_min_id:flags.9?int
folder_id:flags.11?int linked_chat_id:flags.14?long
location:flags.15?ChannelLocation slowmode_seconds:flags.17?int
slowmode_next_send_date:flags.18?int stats_dc:flags.12?int pts:int
call:flags.21?InputGroupCall ttl_period:flags.24?int
pending_suggestions:flags.25?Vector<string>
groupcall_default_join_as:flags.26?Peer theme_emoticon:flags.27?string
requests_pending:flags.28?int recent_requesters:flags.28?Vector<long>
default_send_as:flags.29?Peer available_reactions:flags.30?ChatReactions
reactions_limit:flags2.13?int stories:flags2.4?PeerStories
wallpaper:flags2.7?WallPaper boosts_applied:flags2.8?int
boosts_unrestrict:flags2.9?int emojiset:flags2.10?StickerSet
bot_verification:flags2.17?BotVerification stargifts_count:flags2.18?int =
ChatFull;
+channelFull#52d6806b flags:# can_view_participants:flags.3?true
can_set_username:flags.6?true can_set_stickers:flags.7?true
hidden_prehistory:flags.10?true can_set_location:flags.16?true
has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true
flags2:# can_delete_channel:flags2.0?true antispam:flags2.1?true
participants_hidden:flags2.2?true translations_disabled:flags2.3?true
stories_pinned_available:flags2.5?true view_forum_as_messages:flags2.6?true
restricted_sponsored:flags2.11?true can_view_revenue:flags2.12?true
paid_media_allowed:flags2.14?true can_view_stars_revenue:flags2.15?true
paid_reactions_available:flags2.16?true stargifts_available:flags2.19?true
paid_messages_available:flags2.20?true id:long about:string
participants_count:flags.0?int admins_count:flags.1?int
kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int
read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo
notify_settings:PeerNotifySettings
exported_invite:flags.23?ExportedChatInvite bot_info:Vector<BotInfo>
migrated_from_chat_id:flags.4?long migrated_from_max_id:flags.4?int
pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet
available_min_id:flags.9?int folder_id:flags.11?int
linked_chat_id:flags.14?long location:flags.15?ChannelLocation
slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int
stats_dc:flags.12?int pts:int call:flags.21?InputGroupCall
ttl_period:flags.24?int pending_suggestions:flags.25?Vector<string>
groupcall_default_join_as:flags.26?Peer theme_emoticon:flags.27?string
requests_pending:flags.28?int recent_requesters:flags.28?Vector<long>
default_send_as:flags.29?Peer available_reactions:flags.30?ChatReactions
reactions_limit:flags2.13?int stories:flags2.4?PeerStories
wallpaper:flags2.7?WallPaper boosts_applied:flags2.8?int
boosts_unrestrict:flags2.9?int emojiset:flags2.10?StickerSet
bot_verification:flags2.17?BotVerification stargifts_count:flags2.18?int =
ChatFull;
chatParticipant#c02d4007 user_id:long inviter_id:long date:int =
ChatParticipant;
chatParticipantCreator#e46bcee4 user_id:long = ChatParticipant;
@@ -116,7 +116,7 @@
chatPhoto#1c6e1c11 flags:# has_video:flags.0?true photo_id:long
stripped_thumb:flags.1?bytes dc_id:int = ChatPhoto;
messageEmpty#90a6ca84 flags:# id:int peer_id:flags.0?Peer = Message;
-message#96fdbbe9 flags:# out:flags.1?true mentioned:flags.4?true
media_unread:flags.5?true silent:flags.13?true post:flags.14?true
from_scheduled:flags.18?true legacy:flags.19?true edit_hide:flags.21?true
pinned:flags.24?true noforwards:flags.26?true invert_media:flags.27?true
flags2:# offline:flags2.1?true video_processing_pending:flags2.4?true id:int
from_id:flags.8?Peer from_boosts_applied:flags.29?int peer_id:Peer
saved_peer_id:flags.28?Peer fwd_from:flags.2?MessageFwdHeader
via_bot_id:flags.11?long via_business_bot_id:flags2.0?long
reply_to:flags.3?MessageReplyHeader date:int message:string
media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup
entities:flags.7?Vector<MessageEntity> views:flags.10?int forwards:flags.10?int
replies:flags.23?MessageReplies edit_date:flags.15?int
post_author:flags.16?string grouped_id:flags.17?long
reactions:flags.20?MessageReactions
restriction_reason:flags.22?Vector<RestrictionReason> ttl_period:flags.25?int
quick_reply_shortcut_id:flags.30
?int effect:flags2.2?long factcheck:flags2.3?FactCheck
report_delivery_until_date:flags2.5?int = Message;
+message#eabcdd4d flags:# out:flags.1?true mentioned:flags.4?true
media_unread:flags.5?true silent:flags.13?true post:flags.14?true
from_scheduled:flags.18?true legacy:flags.19?true edit_hide:flags.21?true
pinned:flags.24?true noforwards:flags.26?true invert_media:flags.27?true
flags2:# offline:flags2.1?true video_processing_pending:flags2.4?true id:int
from_id:flags.8?Peer from_boosts_applied:flags.29?int peer_id:Peer
saved_peer_id:flags.28?Peer fwd_from:flags.2?MessageFwdHeader
via_bot_id:flags.11?long via_business_bot_id:flags2.0?long
reply_to:flags.3?MessageReplyHeader date:int message:string
media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup
entities:flags.7?Vector<MessageEntity> views:flags.10?int forwards:flags.10?int
replies:flags.23?MessageReplies edit_date:flags.15?int
post_author:flags.16?string grouped_id:flags.17?long
reactions:flags.20?MessageReactions
restriction_reason:flags.22?Vector<RestrictionReason> ttl_period:flags.25?int
quick_reply_shortcut_id:flags.30
?int effect:flags2.2?long factcheck:flags2.3?FactCheck
report_delivery_until_date:flags2.5?int paid_message_stars:flags2.6?long =
Message;
messageService#d3d28540 flags:# out:flags.1?true mentioned:flags.4?true
media_unread:flags.5?true reactions_are_possible:flags.9?true
silent:flags.13?true post:flags.14?true legacy:flags.19?true id:int
from_id:flags.8?Peer peer_id:Peer reply_to:flags.3?MessageReplyHeader date:int
action:MessageAction reactions:flags.20?MessageReactions
ttl_period:flags.25?int = Message;
messageMediaEmpty#3ded6320 = MessageMedia;
@@ -175,7 +175,7 @@
messageActionSuggestProfilePhoto#57de635e photo:Photo = MessageAction;
messageActionRequestedPeer#31518e9b button_id:int peers:Vector<Peer> =
MessageAction;
messageActionSetChatWallPaper#5060a3f4 flags:# same:flags.0?true
for_both:flags.1?true wallpaper:WallPaper = MessageAction;
-messageActionGiftCode#56d03994 flags:# via_giveaway:flags.0?true
unclaimed:flags.2?true boost_peer:flags.1?Peer months:int slug:string
currency:flags.2?string amount:flags.2?long crypto_currency:flags.3?string
crypto_amount:flags.3?long message:flags.4?TextWithEntities = MessageAction;
+messageActionGiftCode#56d03994 flags:# via_giveaway:flags.0?true
unclaimed:flags.5?true boost_peer:flags.1?Peer months:int slug:string
currency:flags.2?string amount:flags.2?long crypto_currency:flags.3?string
crypto_amount:flags.3?long message:flags.4?TextWithEntities = MessageAction;
messageActionGiveawayLaunch#a80f51e4 flags:# stars:flags.0?long =
MessageAction;
messageActionGiveawayResults#87e2f155 flags:# stars:flags.0?true
winners_count:int unclaimed_count:int = MessageAction;
messageActionBoostApply#cc02aa6d boosts:int = MessageAction;
@@ -185,6 +185,8 @@
messageActionPrizeStars#b00c47a2 flags:# unclaimed:flags.0?true stars:long
transaction_id:string boost_peer:Peer giveaway_msg_id:int = MessageAction;
messageActionStarGift#4717e8a4 flags:# name_hidden:flags.0?true
saved:flags.2?true converted:flags.3?true upgraded:flags.5?true
refunded:flags.9?true can_upgrade:flags.10?true gift:StarGift
message:flags.1?TextWithEntities convert_stars:flags.4?long
upgrade_msg_id:flags.5?int upgrade_stars:flags.8?long from_id:flags.11?Peer
peer:flags.12?Peer saved_id:flags.12?long = MessageAction;
messageActionStarGiftUnique#acdfcb81 flags:# upgrade:flags.0?true
transferred:flags.1?true saved:flags.2?true refunded:flags.5?true gift:StarGift
can_export_at:flags.3?int transfer_stars:flags.4?long from_id:flags.6?Peer
peer:flags.7?Peer saved_id:flags.7?long = MessageAction;
+messageActionPaidMessagesRefunded#ac1f1fcd count:int stars:long =
MessageAction;
+messageActionPaidMessagesPrice#bcd71419 stars:long = MessageAction;
dialog#d58a08c6 flags:# pinned:flags.2?true unread_mark:flags.3?true
view_forum_as_messages:flags.6?true peer:Peer top_message:int
read_inbox_max_id:int read_outbox_max_id:int unread_count:int
unread_mentions_count:int unread_reactions_count:int
notify_settings:PeerNotifySettings pts:flags.0?int draft:flags.1?DraftMessage
folder_id:flags.4?int ttl_period:flags.5?int = Dialog;
dialogFolder#71bd134c flags:# pinned:flags.2?true folder:Folder peer:Peer
top_message:int unread_muted_peers_count:int unread_unmuted_peers_count:int
unread_muted_messages_count:int unread_unmuted_messages_count:int = Dialog;
@@ -204,6 +206,7 @@
auth.sentCode#5e002502 flags:# type:auth.SentCodeType phone_code_hash:string
next_type:flags.1?auth.CodeType timeout:flags.2?int = auth.SentCode;
auth.sentCodeSuccess#2390fe44 authorization:auth.Authorization = auth.SentCode;
+auth.sentCodePaymentRequired#d7cef980 store_product:string
phone_code_hash:string = auth.SentCode;
auth.authorization#2ea2c0d4 flags:# setup_password_required:flags.1?true
otherwise_relogin_days:flags.1?int tmp_sessions:flags.0?int
future_auth_token:flags.2?bytes user:User = auth.Authorization;
auth.authorizationSignUpRequired#44747e9a flags:#
terms_of_service:flags.0?help.TermsOfService = auth.Authorization;
@@ -220,7 +223,7 @@
peerNotifySettings#99622c0c flags:# show_previews:flags.0?Bool
silent:flags.1?Bool mute_until:flags.2?int ios_sound:flags.3?NotificationSound
android_sound:flags.4?NotificationSound other_sound:flags.5?NotificationSound
stories_muted:flags.6?Bool stories_hide_sender:flags.7?Bool
stories_ios_sound:flags.8?NotificationSound
stories_android_sound:flags.9?NotificationSound
stories_other_sound:flags.10?NotificationSound = PeerNotifySettings;
-peerSettings#acd66c5e flags:# report_spam:flags.0?true
add_contact:flags.1?true block_contact:flags.2?true share_contact:flags.3?true
need_contacts_exception:flags.4?true report_geo:flags.5?true
autoarchived:flags.7?true invite_members:flags.8?true
request_chat_broadcast:flags.10?true business_bot_paused:flags.11?true
business_bot_can_reply:flags.12?true geo_distance:flags.6?int
request_chat_title:flags.9?string request_chat_date:flags.9?int
business_bot_id:flags.13?long business_bot_manage_url:flags.13?string =
PeerSettings;
+peerSettings#f47741f7 flags:# report_spam:flags.0?true
add_contact:flags.1?true block_contact:flags.2?true share_contact:flags.3?true
need_contacts_exception:flags.4?true report_geo:flags.5?true
autoarchived:flags.7?true invite_members:flags.8?true
request_chat_broadcast:flags.10?true business_bot_paused:flags.11?true
business_bot_can_reply:flags.12?true geo_distance:flags.6?int
request_chat_title:flags.9?string request_chat_date:flags.9?int
business_bot_id:flags.13?long business_bot_manage_url:flags.13?string
charge_paid_message_stars:flags.14?long registration_month:flags.15?string
phone_country:flags.16?string name_change_date:flags.17?int
photo_change_date:flags.18?int = PeerSettings;
wallPaper#a437c3ed id:long flags:# creator:flags.0?true default:flags.1?true
pattern:flags.3?true dark:flags.4?true access_hash:long slug:string
document:Document settings:flags.2?WallPaperSettings = WallPaper;
wallPaperNoFile#e0804116 id:long flags:# default:flags.1?true
dark:flags.4?true settings:flags.2?WallPaperSettings = WallPaper;
@@ -236,7 +239,7 @@
inputReportReasonIllegalDrugs#a8eb2be = ReportReason;
inputReportReasonPersonalDetails#9ec7863d = ReportReason;
-userFull#4d975bbc flags:# blocked:flags.0?true
phone_calls_available:flags.4?true phone_calls_private:flags.5?true
can_pin_message:flags.7?true has_scheduled:flags.12?true
video_calls_available:flags.13?true voice_messages_forbidden:flags.20?true
translations_disabled:flags.23?true stories_pinned_available:flags.26?true
blocked_my_stories_from:flags.27?true wallpaper_overridden:flags.28?true
contact_require_premium:flags.29?true read_dates_private:flags.30?true flags2:#
sponsored_enabled:flags2.7?true can_view_revenue:flags2.9?true
bot_can_manage_emoji_status:flags2.10?true id:long about:flags.1?string
settings:PeerSettings personal_photo:flags.21?Photo profile_photo:flags.2?Photo
fallback_photo:flags.22?Photo notify_settings:PeerNotifySettings
bot_info:flags.3?BotInfo pinned_msg_id:flags.6?int common_chats_count:int
folder_id:flags.11?int ttl_period:flags.14?int theme_emoticon:flags.15?string
private_forward_name:flags.16?string
bot_group_admin_rights:flags.17?ChatAdminRights bot_b
roadcast_admin_rights:flags.18?ChatAdminRights
premium_gifts:flags.19?Vector<PremiumGiftOption> wallpaper:flags.24?WallPaper
stories:flags.25?PeerStories business_work_hours:flags2.0?BusinessWorkHours
business_location:flags2.1?BusinessLocation
business_greeting_message:flags2.2?BusinessGreetingMessage
business_away_message:flags2.3?BusinessAwayMessage
business_intro:flags2.4?BusinessIntro birthday:flags2.5?Birthday
personal_channel_id:flags2.6?long personal_channel_message:flags2.6?int
stargifts_count:flags2.8?int starref_program:flags2.11?StarRefProgram
bot_verification:flags2.12?BotVerification = UserFull;
+userFull#99e78045 flags:# blocked:flags.0?true
phone_calls_available:flags.4?true phone_calls_private:flags.5?true
can_pin_message:flags.7?true has_scheduled:flags.12?true
video_calls_available:flags.13?true voice_messages_forbidden:flags.20?true
translations_disabled:flags.23?true stories_pinned_available:flags.26?true
blocked_my_stories_from:flags.27?true wallpaper_overridden:flags.28?true
contact_require_premium:flags.29?true read_dates_private:flags.30?true flags2:#
sponsored_enabled:flags2.7?true can_view_revenue:flags2.9?true
bot_can_manage_emoji_status:flags2.10?true display_gifts_button:flags2.16?true
id:long about:flags.1?string settings:PeerSettings
personal_photo:flags.21?Photo profile_photo:flags.2?Photo
fallback_photo:flags.22?Photo notify_settings:PeerNotifySettings
bot_info:flags.3?BotInfo pinned_msg_id:flags.6?int common_chats_count:int
folder_id:flags.11?int ttl_period:flags.14?int theme_emoticon:flags.15?string
private_forward_name:flags.16?string bot_group_admin_r
ights:flags.17?ChatAdminRights
bot_broadcast_admin_rights:flags.18?ChatAdminRights
wallpaper:flags.24?WallPaper stories:flags.25?PeerStories
business_work_hours:flags2.0?BusinessWorkHours
business_location:flags2.1?BusinessLocation
business_greeting_message:flags2.2?BusinessGreetingMessage
business_away_message:flags2.3?BusinessAwayMessage
business_intro:flags2.4?BusinessIntro birthday:flags2.5?Birthday
personal_channel_id:flags2.6?long personal_channel_message:flags2.6?int
stargifts_count:flags2.8?int starref_program:flags2.11?StarRefProgram
bot_verification:flags2.12?BotVerification
send_paid_messages_stars:flags2.14?long
disallowed_gifts:flags2.15?DisallowedGiftsSettings = UserFull;
contact#145ade0b user_id:long mutual:Bool = Contact;
@@ -427,6 +430,7 @@
updateStarsRevenueStatus#a584b019 peer:Peer status:StarsRevenueStatus = Update;
updateBotPurchasedPaidMedia#283bd312 user_id:long payload:string qts:int =
Update;
updatePaidReactionPrivacy#8b725fce private:PaidReactionPrivacy = Update;
+updateSentPhoneCode#504aa18f sent_code:auth.SentCode = Update;
updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int =
updates.State;
@@ -534,6 +538,7 @@
inputPrivacyKeyAbout#3823cc40 = InputPrivacyKey;
inputPrivacyKeyBirthday#d65a11cc = InputPrivacyKey;
inputPrivacyKeyStarGiftsAutoSave#e1732341 = InputPrivacyKey;
+inputPrivacyKeyNoPaidMessages#bdc597b4 = InputPrivacyKey;
privacyKeyStatusTimestamp#bc2eab30 = PrivacyKey;
privacyKeyChatInvite#500e6dfa = PrivacyKey;
@@ -547,6 +552,7 @@
privacyKeyAbout#a486b761 = PrivacyKey;
privacyKeyBirthday#2000a518 = PrivacyKey;
privacyKeyStarGiftsAutoSave#2ca4fdf8 = PrivacyKey;
+privacyKeyNoPaidMessages#17d348d2 = PrivacyKey;
inputPrivacyValueAllowContacts#d09e07b = InputPrivacyRule;
inputPrivacyValueAllowAll#184b35ce = InputPrivacyRule;
@@ -1309,7 +1315,7 @@
stats.megagroupStats#ef7ff916 period:StatsDateRangeDays
members:StatsAbsValueAndPrev messages:StatsAbsValueAndPrev
viewers:StatsAbsValueAndPrev posters:StatsAbsValueAndPrev
growth_graph:StatsGraph members_graph:StatsGraph
new_members_by_source_graph:StatsGraph languages_graph:StatsGraph
messages_graph:StatsGraph actions_graph:StatsGraph top_hours_graph:StatsGraph
weekdays_graph:StatsGraph top_posters:Vector<StatsGroupTopPoster>
top_admins:Vector<StatsGroupTopAdmin> top_inviters:Vector<StatsGroupTopInviter>
users:Vector<User> = stats.MegagroupStats;
-globalPrivacySettings#734c4ccb flags:#
archive_and_mute_new_noncontact_peers:flags.0?true
keep_archived_unmuted:flags.1?true keep_archived_folders:flags.2?true
hide_read_marks:flags.3?true new_noncontact_peers_require_premium:flags.4?true
= GlobalPrivacySettings;
+globalPrivacySettings#fe41b34f flags:#
archive_and_mute_new_noncontact_peers:flags.0?true
keep_archived_unmuted:flags.1?true keep_archived_folders:flags.2?true
hide_read_marks:flags.3?true new_noncontact_peers_require_premium:flags.4?true
display_gifts_button:flags.7?true noncontact_peers_paid_stars:flags.5?long
disallowed_gifts:flags.6?DisallowedGiftsSettings = GlobalPrivacySettings;
help.countryCode#4203c5ef flags:# country_code:string
prefixes:flags.0?Vector<string> patterns:flags.1?Vector<string> =
help.CountryCode;
@@ -1478,6 +1484,8 @@
inputInvoiceStarGift#e8625e92 flags:# hide_name:flags.0?true
include_upgrade:flags.2?true peer:InputPeer gift_id:long
message:flags.1?TextWithEntities = InputInvoice;
inputInvoiceStarGiftUpgrade#4d818d5d flags:#
keep_original_details:flags.0?true stargift:InputSavedStarGift = InputInvoice;
inputInvoiceStarGiftTransfer#4a5f5bd9 stargift:InputSavedStarGift
to_id:InputPeer = InputInvoice;
+inputInvoicePremiumGiftStars#dabab2ef flags:# user_id:InputUser months:int
message:flags.0?TextWithEntities = InputInvoice;
+inputInvoiceBusinessBotTransferStars#f4997e42 bot:InputUser stars:long =
InputInvoice;
payments.exportedInvoice#aed0cbd9 url:string = payments.ExportedInvoice;
@@ -1492,8 +1500,7 @@
inputStorePaymentStarsTopup#dddd0f56 stars:long currency:string amount:long =
InputStorePaymentPurpose;
inputStorePaymentStarsGift#1d741ef7 user_id:InputUser stars:long
currency:string amount:long = InputStorePaymentPurpose;
inputStorePaymentStarsGiveaway#751f08fa flags:#
only_new_subscribers:flags.0?true winners_are_visible:flags.3?true stars:long
boost_peer:InputPeer additional_peers:flags.1?Vector<InputPeer>
countries_iso2:flags.2?Vector<string> prize_description:flags.4?string
random_id:long until_date:int currency:string amount:long users:int =
InputStorePaymentPurpose;
-
-premiumGiftOption#74c34319 flags:# months:int currency:string amount:long
bot_url:string store_product:flags.0?string = PremiumGiftOption;
+inputStorePaymentAuthCode#9bb2636d flags:# restore:flags.0?true
phone_number:string phone_code_hash:string currency:string amount:long =
InputStorePaymentPurpose;
paymentFormMethod#88f8f21b url:string title:string = PaymentFormMethod;
@@ -1752,7 +1759,7 @@
messages.quickReplies#c68d6695 quick_replies:Vector<QuickReply>
messages:Vector<Message> chats:Vector<Chat> users:Vector<User> =
messages.QuickReplies;
messages.quickRepliesNotModified#5f91eb5b = messages.QuickReplies;
-connectedBot#bd068601 flags:# can_reply:flags.0?true bot_id:long
recipients:BusinessBotRecipients = ConnectedBot;
+connectedBot#cd64636c flags:# bot_id:long recipients:BusinessBotRecipients
rights:BusinessBotRights = ConnectedBot;
account.connectedBots#17d7f87b connected_bots:Vector<ConnectedBot>
users:Vector<User> = account.ConnectedBots;
@@ -1760,7 +1767,7 @@
birthday#6c8e1e06 flags:# day:int month:int year:flags.0?int = Birthday;
-botBusinessConnection#896433b4 flags:# can_reply:flags.0?true
disabled:flags.1?true connection_id:string user_id:long dc_id:int date:int =
BotBusinessConnection;
+botBusinessConnection#8f34b2f5 flags:# disabled:flags.1?true
connection_id:string user_id:long dc_id:int date:int
rights:flags.2?BusinessBotRights = BotBusinessConnection;
inputBusinessIntro#9c469cd flags:# title:string description:string
sticker:flags.0?InputDocument = InputBusinessIntro;
@@ -1838,7 +1845,7 @@
starsTopupOption#bd915c0 flags:# extended:flags.1?true stars:long
store_product:flags.0?string currency:string amount:long = StarsTopupOption;
-starsTransaction#64dfc926 flags:# refund:flags.3?true pending:flags.4?true
failed:flags.6?true gift:flags.10?true reaction:flags.11?true
stargift_upgrade:flags.18?true id:string stars:StarsAmount date:int
peer:StarsTransactionPeer title:flags.0?string description:flags.1?string
photo:flags.2?WebDocument transaction_date:flags.5?int
transaction_url:flags.5?string bot_payload:flags.7?bytes msg_id:flags.8?int
extended_media:flags.9?Vector<MessageMedia> subscription_period:flags.12?int
giveaway_post_id:flags.13?int stargift:flags.14?StarGift
floodskip_number:flags.15?int starref_commission_permille:flags.16?int
starref_peer:flags.17?Peer starref_amount:flags.17?StarsAmount =
StarsTransaction;
+starsTransaction#a39fd94a flags:# refund:flags.3?true pending:flags.4?true
failed:flags.6?true gift:flags.10?true reaction:flags.11?true
stargift_upgrade:flags.18?true id:string stars:StarsAmount date:int
peer:StarsTransactionPeer title:flags.0?string description:flags.1?string
photo:flags.2?WebDocument transaction_date:flags.5?int
transaction_url:flags.5?string bot_payload:flags.7?bytes msg_id:flags.8?int
extended_media:flags.9?Vector<MessageMedia> subscription_period:flags.12?int
giveaway_post_id:flags.13?int stargift:flags.14?StarGift
floodskip_number:flags.15?int starref_commission_permille:flags.16?int
starref_peer:flags.17?Peer starref_amount:flags.17?StarsAmount
paid_messages:flags.19?int premium_gift_months:flags.20?int = StarsTransaction;
payments.starsStatus#6c9ce8ed flags:# balance:StarsAmount
subscriptions:flags.1?Vector<StarsSubscription>
subscriptions_next_offset:flags.2?string
subscriptions_missing_balance:flags.4?long
history:flags.3?Vector<StarsTransaction> next_offset:flags.0?string
chats:Vector<Chat> users:Vector<User> = payments.StarsStatus;
@@ -1925,7 +1932,7 @@
messages.webPagePreview#b53e8b21 media:MessageMedia users:Vector<User> =
messages.WebPagePreview;
-savedStarGift#6056dba5 flags:# name_hidden:flags.0?true unsaved:flags.5?true
refunded:flags.9?true can_upgrade:flags.10?true from_id:flags.1?Peer date:int
gift:StarGift message:flags.2?TextWithEntities msg_id:flags.3?int
saved_id:flags.11?long convert_stars:flags.4?long upgrade_stars:flags.6?long
can_export_at:flags.7?int transfer_stars:flags.8?long = SavedStarGift;
+savedStarGift#6056dba5 flags:# name_hidden:flags.0?true unsaved:flags.5?true
refunded:flags.9?true can_upgrade:flags.10?true pinned_to_top:flags.12?true
from_id:flags.1?Peer date:int gift:StarGift message:flags.2?TextWithEntities
msg_id:flags.3?int saved_id:flags.11?long convert_stars:flags.4?long
upgrade_stars:flags.6?long can_export_at:flags.7?int
transfer_stars:flags.8?long = SavedStarGift;
payments.savedStarGifts#95f389b1 flags:# count:int
chat_notifications_enabled:flags.1?Bool gifts:Vector<SavedStarGift>
next_offset:flags.0?string chats:Vector<Chat> users:Vector<User> =
payments.SavedStarGifts;
@@ -1938,6 +1945,21 @@
paidReactionPrivacyAnonymous#1f0c1ad9 = PaidReactionPrivacy;
paidReactionPrivacyPeer#dc6cfcf0 peer:InputPeer = PaidReactionPrivacy;
+account.paidMessagesRevenue#1e109708 stars_amount:long =
account.PaidMessagesRevenue;
+
+requirementToContactEmpty#50a9839 = RequirementToContact;
+requirementToContactPremium#e581e4e9 = RequirementToContact;
+requirementToContactPaidMessages#b4f67e93 stars_amount:long =
RequirementToContact;
+
+businessBotRights#a0624cf7 flags:# reply:flags.0?true
read_messages:flags.1?true delete_sent_messages:flags.2?true
delete_received_messages:flags.3?true edit_name:flags.4?true
edit_bio:flags.5?true edit_profile_photo:flags.6?true
edit_username:flags.7?true view_gifts:flags.8?true sell_gifts:flags.9?true
change_gift_settings:flags.10?true transfer_and_upgrade_gifts:flags.11?true
transfer_stars:flags.12?true manage_stories:flags.13?true = BusinessBotRights;
+
+disallowedGiftsSettings#71f276c4 flags:#
disallow_unlimited_stargifts:flags.0?true
disallow_limited_stargifts:flags.1?true disallow_unique_stargifts:flags.2?true
disallow_premium_gifts:flags.3?true = DisallowedGiftsSettings;
+
+sponsoredPeer#c69708d3 flags:# random_id:bytes peer:Peer
sponsor_info:flags.0?string additional_info:flags.1?string = SponsoredPeer;
+
+contacts.sponsoredPeersEmpty#ea32b4b1 = contacts.SponsoredPeers;
+contacts.sponsoredPeers#eb032884 peers:Vector<SponsoredPeer>
chats:Vector<Chat> users:Vector<User> = contacts.SponsoredPeers;
+
---functions---
invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
@@ -2072,7 +2094,7 @@
account.updateBusinessLocation#9e6b131a flags:#
geo_point:flags.1?InputGeoPoint address:flags.0?string = Bool;
account.updateBusinessGreetingMessage#66cdafc4 flags:#
message:flags.0?InputBusinessGreetingMessage = Bool;
account.updateBusinessAwayMessage#a26a7fa5 flags:#
message:flags.0?InputBusinessAwayMessage = Bool;
-account.updateConnectedBot#43d8521d flags:# can_reply:flags.0?true
deleted:flags.1?true bot:InputUser recipients:InputBusinessBotRecipients =
Updates;
+account.updateConnectedBot#66a08c7e flags:# deleted:flags.1?true
rights:flags.0?BusinessBotRights bot:InputUser
recipients:InputBusinessBotRecipients = Updates;
account.getConnectedBots#4ea4c80f = account.ConnectedBots;
account.getBotBusinessConnection#76a86270 connection_id:string = Updates;
account.updateBusinessIntro#a614d034 flags:# intro:flags.0?InputBusinessIntro
= Bool;
@@ -2089,11 +2111,13 @@
account.getReactionsNotifySettings#6dd654c = ReactionsNotifySettings;
account.setReactionsNotifySettings#316ce548 settings:ReactionsNotifySettings =
ReactionsNotifySettings;
account.getCollectibleEmojiStatuses#2e7b4543 hash:long = account.EmojiStatuses;
+account.addNoPaidMessagesException#6f688aa7 flags:#
refund_charged:flags.0?true user_id:InputUser = Bool;
+account.getPaidMessagesRevenue#f1266f38 user_id:InputUser =
account.PaidMessagesRevenue;
users.getUsers#d91a548 id:Vector<InputUser> = Vector<User>;
users.getFullUser#b60f5918 id:InputUser = users.UserFull;
users.setSecureValueErrors#90c894b5 id:InputUser
errors:Vector<SecureValueError> = Bool;
-users.getIsPremiumRequiredToContact#a622aa10 id:Vector<InputUser> =
Vector<Bool>;
+users.getRequirementsToContact#d89a83a3 id:Vector<InputUser> =
Vector<RequirementToContact>;
contacts.getContactIDs#7adc669d hash:long = Vector<int>;
contacts.getStatuses#c4a353ee = Vector<ContactStatus>;
@@ -2121,6 +2145,7 @@
contacts.editCloseFriends#ba6705f0 id:Vector<long> = Bool;
contacts.setBlocked#94c65c76 flags:# my_stories_from:flags.0?true
id:Vector<InputPeer> limit:int = Bool;
contacts.getBirthdays#daeda864 = contacts.ContactBirthdays;
+contacts.getSponsoredPeers#b6c8c393 q:string = contacts.SponsoredPeers;
messages.getMessages#63c66506 id:Vector<InputMessage> = messages.Messages;
messages.getDialogs#a0f4cb4f flags:# exclude_pinned:flags.0?true
folder_id:flags.1?int offset_date:int offset_id:int offset_peer:InputPeer
limit:int hash:long = messages.Dialogs;
@@ -2131,9 +2156,9 @@
messages.deleteMessages#e58e95d2 flags:# revoke:flags.0?true id:Vector<int> =
messages.AffectedMessages;
messages.receivedMessages#5a954c0 max_id:int = Vector<ReceivedNotifyMessage>;
messages.setTyping#58943ee2 flags:# peer:InputPeer top_msg_id:flags.0?int
action:SendMessageAction = Bool;
-messages.sendMessage#983f9745 flags:# no_webpage:flags.1?true
silent:flags.5?true background:flags.6?true clear_draft:flags.7?true
noforwards:flags.14?true update_stickersets_order:flags.15?true
invert_media:flags.16?true allow_paid_floodskip:flags.19?true peer:InputPeer
reply_to:flags.0?InputReplyTo message:string random_id:long
reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector<MessageEntity>
schedule_date:flags.10?int send_as:flags.13?InputPeer
quick_reply_shortcut:flags.17?InputQuickReplyShortcut effect:flags.18?long =
Updates;
-messages.sendMedia#7852834e flags:# silent:flags.5?true
background:flags.6?true clear_draft:flags.7?true noforwards:flags.14?true
update_stickersets_order:flags.15?true invert_media:flags.16?true
allow_paid_floodskip:flags.19?true peer:InputPeer reply_to:flags.0?InputReplyTo
media:InputMedia message:string random_id:long reply_markup:flags.2?ReplyMarkup
entities:flags.3?Vector<MessageEntity> schedule_date:flags.10?int
send_as:flags.13?InputPeer
quick_reply_shortcut:flags.17?InputQuickReplyShortcut effect:flags.18?long =
Updates;
-messages.forwardMessages#6d74da08 flags:# silent:flags.5?true
background:flags.6?true with_my_score:flags.8?true drop_author:flags.11?true
drop_media_captions:flags.12?true noforwards:flags.14?true
allow_paid_floodskip:flags.19?true from_peer:InputPeer id:Vector<int>
random_id:Vector<long> to_peer:InputPeer top_msg_id:flags.9?int
schedule_date:flags.10?int send_as:flags.13?InputPeer
quick_reply_shortcut:flags.17?InputQuickReplyShortcut
video_timestamp:flags.20?int = Updates;
+messages.sendMessage#fbf2340a flags:# no_webpage:flags.1?true
silent:flags.5?true background:flags.6?true clear_draft:flags.7?true
noforwards:flags.14?true update_stickersets_order:flags.15?true
invert_media:flags.16?true allow_paid_floodskip:flags.19?true peer:InputPeer
reply_to:flags.0?InputReplyTo message:string random_id:long
reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector<MessageEntity>
schedule_date:flags.10?int send_as:flags.13?InputPeer
quick_reply_shortcut:flags.17?InputQuickReplyShortcut effect:flags.18?long
allow_paid_stars:flags.21?long = Updates;
+messages.sendMedia#a550cd78 flags:# silent:flags.5?true
background:flags.6?true clear_draft:flags.7?true noforwards:flags.14?true
update_stickersets_order:flags.15?true invert_media:flags.16?true
allow_paid_floodskip:flags.19?true peer:InputPeer reply_to:flags.0?InputReplyTo
media:InputMedia message:string random_id:long reply_markup:flags.2?ReplyMarkup
entities:flags.3?Vector<MessageEntity> schedule_date:flags.10?int
send_as:flags.13?InputPeer
quick_reply_shortcut:flags.17?InputQuickReplyShortcut effect:flags.18?long
allow_paid_stars:flags.21?long = Updates;
+messages.forwardMessages#bb9fa475 flags:# silent:flags.5?true
background:flags.6?true with_my_score:flags.8?true drop_author:flags.11?true
drop_media_captions:flags.12?true noforwards:flags.14?true
allow_paid_floodskip:flags.19?true from_peer:InputPeer id:Vector<int>
random_id:Vector<long> to_peer:InputPeer top_msg_id:flags.9?int
schedule_date:flags.10?int send_as:flags.13?InputPeer
quick_reply_shortcut:flags.17?InputQuickReplyShortcut
video_timestamp:flags.20?int allow_paid_stars:flags.21?long = Updates;
messages.reportSpam#cf1592db peer:InputPeer = Bool;
messages.getPeerSettings#efd9a6a2 peer:InputPeer = messages.PeerSettings;
messages.report#fc78af9b peer:InputPeer id:Vector<int> option:bytes
message:string = ReportResult;
@@ -2176,7 +2201,7 @@
messages.saveGif#327a30cb id:InputDocument unsave:Bool = Bool;
messages.getInlineBotResults#514e999d flags:# bot:InputUser peer:InputPeer
geo_point:flags.0?InputGeoPoint query:string offset:string =
messages.BotResults;
messages.setInlineBotResults#bb12a419 flags:# gallery:flags.0?true
private:flags.1?true query_id:long results:Vector<InputBotInlineResult>
cache_time:int next_offset:flags.2?string switch_pm:flags.3?InlineBotSwitchPM
switch_webview:flags.4?InlineBotWebView = Bool;
-messages.sendInlineBotResult#3ebee86a flags:# silent:flags.5?true
background:flags.6?true clear_draft:flags.7?true hide_via:flags.11?true
peer:InputPeer reply_to:flags.0?InputReplyTo random_id:long query_id:long
id:string schedule_date:flags.10?int send_as:flags.13?InputPeer
quick_reply_shortcut:flags.17?InputQuickReplyShortcut = Updates;
+messages.sendInlineBotResult#c0cf7646 flags:# silent:flags.5?true
background:flags.6?true clear_draft:flags.7?true hide_via:flags.11?true
peer:InputPeer reply_to:flags.0?InputReplyTo random_id:long query_id:long
id:string schedule_date:flags.10?int send_as:flags.13?InputPeer
quick_reply_shortcut:flags.17?InputQuickReplyShortcut
allow_paid_stars:flags.21?long = Updates;
messages.getMessageEditData#fda68d36 peer:InputPeer id:int =
messages.MessageEditData;
messages.editMessage#dfd14005 flags:# no_webpage:flags.1?true
invert_media:flags.16?true peer:InputPeer id:int message:flags.11?string
media:flags.14?InputMedia reply_markup:flags.2?ReplyMarkup
entities:flags.3?Vector<MessageEntity> schedule_date:flags.15?int
quick_reply_shortcut_id:flags.17?int = Updates;
messages.editInlineBotMessage#83557dba flags:# no_webpage:flags.1?true
invert_media:flags.16?true id:InputBotInlineMessageID message:flags.11?string
media:flags.14?InputMedia reply_markup:flags.2?ReplyMarkup
entities:flags.3?Vector<MessageEntity> = Bool;
@@ -2211,7 +2236,7 @@
messages.getUnreadMentions#f107e790 flags:# peer:InputPeer
top_msg_id:flags.0?int offset_id:int add_offset:int limit:int max_id:int
min_id:int = messages.Messages;
messages.readMentions#36e5bf4d flags:# peer:InputPeer top_msg_id:flags.0?int =
messages.AffectedHistory;
messages.getRecentLocations#702a40e0 peer:InputPeer limit:int hash:long =
messages.Messages;
-messages.sendMultiMedia#37b74355 flags:# silent:flags.5?true
background:flags.6?true clear_draft:flags.7?true noforwards:flags.14?true
update_stickersets_order:flags.15?true invert_media:flags.16?true
allow_paid_floodskip:flags.19?true peer:InputPeer reply_to:flags.0?InputReplyTo
multi_media:Vector<InputSingleMedia> schedule_date:flags.10?int
send_as:flags.13?InputPeer
quick_reply_shortcut:flags.17?InputQuickReplyShortcut effect:flags.18?long =
Updates;
+messages.sendMultiMedia#1bf89d74 flags:# silent:flags.5?true
background:flags.6?true clear_draft:flags.7?true noforwards:flags.14?true
update_stickersets_order:flags.15?true invert_media:flags.16?true
allow_paid_floodskip:flags.19?true peer:InputPeer reply_to:flags.0?InputReplyTo
multi_media:Vector<InputSingleMedia> schedule_date:flags.10?int
send_as:flags.13?InputPeer
quick_reply_shortcut:flags.17?InputQuickReplyShortcut effect:flags.18?long
allow_paid_stars:flags.21?long = Updates;
messages.uploadEncryptedFile#5057c497 peer:InputEncryptedChat
file:InputEncryptedFile = EncryptedFile;
messages.searchStickerSets#35705b8a flags:# exclude_featured:flags.0?true
q:string hash:long = messages.FoundStickerSets;
messages.getSplitRanges#1cff7e08 = Vector<MessageRange>;
@@ -2339,9 +2364,9 @@
messages.sendPaidReaction#58bbcb50 flags:# peer:InputPeer msg_id:int count:int
random_id:long private:flags.0?PaidReactionPrivacy = Updates;
messages.togglePaidReactionPrivacy#435885b5 peer:InputPeer msg_id:int
private:PaidReactionPrivacy = Bool;
messages.getPaidReactionPrivacy#472455aa = Updates;
-messages.viewSponsoredMessage#673ad8f1 peer:InputPeer random_id:bytes = Bool;
-messages.clickSponsoredMessage#f093465 flags:# media:flags.0?true
fullscreen:flags.1?true peer:InputPeer random_id:bytes = Bool;
-messages.reportSponsoredMessage#1af3dbb8 peer:InputPeer random_id:bytes
option:bytes = channels.SponsoredMessageReportResult;
+messages.viewSponsoredMessage#269e3643 random_id:bytes = Bool;
+messages.clickSponsoredMessage#8235057e flags:# media:flags.0?true
fullscreen:flags.1?true random_id:bytes = Bool;
+messages.reportSponsoredMessage#12cbf0c4 random_id:bytes option:bytes =
channels.SponsoredMessageReportResult;
messages.getSponsoredMessages#9bd2f439 peer:InputPeer =
messages.SponsoredMessages;
messages.savePreparedInlineMessage#f21f7f2f flags:#
result:InputBotInlineResult user_id:InputUser
peer_types:flags.0?Vector<InlineQueryPeerType> =
messages.BotPreparedInlineMessage;
messages.getPreparedInlineMessage#857ebdb8 bot:InputUser id:string =
messages.PreparedInlineMessage;
@@ -2454,6 +2479,7 @@
channels.setEmojiStickers#3cd930b7 channel:InputChannel
stickerset:InputStickerSet = Bool;
channels.restrictSponsoredMessages#9ae91519 channel:InputChannel
restricted:Bool = Updates;
channels.searchPosts#d19f987b hashtag:string offset_rate:int
offset_peer:InputPeer offset_id:int limit:int = messages.Messages;
+channels.updatePaidMessagesPrice#fc84653f channel:InputChannel
send_paid_messages_stars:long = Updates;
bots.sendCustomRequest#aa2769ed custom_method:string params:DataJSON =
DataJSON;
bots.answerWebhookJSONQuery#e6213f4d query_id:long data:DataJSON = Bool;
@@ -2496,7 +2522,6 @@
payments.exportInvoice#f91b065 invoice_media:InputMedia =
payments.ExportedInvoice;
payments.assignAppStoreTransaction#80ed747d receipt:bytes
purpose:InputStorePaymentPurpose = Updates;
payments.assignPlayMarketTransaction#dffd50d3 receipt:DataJSON
purpose:InputStorePaymentPurpose = Updates;
-payments.canPurchasePremium#9fc19eb6 purpose:InputStorePaymentPurpose = Bool;
payments.getPremiumGiftCodeOptions#2757ba54 flags:#
boost_peer:flags.0?InputPeer = Vector<PremiumGiftCodeOption>;
payments.checkGiftCode#8e51b4c1 slug:string = payments.CheckedGiftCode;
payments.applyGiftCode#f6e26854 slug:string = Updates;
@@ -2533,6 +2558,8 @@
payments.getSavedStarGift#b455a106 stargift:Vector<InputSavedStarGift> =
payments.SavedStarGifts;
payments.getStarGiftWithdrawalUrl#d06e93a8 stargift:InputSavedStarGift
password:InputCheckPasswordSRP = payments.StarGiftWithdrawalUrl;
payments.toggleChatStarGiftNotifications#60eaefa1 flags:# enabled:flags.0?true
peer:InputPeer = Bool;
+payments.toggleStarGiftsPinnedToTop#1513e7b0 peer:InputPeer
stargift:Vector<InputSavedStarGift> = Bool;
+payments.canPurchaseStore#4fdc5ea7 purpose:InputStorePaymentPurpose = Bool;
stickers.createStickerSet#9021ab67 flags:# masks:flags.0?true
emojis:flags.5?true text_color:flags.6?true user_id:InputUser title:string
short_name:string thumb:flags.2?InputDocument
stickers:Vector<InputStickerSetItem> software:flags.3?string =
messages.StickerSet;
stickers.removeStickerFromSet#f7760f51 sticker:InputDocument =
messages.StickerSet;
@@ -2653,4 +2680,4 @@
fragment.getCollectibleInfo#be1e85ba collectible:InputCollectible =
fragment.CollectibleInfo;
-// LAYER 199
+// LAYER 201
++++++ stop-using-event_loop-fixture.patch ++++++
>From 8e2a46568ef9193f5887aea1abf919ac4ca6d31e Mon Sep 17 00:00:00 2001
From: Steve Kowalik <[email protected]>
Date: Wed, 30 Jul 2025 12:31:14 +1000
Subject: [PATCH] Stop using the event_loop fixture
pytest-asyncio has deprecated (and in 1.0, removed) the event_loop
fixture, which is only used for one testcase. Use the get_running_loop()
helper function instead.
---
tests/telethon/test_helpers.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/telethon/test_helpers.py b/tests/telethon/test_helpers.py
index 47705ca25..3dffdf66d 100644
--- a/tests/telethon/test_helpers.py
+++ b/tests/telethon/test_helpers.py
@@ -39,9 +39,9 @@ def test_strip_text():
class TestSyncifyAsyncContext:
class NoopContextManager:
- def __init__(self, loop):
+ def __init__(self):
self.count = 0
- self.loop = loop
+ self.loop = helpers.get_running_loop()
async def __aenter__(self):
self.count += 1
@@ -54,8 +54,8 @@ async def __aexit__(self, exc_type, *args):
__enter__ = helpers._sync_enter
__exit__ = helpers._sync_exit
- def test_sync_acontext(self, event_loop):
- contm = self.NoopContextManager(event_loop)
+ def test_sync_acontext(self):
+ contm = self.NoopContextManager()
assert contm.count == 0
with contm:
@@ -64,8 +64,8 @@ def test_sync_acontext(self, event_loop):
assert contm.count == 0
@pytest.mark.asyncio
- async def test_async_acontext(self, event_loop):
- contm = self.NoopContextManager(event_loop)
+ async def test_async_acontext(self):
+ contm = self.NoopContextManager()
assert contm.count == 0
async with contm: