refactor: remove previous typing implementation and add sync wakeup for new one

This commit is contained in:
Timo Kösters 2024-03-22 08:22:15 +01:00
parent 6bd7ff4917
commit d2817679e5
No known key found for this signature in database
GPG key ID: 0B25E636FBA7E4CB
11 changed files with 101 additions and 185 deletions

View file

@ -23,17 +23,23 @@ 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(),
).await?;
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).await?;
.typing_remove(sender_user, &body.room_id)
.await?;
}
Ok(create_typing_event::v3::Response {})