conduit/src/client_server/mod.rs

82 lines
1.5 KiB
Rust
Raw Normal View History

2020-07-30 16:14:47 +00:00
mod account;
mod alias;
mod backup;
mod capabilities;
mod config;
mod context;
mod device;
mod directory;
mod filter;
mod keys;
mod media;
mod membership;
mod message;
mod presence;
mod profile;
mod push;
mod read_marker;
mod redact;
mod room;
2020-08-18 10:15:27 +00:00
mod search;
2020-07-30 16:14:47 +00:00
mod session;
mod state;
mod sync;
mod tag;
mod thirdparty;
mod to_device;
mod typing;
mod unversioned;
mod user_directory;
mod voip;
pub use account::*;
pub use alias::*;
pub use backup::*;
pub use capabilities::*;
pub use config::*;
pub use context::*;
pub use device::*;
pub use directory::*;
pub use filter::*;
pub use keys::*;
pub use media::*;
pub use membership::*;
pub use message::*;
pub use presence::*;
pub use profile::*;
pub use push::*;
pub use read_marker::*;
pub use redact::*;
pub use room::*;
2020-08-18 10:15:27 +00:00
pub use search::*;
2020-07-30 16:14:47 +00:00
pub use session::*;
pub use state::*;
pub use sync::*;
pub use tag::*;
pub use thirdparty::*;
pub use to_device::*;
pub use typing::*;
pub use unversioned::*;
pub use user_directory::*;
pub use voip::*;
#[cfg(not(feature = "conduit_bin"))]
use super::State;
#[cfg(feature = "conduit_bin")]
use {
crate::ConduitResult,
rocket::{options, State},
ruma::api::client::r0::to_device::send_event_to_device,
};
const DEVICE_ID_LENGTH: usize = 10;
const TOKEN_LENGTH: usize = 256;
const SESSION_ID_LENGTH: usize = 256;
#[cfg(feature = "conduit_bin")]
#[options("/<_..>")]
2021-02-28 11:41:03 +00:00
#[tracing::instrument]
pub async fn options_route() -> ConduitResult<send_event_to_device::Response> {
2020-07-30 16:14:47 +00:00
Ok(send_event_to_device::Response.into())
}