Color user mentions in local echoes too

This commit is contained in:
miruka 2020-03-23 14:23:32 -04:00
parent b11bd8331b
commit 38e57d2ff9
2 changed files with 6 additions and 4 deletions

View File

@ -1,8 +1,6 @@
# TODO
- mention color in local echo
## Main goals for next version
## Goals before 0.5.0
- Redacting messages
- Download progress bar for file events, "Save as..."

View File

@ -337,7 +337,11 @@ class MatrixClient(nio.AsyncClient):
tx_id = uuid4()
content[f"{__app_name__}.transaction_id"] = str(tx_id)
await self._local_echo(room_id, tx_id, event_type, content=echo_body)
mentions = HTML.mentions_in_html(echo_body)
await self._local_echo(
room_id, tx_id, event_type, content=echo_body, mentions=mentions,
)
await self._send_message(room_id, content)