mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-04 19:12:29 +00:00
Fix MemoryError on get_input_media(game)
Because an integer was being passed where a TLObject was expected, so the serialization with bytes() was actually requesting that many bytes as opposed to properly converting the expected object.
This commit is contained in:
@@ -483,7 +483,10 @@ def get_input_media(
|
||||
file=media, mime_type=mime, attributes=attrs)
|
||||
|
||||
if isinstance(media, types.MessageMediaGame):
|
||||
return types.InputMediaGame(id=media.game.id)
|
||||
return types.InputMediaGame(id=types.InputGameID(
|
||||
id=media.game.id,
|
||||
access_hash=media.game.access_hash
|
||||
))
|
||||
|
||||
if isinstance(media, types.MessageMediaContact):
|
||||
return types.InputMediaContact(
|
||||
|
Reference in New Issue
Block a user