message_edit: Show typing indicator for message editing.

This commit adds typing indicators for message editing in stream
as well as in dm, if the send typing notification
for corresponding is enabled.

Based on earlier work in #28585.

Co-authored-by: Rohan Gudimetla <rohan.gudimetla07@gmail.com>

Fixes #25719.
This commit is contained in:
opmkumar
2025-02-07 00:54:43 +05:30
committed by Tim Abbott
parent c2821ef0f4
commit 2a15da47d9
28 changed files with 1477 additions and 38 deletions

View File

@@ -61,6 +61,13 @@ def get_event_checker(event: dict[str, Any]) -> Callable[[str, dict[str, Any]],
# Start by grabbing the event type.
name = event["type"]
# This is a temporary workaround until a proper fix is implemented.
if name == "typing_edit_message":
if event["recipient"]["type"] == "channel":
name = "typing_edit_channel_message"
else:
name = "typing_edit_direct_message"
# Handle things like AttachmentRemoveEvent
if "op" in event:
name += "_" + event["op"].title()