mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-04 19:12:29 +00:00
Update to layer 129 and other additions/enhancements (#3074)
* Apply code corrections for the new layer types. * Support not passing `user` to `get_permissions`. * `download_profile_photo` now supports `MessageService`. * `thumb` in send and edit message. * Document new known errors.
This commit is contained in:
@@ -518,8 +518,7 @@ def get_input_media(
|
||||
if isinstance(media, (
|
||||
types.MessageMediaEmpty, types.MessageMediaUnsupported,
|
||||
types.ChatPhotoEmpty, types.UserProfilePhotoEmpty,
|
||||
types.ChatPhoto, types.UserProfilePhoto,
|
||||
types.FileLocationToBeDeprecated)):
|
||||
types.ChatPhoto, types.UserProfilePhoto)):
|
||||
return types.InputMediaEmpty()
|
||||
|
||||
if isinstance(media, types.Message):
|
||||
@@ -823,9 +822,6 @@ def _get_file_info(location):
|
||||
thumb_size=location.sizes[-1].type
|
||||
), _photo_size_byte_count(location.sizes[-1]))
|
||||
|
||||
if isinstance(location, types.FileLocationToBeDeprecated):
|
||||
raise TypeError('Unavailable location cannot be used as input')
|
||||
|
||||
_raise_cast_fail(location, 'InputFileLocation')
|
||||
|
||||
|
||||
@@ -1217,10 +1213,6 @@ def resolve_bot_file_id(file_id):
|
||||
date=None,
|
||||
sizes=[types.PhotoSize(
|
||||
type=photo_size,
|
||||
location=types.FileLocationToBeDeprecated(
|
||||
volume_id=volume_id,
|
||||
local_id=local_id
|
||||
),
|
||||
w=0,
|
||||
h=0,
|
||||
size=0
|
||||
|
Reference in New Issue
Block a user