Refactor MessageArea composer alias handling
Simplify the code, make it more declarative, and improve the reliability of sending typing notifications (notably when changing the used alias in the middle of a message).
This commit is contained in:
@@ -1239,8 +1239,8 @@ class MatrixClient(nio.AsyncClient):
|
||||
):
|
||||
"""Set typing notice to the server."""
|
||||
|
||||
# Do not send typing notice if the user is invisible
|
||||
presence = self.models["accounts"][self.user_id].presence
|
||||
|
||||
if presence not in [Presence.State.invisible, Presence.State.offline]:
|
||||
await super().room_typing(room_id, typing_state, timeout)
|
||||
|
||||
|
Reference in New Issue
Block a user