mirror of
https://github.com/zulip/zulip.git
synced 2025-11-17 20:41:46 +00:00
We change the return type of check_message to be dataclass instead of Dict[str, Any]. This refactoring helps us to understand the context of the data structure returned by check_message clearly which was not possible when using Dict. SendMessageRequest class is added in zerver/lib/message.py inspite of it not being used in that file itself just to maintain consistency as other TypedDicts and dataclasses are defined in that file and to avoid circular dependency as SendMessageRequest is being used in lib/widget.py as well. We also rename local variable to 'send_request' for accessing SendMessageRequest objects.
7.4 KiB
7.4 KiB