improvement: do not save typing edus in db
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
a47923820c
commit
019a82850d
5 changed files with 77 additions and 30 deletions
|
@ -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 {})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue