update ruma

This commit is contained in:
Jonathan de Jong 2022-02-18 15:33:14 +01:00
parent f3795846b5
commit e9f87e1952
42 changed files with 514 additions and 500 deletions

View file

@ -1,14 +1,15 @@
use crate::{database::DatabaseGuard, utils, Result, Ruma};
use create_typing_event::Typing;
use ruma::api::client::r0::typing::create_typing_event;
use ruma::api::client::typing::create_typing_event;
/// # `PUT /_matrix/client/r0/rooms/{roomId}/typing/{userId}`
///
/// Sets the typing state of the sender user.
pub async fn create_typing_event_route(
db: DatabaseGuard,
body: Ruma<create_typing_event::Request<'_>>,
) -> Result<create_typing_event::Response> {
body: Ruma<create_typing_event::v3::Request<'_>>,
) -> Result<create_typing_event::v3::Response> {
use create_typing_event::v3::Typing;
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
if let Typing::Yes(duration) = body.state {
@ -24,5 +25,5 @@ pub async fn create_typing_event_route(
.typing_remove(sender_user, &body.room_id, &db.globals)?;
}
Ok(create_typing_event::Response {})
Ok(create_typing_event::v3::Response {})
}