mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-11-09 18:40:35 +00:00
Support exclusive conversations by default
This commit is contained in:
@@ -8,7 +8,8 @@ from threading import Thread
|
||||
|
||||
from .common import (
|
||||
ReadCancelledError, TypeNotFoundError, InvalidChecksumError,
|
||||
InvalidBufferError, SecurityError, CdnFileTamperedError, MultiError
|
||||
InvalidBufferError, SecurityError, CdnFileTamperedError,
|
||||
AlreadyInConversationError, MultiError
|
||||
)
|
||||
|
||||
# This imports the base errors too, as they're imported there
|
||||
|
||||
@@ -79,6 +79,17 @@ class CdnFileTamperedError(SecurityError):
|
||||
)
|
||||
|
||||
|
||||
class AlreadyInConversationError(Exception):
|
||||
"""
|
||||
Occurs when another exclusive conversation is opened in the same chat.
|
||||
"""
|
||||
def __init__(self):
|
||||
super().__init__(
|
||||
'Cannot open exclusive conversation in a '
|
||||
'chat that already has one open conversation'
|
||||
)
|
||||
|
||||
|
||||
class MultiError(Exception):
|
||||
"""Exception container for multiple `TLRequest`'s."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user