2020-07-30 16:14:47 +00:00
|
|
|
use crate::{utils, ConduitResult};
|
|
|
|
use ruma::api::client::r0::filter::{self, create_filter, get_filter};
|
|
|
|
|
|
|
|
#[cfg(feature = "conduit_bin")]
|
|
|
|
use rocket::{get, post};
|
|
|
|
|
|
|
|
#[cfg_attr(feature = "conduit_bin", get("/_matrix/client/r0/user/<_>/filter/<_>"))]
|
|
|
|
pub fn get_filter_route() -> ConduitResult<get_filter::Response> {
|
|
|
|
// TODO
|
2020-09-08 15:32:03 +00:00
|
|
|
Ok(get_filter::Response::new(filter::IncomingFilterDefinition {
|
2020-08-06 12:29:59 +00:00
|
|
|
event_fields: None,
|
|
|
|
event_format: None,
|
|
|
|
account_data: None,
|
|
|
|
room: None,
|
|
|
|
presence: None,
|
|
|
|
})
|
2020-07-30 16:14:47 +00:00
|
|
|
.into())
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg_attr(feature = "conduit_bin", post("/_matrix/client/r0/user/<_>/filter"))]
|
|
|
|
pub fn create_filter_route() -> ConduitResult<create_filter::Response> {
|
|
|
|
// TODO
|
2020-08-06 12:29:59 +00:00
|
|
|
Ok(create_filter::Response::new(utils::random_string(10)).into())
|
2020-07-30 16:14:47 +00:00
|
|
|
}
|