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 {
|
2021-07-14 07:07:08 +00:00
|
|
|
crate::ConduitResult, rocket::options, ruma::api::client::r0::to_device::send_event_to_device,
|
2020-07-30 16:14:47 +00:00
|
|
|
};
|
|
|
|
|
2021-05-04 17:03:18 +00:00
|
|
|
pub const DEVICE_ID_LENGTH: usize = 10;
|
|
|
|
pub const TOKEN_LENGTH: usize = 256;
|
|
|
|
pub const SESSION_ID_LENGTH: usize = 256;
|
2020-07-30 16:14:47 +00:00
|
|
|
|
|
|
|
#[cfg(feature = "conduit_bin")]
|
|
|
|
#[options("/<_..>")]
|
2021-02-28 11:41:03 +00:00
|
|
|
#[tracing::instrument]
|
2020-10-21 19:28:02 +00:00
|
|
|
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())
|
|
|
|
}
|