improvement: do not save typing edus in db
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
@@ -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 {})
|
||||
|
||||
Reference in New Issue
Block a user