improvement: do not save typing edus in db

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
Timo Kösters 2024-03-08 10:05:48 -05:00 committed by June
parent a47923820c
commit 019a82850d
5 changed files with 77 additions and 30 deletions

View file

@ -17,13 +17,18 @@ pub async fn create_typing_event_route(
}
if let Typing::Yes(duration) = body.state {
services().rooms.edus.typing.typing_add(
sender_user,
&body.room_id,
duration.as_millis() as u64 + utils::millis_since_unix_epoch(),
)?;
services()
.rooms
.edus
.typing
.typing_add(
sender_user,
&body.room_id,
duration.as_millis() as u64 + utils::millis_since_unix_epoch(),
)
.await?;
} else {
services().rooms.edus.typing.typing_remove(sender_user, &body.room_id)?;
services().rooms.edus.typing.typing_remove(sender_user, &body.room_id).await?;
}
Ok(create_typing_event::v3::Response {})