mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
This uses a more specific type `_StrPromise` to replace `Promise` providing typing information for lazy translation strings. In places where the callee evaluates the `_StrPromise` object in all cases we simply force the evaluation with `str()`. This includes `JsonableError` that ends up handled by the error handler middleware, and `internal_send_stream_message` that depends on `check_stream_topic`, requiring the `topic` to be evaluated anyway. In other siuations, the callee is expected to be able to handle `StrPromise` explicitly. Signed-off-by: Zixuan James Li <p359101898@gmail.com>
22 KiB
22 KiB