-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move Message redefinitions back to patched
Fixes #1695. This matches the older behaviour better, although the patched module is now written manually.
- Loading branch information
Showing
2 changed files
with
21 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,20 @@ | ||
# Compatibility for people relying on this module | ||
from ..custom.message import MessageEmpty, MessageService, Message | ||
from .. import types, alltlobjects | ||
from ..custom.message import Message as _Message | ||
|
||
class MessageEmpty(_Message, types.MessageEmpty): | ||
pass | ||
|
||
types.MessageEmpty = MessageEmpty | ||
alltlobjects.tlobjects[MessageEmpty.CONSTRUCTOR_ID] = MessageEmpty | ||
|
||
class MessageService(_Message, types.MessageService): | ||
pass | ||
|
||
types.MessageService = MessageService | ||
alltlobjects.tlobjects[MessageService.CONSTRUCTOR_ID] = MessageService | ||
|
||
class _Message(_Message, types.Message): | ||
pass | ||
|
||
Message = _Message | ||
types.Message = Message |