mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 04:52:30 +00:00
Avoid packing more than 1024 messages in a single container
This commit is contained in:
@@ -15,6 +15,11 @@ class MessageContainer(TLObject):
|
||||
# The overhead of the container itself is subtracted.
|
||||
MAXIMUM_SIZE = 1044456 - 8
|
||||
|
||||
# Maximum amount of messages that can't be sent inside a single
|
||||
# container, inclusive. Beyond this limit Telegram will respond
|
||||
# with BAD_MESSAGE 64 (invalid container).
|
||||
MAXIMUM_LENGTH = 1024
|
||||
|
||||
def __init__(self, messages):
|
||||
self.messages = messages
|
||||
|
||||
|
Reference in New Issue
Block a user