Skip to content
Snippets Groups Projects
Commit d0df8b49 authored by Devin Ragotzy's avatar Devin Ragotzy
Browse files

Merge remote-tracking branch 'upstream/master' into correct-sendtxn

parents e239014f bd6507ea
No related branches found
No related tags found
No related merge requests found
Showing
with 409 additions and 209 deletions
# Headline
### Description
/label ~conduit
This diff is collapsed.
...@@ -14,7 +14,7 @@ edition = "2018" ...@@ -14,7 +14,7 @@ edition = "2018"
[dependencies] [dependencies]
# Used to handle requests # Used to handle requests
# TODO: This can become optional as soon as proper configs are supported # TODO: This can become optional as soon as proper configs are supported
rocket = { git = "https://github.com/SergioBenitez/Rocket.git", rev = "c24f15c18f02319be83af4f3c1951dc220b52c5e", features = ["tls"] } # Used to handle requests rocket = { git = "https://github.com/SergioBenitez/Rocket.git", rev = "93e62c86eddf7cc9a7fc40b044182f83f0d7d92a", features = ["tls"] } # Used to handle requests
#rocket = { git = "https://github.com/timokoesters/Rocket.git", branch = "empty_parameters", default-features = false, features = ["tls"] } #rocket = { git = "https://github.com/timokoesters/Rocket.git", branch = "empty_parameters", default-features = false, features = ["tls"] }
# Used for matrix spec type definitions and helpers # Used for matrix spec type definitions and helpers
...@@ -30,42 +30,47 @@ state-res = { git = "https://github.com/ruma/state-res", branch = "main", featur ...@@ -30,42 +30,47 @@ state-res = { git = "https://github.com/ruma/state-res", branch = "main", featur
# state-res = { path = "../../state-res", features = ["unstable-pre-spec", "gen-eventid"] } # state-res = { path = "../../state-res", features = ["unstable-pre-spec", "gen-eventid"] }
# Used for long polling and federation sender, should be the same as rocket::tokio # Used for long polling and federation sender, should be the same as rocket::tokio
tokio = { version = "1.1.0", features = ["macros", "time", "sync"] } tokio = "1.2.0"
# Used for storing data permanently # Used for storing data permanently
sled = { version = "0.34.6", default-features = false } sled = { version = "0.34.6", default-features = false }
# Used for emitting log entries # Used for emitting log entries
log = "0.4.11" log = "0.4.14"
# Used for rocket<->ruma conversions # Used for rocket<->ruma conversions
http = "0.2.3" http = "0.2.3"
# Used to find data directory for default db path # Used to find data directory for default db path
directories = "3.0.1" directories = "3.0.1"
# Used for ruma wrapper # Used for ruma wrapper
serde_json = { version = "1.0.60", features = ["raw_value"] } serde_json = { version = "1.0.64", features = ["raw_value"] }
# Used for appservice registration files # Used for appservice registration files
serde_yaml = "0.8.14" serde_yaml = "0.8.17"
# Used for pdu definition # Used for pdu definition
serde = "1.0.117" serde = "1.0.123"
# Used for secure identifiers # Used for secure identifiers
rand = "0.7.3" rand = "0.8.3"
# Used to hash passwords # Used to hash passwords
rust-argon2 = "0.8.3" rust-argon2 = "0.8.3"
# Used to send requests # Used to send requests
reqwest = "0.11.0" reqwest = "0.11.1"
# Used for conduit::Error type # Used for conduit::Error type
thiserror = "1.0.22" thiserror = "1.0.24"
# Used to generate thumbnails for images # Used to generate thumbnails for images
image = { version = "0.23.12", default-features = false, features = ["jpeg", "png", "gif"] } image = { version = "0.23.14", default-features = false, features = ["jpeg", "png", "gif"] }
# Used to encode server public key # Used to encode server public key
base64 = "0.13.0" base64 = "0.13.0"
# Used when hashing the state # Used when hashing the state
ring = "0.16.19" ring = "0.16.20"
# Used when querying the SRV record of other servers # Used when querying the SRV record of other servers
trust-dns-resolver = "0.20.0" trust-dns-resolver = "0.20.0"
# Used to find matching events for appservices # Used to find matching events for appservices
regex = "1.4.2" regex = "1.4.3"
# jwt jsonwebtokens # jwt jsonwebtokens
jsonwebtoken = "7.2.0" jsonwebtoken = "7.2.0"
# Performance measurements
tracing = "0.1.25"
opentelemetry = "0.12.0"
tracing-subscriber = "0.2.16"
tracing-opentelemetry = "0.11.0"
opentelemetry-jaeger = "0.11.0"
[features] [features]
default = ["conduit_bin"] default = ["conduit_bin"]
......
...@@ -30,6 +30,9 @@ max_request_size = 20_000_000 # in bytes ...@@ -30,6 +30,9 @@ max_request_size = 20_000_000 # in bytes
#allow_encryption = false #allow_encryption = false
#allow_federation = false #allow_federation = false
# Enable jaeger to support monitoring and troubleshooting through jaeger
#allow_jaeger = false
#cache_capacity = 1073741824 # in bytes, 1024 * 1024 * 1024 #cache_capacity = 1073741824 # in bytes, 1024 * 1024 * 1024
#max_concurrent_requests = 4 # How many requests Conduit sends to other servers at the same time #max_concurrent_requests = 4 # How many requests Conduit sends to other servers at the same time
#workers = 4 # default: cpu core count * 2 #workers = 4 # default: cpu core count * 2
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
feature = "conduit_bin", feature = "conduit_bin",
get("/_matrix/client/r0/register/available", data = "<body>") get("/_matrix/client/r0/register/available", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn get_register_available_route( pub async fn get_register_available_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<get_username_availability::Request<'_>>, body: Ruma<get_username_availability::Request<'_>>,
...@@ -82,6 +83,7 @@ pub async fn get_register_available_route( ...@@ -82,6 +83,7 @@ pub async fn get_register_available_route(
feature = "conduit_bin", feature = "conduit_bin",
post("/_matrix/client/r0/register", data = "<body>") post("/_matrix/client/r0/register", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn register_route( pub async fn register_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<register::Request<'_>>, body: Ruma<register::Request<'_>>,
...@@ -498,6 +500,7 @@ pub async fn register_route( ...@@ -498,6 +500,7 @@ pub async fn register_route(
feature = "conduit_bin", feature = "conduit_bin",
post("/_matrix/client/r0/account/password", data = "<body>") post("/_matrix/client/r0/account/password", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn change_password_route( pub async fn change_password_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<change_password::Request<'_>>, body: Ruma<change_password::Request<'_>>,
...@@ -562,6 +565,7 @@ pub async fn change_password_route( ...@@ -562,6 +565,7 @@ pub async fn change_password_route(
feature = "conduit_bin", feature = "conduit_bin",
get("/_matrix/client/r0/account/whoami", data = "<body>") get("/_matrix/client/r0/account/whoami", data = "<body>")
)] )]
#[tracing::instrument(skip(body))]
pub async fn whoami_route(body: Ruma<whoami::Request>) -> ConduitResult<whoami::Response> { pub async fn whoami_route(body: Ruma<whoami::Request>) -> ConduitResult<whoami::Response> {
let sender_user = body.sender_user.as_ref().expect("user is authenticated"); let sender_user = body.sender_user.as_ref().expect("user is authenticated");
Ok(whoami::Response { Ok(whoami::Response {
...@@ -582,6 +586,7 @@ pub async fn whoami_route(body: Ruma<whoami::Request>) -> ConduitResult<whoami:: ...@@ -582,6 +586,7 @@ pub async fn whoami_route(body: Ruma<whoami::Request>) -> ConduitResult<whoami::
feature = "conduit_bin", feature = "conduit_bin",
post("/_matrix/client/r0/account/deactivate", data = "<body>") post("/_matrix/client/r0/account/deactivate", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn deactivate_route( pub async fn deactivate_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<deactivate::Request<'_>>, body: Ruma<deactivate::Request<'_>>,
......
use super::State; use super::State;
use crate::{ConduitResult, Database, Error, Ruma}; use crate::{ConduitResult, Database, Error, Ruma};
use regex::Regex;
use ruma::{ use ruma::{
api::{ api::{
appservice, appservice,
...@@ -19,6 +20,7 @@ ...@@ -19,6 +20,7 @@
feature = "conduit_bin", feature = "conduit_bin",
put("/_matrix/client/r0/directory/room/<_>", data = "<body>") put("/_matrix/client/r0/directory/room/<_>", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn create_alias_route( pub async fn create_alias_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<create_alias::Request<'_>>, body: Ruma<create_alias::Request<'_>>,
...@@ -39,6 +41,7 @@ pub async fn create_alias_route( ...@@ -39,6 +41,7 @@ pub async fn create_alias_route(
feature = "conduit_bin", feature = "conduit_bin",
delete("/_matrix/client/r0/directory/room/<_>", data = "<body>") delete("/_matrix/client/r0/directory/room/<_>", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn delete_alias_route( pub async fn delete_alias_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<delete_alias::Request<'_>>, body: Ruma<delete_alias::Request<'_>>,
...@@ -54,6 +57,7 @@ pub async fn delete_alias_route( ...@@ -54,6 +57,7 @@ pub async fn delete_alias_route(
feature = "conduit_bin", feature = "conduit_bin",
get("/_matrix/client/r0/directory/room/<_>", data = "<body>") get("/_matrix/client/r0/directory/room/<_>", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn get_alias_route( pub async fn get_alias_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<get_alias::Request<'_>>, body: Ruma<get_alias::Request<'_>>,
...@@ -83,15 +87,23 @@ pub async fn get_alias_helper( ...@@ -83,15 +87,23 @@ pub async fn get_alias_helper(
Some(r) => room_id = Some(r), Some(r) => room_id = Some(r),
None => { None => {
for (_id, registration) in db.appservice.iter_all().filter_map(|r| r.ok()) { for (_id, registration) in db.appservice.iter_all().filter_map(|r| r.ok()) {
if db let aliases = registration
.sending .get("namespaces")
.send_appservice_request( .and_then(|ns| ns.get("aliases"))
&db.globals, .and_then(|users| users.get("regex"))
registration, .and_then(|regex| regex.as_str())
appservice::query::query_room_alias::v1::Request { room_alias }, .and_then(|regex| Regex::new(regex).ok());
)
.await if aliases.map_or(false, |aliases| aliases.is_match(room_alias.as_str()))
.is_ok() && db
.sending
.send_appservice_request(
&db.globals,
registration,
appservice::query::query_room_alias::v1::Request { room_alias },
)
.await
.is_ok()
{ {
room_id = Some(db.rooms.id_from_alias(&room_alias)?.ok_or_else(|| { room_id = Some(db.rooms.id_from_alias(&room_alias)?.ok_or_else(|| {
Error::bad_config("Appservice lied to us. Room does not exist.") Error::bad_config("Appservice lied to us. Room does not exist.")
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
feature = "conduit_bin", feature = "conduit_bin",
post("/_matrix/client/unstable/room_keys/version", data = "<body>") post("/_matrix/client/unstable/room_keys/version", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn create_backup_route( pub async fn create_backup_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<create_backup::Request>, body: Ruma<create_backup::Request>,
...@@ -35,6 +36,7 @@ pub async fn create_backup_route( ...@@ -35,6 +36,7 @@ pub async fn create_backup_route(
feature = "conduit_bin", feature = "conduit_bin",
put("/_matrix/client/unstable/room_keys/version/<_>", data = "<body>") put("/_matrix/client/unstable/room_keys/version/<_>", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn update_backup_route( pub async fn update_backup_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<update_backup::Request<'_>>, body: Ruma<update_backup::Request<'_>>,
...@@ -52,6 +54,7 @@ pub async fn update_backup_route( ...@@ -52,6 +54,7 @@ pub async fn update_backup_route(
feature = "conduit_bin", feature = "conduit_bin",
get("/_matrix/client/unstable/room_keys/version", data = "<body>") get("/_matrix/client/unstable/room_keys/version", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn get_latest_backup_route( pub async fn get_latest_backup_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<get_latest_backup::Request>, body: Ruma<get_latest_backup::Request>,
...@@ -79,6 +82,7 @@ pub async fn get_latest_backup_route( ...@@ -79,6 +82,7 @@ pub async fn get_latest_backup_route(
feature = "conduit_bin", feature = "conduit_bin",
get("/_matrix/client/unstable/room_keys/version/<_>", data = "<body>") get("/_matrix/client/unstable/room_keys/version/<_>", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn get_backup_route( pub async fn get_backup_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<get_backup::Request<'_>>, body: Ruma<get_backup::Request<'_>>,
...@@ -105,6 +109,7 @@ pub async fn get_backup_route( ...@@ -105,6 +109,7 @@ pub async fn get_backup_route(
feature = "conduit_bin", feature = "conduit_bin",
delete("/_matrix/client/unstable/room_keys/version/<_>", data = "<body>") delete("/_matrix/client/unstable/room_keys/version/<_>", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn delete_backup_route( pub async fn delete_backup_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<delete_backup::Request<'_>>, body: Ruma<delete_backup::Request<'_>>,
...@@ -123,6 +128,7 @@ pub async fn delete_backup_route( ...@@ -123,6 +128,7 @@ pub async fn delete_backup_route(
feature = "conduit_bin", feature = "conduit_bin",
put("/_matrix/client/unstable/room_keys/keys", data = "<body>") put("/_matrix/client/unstable/room_keys/keys", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn add_backup_keys_route( pub async fn add_backup_keys_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<add_backup_keys::Request<'_>>, body: Ruma<add_backup_keys::Request<'_>>,
...@@ -156,6 +162,7 @@ pub async fn add_backup_keys_route( ...@@ -156,6 +162,7 @@ pub async fn add_backup_keys_route(
feature = "conduit_bin", feature = "conduit_bin",
put("/_matrix/client/unstable/room_keys/keys/<_>", data = "<body>") put("/_matrix/client/unstable/room_keys/keys/<_>", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn add_backup_key_sessions_route( pub async fn add_backup_key_sessions_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<add_backup_key_sessions::Request<'_>>, body: Ruma<add_backup_key_sessions::Request<'_>>,
...@@ -187,6 +194,7 @@ pub async fn add_backup_key_sessions_route( ...@@ -187,6 +194,7 @@ pub async fn add_backup_key_sessions_route(
feature = "conduit_bin", feature = "conduit_bin",
put("/_matrix/client/unstable/room_keys/keys/<_>/<_>", data = "<body>") put("/_matrix/client/unstable/room_keys/keys/<_>/<_>", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn add_backup_key_session_route( pub async fn add_backup_key_session_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<add_backup_key_session::Request<'_>>, body: Ruma<add_backup_key_session::Request<'_>>,
...@@ -215,6 +223,7 @@ pub async fn add_backup_key_session_route( ...@@ -215,6 +223,7 @@ pub async fn add_backup_key_session_route(
feature = "conduit_bin", feature = "conduit_bin",
get("/_matrix/client/unstable/room_keys/keys", data = "<body>") get("/_matrix/client/unstable/room_keys/keys", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn get_backup_keys_route( pub async fn get_backup_keys_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<get_backup_keys::Request<'_>>, body: Ruma<get_backup_keys::Request<'_>>,
...@@ -230,6 +239,7 @@ pub async fn get_backup_keys_route( ...@@ -230,6 +239,7 @@ pub async fn get_backup_keys_route(
feature = "conduit_bin", feature = "conduit_bin",
get("/_matrix/client/unstable/room_keys/keys/<_>", data = "<body>") get("/_matrix/client/unstable/room_keys/keys/<_>", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn get_backup_key_sessions_route( pub async fn get_backup_key_sessions_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<get_backup_key_sessions::Request<'_>>, body: Ruma<get_backup_key_sessions::Request<'_>>,
...@@ -247,6 +257,7 @@ pub async fn get_backup_key_sessions_route( ...@@ -247,6 +257,7 @@ pub async fn get_backup_key_sessions_route(
feature = "conduit_bin", feature = "conduit_bin",
get("/_matrix/client/unstable/room_keys/keys/<_>/<_>", data = "<body>") get("/_matrix/client/unstable/room_keys/keys/<_>/<_>", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn get_backup_key_session_route( pub async fn get_backup_key_session_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<get_backup_key_session::Request<'_>>, body: Ruma<get_backup_key_session::Request<'_>>,
...@@ -270,6 +281,7 @@ pub async fn get_backup_key_session_route( ...@@ -270,6 +281,7 @@ pub async fn get_backup_key_session_route(
feature = "conduit_bin", feature = "conduit_bin",
delete("/_matrix/client/unstable/room_keys/keys", data = "<body>") delete("/_matrix/client/unstable/room_keys/keys", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn delete_backup_keys_route( pub async fn delete_backup_keys_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<delete_backup_keys::Request<'_>>, body: Ruma<delete_backup_keys::Request<'_>>,
...@@ -292,6 +304,7 @@ pub async fn delete_backup_keys_route( ...@@ -292,6 +304,7 @@ pub async fn delete_backup_keys_route(
feature = "conduit_bin", feature = "conduit_bin",
delete("/_matrix/client/unstable/room_keys/keys/<_>", data = "<body>") delete("/_matrix/client/unstable/room_keys/keys/<_>", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn delete_backup_key_sessions_route( pub async fn delete_backup_key_sessions_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<delete_backup_key_sessions::Request<'_>>, body: Ruma<delete_backup_key_sessions::Request<'_>>,
...@@ -314,6 +327,7 @@ pub async fn delete_backup_key_sessions_route( ...@@ -314,6 +327,7 @@ pub async fn delete_backup_key_sessions_route(
feature = "conduit_bin", feature = "conduit_bin",
delete("/_matrix/client/unstable/room_keys/keys/<_>/<_>", data = "<body>") delete("/_matrix/client/unstable/room_keys/keys/<_>/<_>", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn delete_backup_key_session_route( pub async fn delete_backup_key_session_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<delete_backup_key_session::Request<'_>>, body: Ruma<delete_backup_key_session::Request<'_>>,
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
/// ///
/// Get information on this server's supported feature set and other relevent capabilities. /// Get information on this server's supported feature set and other relevent capabilities.
#[cfg_attr(feature = "conduit_bin", get("/_matrix/client/r0/capabilities"))] #[cfg_attr(feature = "conduit_bin", get("/_matrix/client/r0/capabilities"))]
#[tracing::instrument]
pub async fn get_capabilities_route() -> ConduitResult<get_capabilities::Response> { pub async fn get_capabilities_route() -> ConduitResult<get_capabilities::Response> {
let mut available = BTreeMap::new(); let mut available = BTreeMap::new();
available.insert( available.insert(
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
feature = "conduit_bin", feature = "conduit_bin",
put("/_matrix/client/r0/user/<_>/account_data/<_>", data = "<body>") put("/_matrix/client/r0/user/<_>/account_data/<_>", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn set_global_account_data_route( pub async fn set_global_account_data_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<set_global_account_data::Request<'_>>, body: Ruma<set_global_account_data::Request<'_>>,
...@@ -49,6 +50,7 @@ pub async fn set_global_account_data_route( ...@@ -49,6 +50,7 @@ pub async fn set_global_account_data_route(
feature = "conduit_bin", feature = "conduit_bin",
get("/_matrix/client/r0/user/<_>/account_data/<_>", data = "<body>") get("/_matrix/client/r0/user/<_>/account_data/<_>", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn get_global_account_data_route( pub async fn get_global_account_data_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<get_global_account_data::Request<'_>>, body: Ruma<get_global_account_data::Request<'_>>,
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
feature = "conduit_bin", feature = "conduit_bin",
get("/_matrix/client/r0/rooms/<_>/context/<_>", data = "<body>") get("/_matrix/client/r0/rooms/<_>/context/<_>", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn get_context_route( pub async fn get_context_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<get_context::Request<'_>>, body: Ruma<get_context::Request<'_>>,
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
feature = "conduit_bin", feature = "conduit_bin",
get("/_matrix/client/r0/devices", data = "<body>") get("/_matrix/client/r0/devices", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn get_devices_route( pub async fn get_devices_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<get_devices::Request>, body: Ruma<get_devices::Request>,
...@@ -35,6 +36,7 @@ pub async fn get_devices_route( ...@@ -35,6 +36,7 @@ pub async fn get_devices_route(
feature = "conduit_bin", feature = "conduit_bin",
get("/_matrix/client/r0/devices/<_>", data = "<body>") get("/_matrix/client/r0/devices/<_>", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn get_device_route( pub async fn get_device_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<get_device::Request<'_>>, body: Ruma<get_device::Request<'_>>,
...@@ -53,6 +55,7 @@ pub async fn get_device_route( ...@@ -53,6 +55,7 @@ pub async fn get_device_route(
feature = "conduit_bin", feature = "conduit_bin",
put("/_matrix/client/r0/devices/<_>", data = "<body>") put("/_matrix/client/r0/devices/<_>", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn update_device_route( pub async fn update_device_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<update_device::Request<'_>>, body: Ruma<update_device::Request<'_>>,
...@@ -78,6 +81,7 @@ pub async fn update_device_route( ...@@ -78,6 +81,7 @@ pub async fn update_device_route(
feature = "conduit_bin", feature = "conduit_bin",
delete("/_matrix/client/r0/devices/<_>", data = "<body>") delete("/_matrix/client/r0/devices/<_>", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn delete_device_route( pub async fn delete_device_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<delete_device::Request<'_>>, body: Ruma<delete_device::Request<'_>>,
...@@ -126,6 +130,7 @@ pub async fn delete_device_route( ...@@ -126,6 +130,7 @@ pub async fn delete_device_route(
feature = "conduit_bin", feature = "conduit_bin",
post("/_matrix/client/r0/delete_devices", data = "<body>") post("/_matrix/client/r0/delete_devices", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn delete_devices_route( pub async fn delete_devices_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<delete_devices::Request<'_>>, body: Ruma<delete_devices::Request<'_>>,
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
EventType, EventType,
}, },
serde::Raw, serde::Raw,
ServerName, ServerName, UInt,
}; };
#[cfg(feature = "conduit_bin")] #[cfg(feature = "conduit_bin")]
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
feature = "conduit_bin", feature = "conduit_bin",
post("/_matrix/client/r0/publicRooms", data = "<body>") post("/_matrix/client/r0/publicRooms", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn get_public_rooms_filtered_route( pub async fn get_public_rooms_filtered_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<get_public_rooms_filtered::Request<'_>>, body: Ruma<get_public_rooms_filtered::Request<'_>>,
...@@ -50,6 +51,7 @@ pub async fn get_public_rooms_filtered_route( ...@@ -50,6 +51,7 @@ pub async fn get_public_rooms_filtered_route(
feature = "conduit_bin", feature = "conduit_bin",
get("/_matrix/client/r0/publicRooms", data = "<body>") get("/_matrix/client/r0/publicRooms", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn get_public_rooms_route( pub async fn get_public_rooms_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<get_public_rooms::Request<'_>>, body: Ruma<get_public_rooms::Request<'_>>,
...@@ -78,6 +80,7 @@ pub async fn get_public_rooms_route( ...@@ -78,6 +80,7 @@ pub async fn get_public_rooms_route(
feature = "conduit_bin", feature = "conduit_bin",
put("/_matrix/client/r0/directory/list/room/<_>", data = "<body>") put("/_matrix/client/r0/directory/list/room/<_>", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn set_room_visibility_route( pub async fn set_room_visibility_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<set_room_visibility::Request<'_>>, body: Ruma<set_room_visibility::Request<'_>>,
...@@ -107,6 +110,7 @@ pub async fn set_room_visibility_route( ...@@ -107,6 +110,7 @@ pub async fn set_room_visibility_route(
feature = "conduit_bin", feature = "conduit_bin",
get("/_matrix/client/r0/directory/list/room/<_>", data = "<body>") get("/_matrix/client/r0/directory/list/room/<_>", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn get_room_visibility_route( pub async fn get_room_visibility_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<get_room_visibility::Request<'_>>, body: Ruma<get_room_visibility::Request<'_>>,
...@@ -124,7 +128,7 @@ pub async fn get_room_visibility_route( ...@@ -124,7 +128,7 @@ pub async fn get_room_visibility_route(
pub async fn get_public_rooms_filtered_helper( pub async fn get_public_rooms_filtered_helper(
db: &Database, db: &Database,
server: Option<&ServerName>, server: Option<&ServerName>,
limit: Option<ruma::UInt>, limit: Option<UInt>,
since: Option<&str>, since: Option<&str>,
filter: &IncomingFilter, filter: &IncomingFilter,
_network: &IncomingRoomNetwork, _network: &IncomingRoomNetwork,
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
use rocket::{get, post}; use rocket::{get, post};
#[cfg_attr(feature = "conduit_bin", get("/_matrix/client/r0/user/<_>/filter/<_>"))] #[cfg_attr(feature = "conduit_bin", get("/_matrix/client/r0/user/<_>/filter/<_>"))]
#[tracing::instrument]
pub async fn get_filter_route() -> ConduitResult<get_filter::Response> { pub async fn get_filter_route() -> ConduitResult<get_filter::Response> {
// TODO // TODO
Ok(get_filter::Response::new(filter::IncomingFilterDefinition { Ok(get_filter::Response::new(filter::IncomingFilterDefinition {
...@@ -18,6 +19,7 @@ pub async fn get_filter_route() -> ConduitResult<get_filter::Response> { ...@@ -18,6 +19,7 @@ pub async fn get_filter_route() -> ConduitResult<get_filter::Response> {
} }
#[cfg_attr(feature = "conduit_bin", post("/_matrix/client/r0/user/<_>/filter"))] #[cfg_attr(feature = "conduit_bin", post("/_matrix/client/r0/user/<_>/filter"))]
#[tracing::instrument]
pub async fn create_filter_route() -> ConduitResult<create_filter::Response> { pub async fn create_filter_route() -> ConduitResult<create_filter::Response> {
// TODO // TODO
Ok(create_filter::Response::new(utils::random_string(10)).into()) Ok(create_filter::Response::new(utils::random_string(10)).into())
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
feature = "conduit_bin", feature = "conduit_bin",
post("/_matrix/client/r0/keys/upload", data = "<body>") post("/_matrix/client/r0/keys/upload", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn upload_keys_route( pub async fn upload_keys_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<upload_keys::Request>, body: Ruma<upload_keys::Request>,
...@@ -70,6 +71,7 @@ pub async fn upload_keys_route( ...@@ -70,6 +71,7 @@ pub async fn upload_keys_route(
feature = "conduit_bin", feature = "conduit_bin",
post("/_matrix/client/r0/keys/query", data = "<body>") post("/_matrix/client/r0/keys/query", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn get_keys_route( pub async fn get_keys_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<get_keys::Request<'_>>, body: Ruma<get_keys::Request<'_>>,
...@@ -150,6 +152,7 @@ pub async fn get_keys_route( ...@@ -150,6 +152,7 @@ pub async fn get_keys_route(
feature = "conduit_bin", feature = "conduit_bin",
post("/_matrix/client/r0/keys/claim", data = "<body>") post("/_matrix/client/r0/keys/claim", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn claim_keys_route( pub async fn claim_keys_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<claim_keys::Request>, body: Ruma<claim_keys::Request>,
...@@ -183,6 +186,7 @@ pub async fn claim_keys_route( ...@@ -183,6 +186,7 @@ pub async fn claim_keys_route(
feature = "conduit_bin", feature = "conduit_bin",
post("/_matrix/client/unstable/keys/device_signing/upload", data = "<body>") post("/_matrix/client/unstable/keys/device_signing/upload", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn upload_signing_keys_route( pub async fn upload_signing_keys_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<upload_signing_keys::Request<'_>>, body: Ruma<upload_signing_keys::Request<'_>>,
...@@ -240,6 +244,7 @@ pub async fn upload_signing_keys_route( ...@@ -240,6 +244,7 @@ pub async fn upload_signing_keys_route(
feature = "conduit_bin", feature = "conduit_bin",
post("/_matrix/client/unstable/keys/signatures/upload", data = "<body>") post("/_matrix/client/unstable/keys/signatures/upload", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn upload_signatures_route( pub async fn upload_signatures_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<upload_signatures::Request>, body: Ruma<upload_signatures::Request>,
...@@ -300,6 +305,7 @@ pub async fn upload_signatures_route( ...@@ -300,6 +305,7 @@ pub async fn upload_signatures_route(
feature = "conduit_bin", feature = "conduit_bin",
get("/_matrix/client/r0/keys/changes", data = "<body>") get("/_matrix/client/r0/keys/changes", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn get_key_changes_route( pub async fn get_key_changes_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<get_key_changes::Request<'_>>, body: Ruma<get_key_changes::Request<'_>>,
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
const MXC_LENGTH: usize = 32; const MXC_LENGTH: usize = 32;
#[cfg_attr(feature = "conduit_bin", get("/_matrix/media/r0/config"))] #[cfg_attr(feature = "conduit_bin", get("/_matrix/media/r0/config"))]
#[tracing::instrument(skip(db))]
pub async fn get_media_config_route( pub async fn get_media_config_route(
db: State<'_, Database>, db: State<'_, Database>,
) -> ConduitResult<get_media_config::Response> { ) -> ConduitResult<get_media_config::Response> {
...@@ -25,6 +26,7 @@ pub async fn get_media_config_route( ...@@ -25,6 +26,7 @@ pub async fn get_media_config_route(
feature = "conduit_bin", feature = "conduit_bin",
post("/_matrix/media/r0/upload", data = "<body>") post("/_matrix/media/r0/upload", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn create_content_route( pub async fn create_content_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<create_content::Request<'_>>, body: Ruma<create_content::Request<'_>>,
...@@ -54,6 +56,7 @@ pub async fn create_content_route( ...@@ -54,6 +56,7 @@ pub async fn create_content_route(
feature = "conduit_bin", feature = "conduit_bin",
get("/_matrix/media/r0/download/<_>/<_>", data = "<body>") get("/_matrix/media/r0/download/<_>/<_>", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn get_content_route( pub async fn get_content_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<get_content::Request<'_>>, body: Ruma<get_content::Request<'_>>,
...@@ -103,6 +106,7 @@ pub async fn get_content_route( ...@@ -103,6 +106,7 @@ pub async fn get_content_route(
feature = "conduit_bin", feature = "conduit_bin",
get("/_matrix/media/r0/thumbnail/<_>/<_>", data = "<body>") get("/_matrix/media/r0/thumbnail/<_>/<_>", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn get_content_thumbnail_route( pub async fn get_content_thumbnail_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<get_content_thumbnail::Request<'_>>, body: Ruma<get_content_thumbnail::Request<'_>>,
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
feature = "conduit_bin", feature = "conduit_bin",
post("/_matrix/client/r0/rooms/<_>/join", data = "<body>") post("/_matrix/client/r0/rooms/<_>/join", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn join_room_by_id_route( pub async fn join_room_by_id_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<join_room_by_id::Request<'_>>, body: Ruma<join_room_by_id::Request<'_>>,
...@@ -54,6 +55,7 @@ pub async fn join_room_by_id_route( ...@@ -54,6 +55,7 @@ pub async fn join_room_by_id_route(
feature = "conduit_bin", feature = "conduit_bin",
post("/_matrix/client/r0/join/<_>", data = "<body>") post("/_matrix/client/r0/join/<_>", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn join_room_by_id_or_alias_route( pub async fn join_room_by_id_or_alias_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<join_room_by_id_or_alias::Request<'_>>, body: Ruma<join_room_by_id_or_alias::Request<'_>>,
...@@ -88,6 +90,7 @@ pub async fn join_room_by_id_or_alias_route( ...@@ -88,6 +90,7 @@ pub async fn join_room_by_id_or_alias_route(
feature = "conduit_bin", feature = "conduit_bin",
post("/_matrix/client/r0/rooms/<_>/leave", data = "<body>") post("/_matrix/client/r0/rooms/<_>/leave", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn leave_room_route( pub async fn leave_room_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<leave_room::Request<'_>>, body: Ruma<leave_room::Request<'_>>,
...@@ -136,6 +139,7 @@ pub async fn leave_room_route( ...@@ -136,6 +139,7 @@ pub async fn leave_room_route(
feature = "conduit_bin", feature = "conduit_bin",
post("/_matrix/client/r0/rooms/<_>/invite", data = "<body>") post("/_matrix/client/r0/rooms/<_>/invite", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn invite_user_route( pub async fn invite_user_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<invite_user::Request<'_>>, body: Ruma<invite_user::Request<'_>>,
...@@ -175,6 +179,7 @@ pub async fn invite_user_route( ...@@ -175,6 +179,7 @@ pub async fn invite_user_route(
feature = "conduit_bin", feature = "conduit_bin",
post("/_matrix/client/r0/rooms/<_>/kick", data = "<body>") post("/_matrix/client/r0/rooms/<_>/kick", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn kick_user_route( pub async fn kick_user_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<kick_user::Request<'_>>, body: Ruma<kick_user::Request<'_>>,
...@@ -224,6 +229,7 @@ pub async fn kick_user_route( ...@@ -224,6 +229,7 @@ pub async fn kick_user_route(
feature = "conduit_bin", feature = "conduit_bin",
post("/_matrix/client/r0/rooms/<_>/ban", data = "<body>") post("/_matrix/client/r0/rooms/<_>/ban", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn ban_user_route( pub async fn ban_user_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<ban_user::Request<'_>>, body: Ruma<ban_user::Request<'_>>,
...@@ -280,6 +286,7 @@ pub async fn ban_user_route( ...@@ -280,6 +286,7 @@ pub async fn ban_user_route(
feature = "conduit_bin", feature = "conduit_bin",
post("/_matrix/client/r0/rooms/<_>/unban", data = "<body>") post("/_matrix/client/r0/rooms/<_>/unban", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn unban_user_route( pub async fn unban_user_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<unban_user::Request<'_>>, body: Ruma<unban_user::Request<'_>>,
...@@ -328,6 +335,7 @@ pub async fn unban_user_route( ...@@ -328,6 +335,7 @@ pub async fn unban_user_route(
feature = "conduit_bin", feature = "conduit_bin",
post("/_matrix/client/r0/rooms/<_>/forget", data = "<body>") post("/_matrix/client/r0/rooms/<_>/forget", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn forget_room_route( pub async fn forget_room_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<forget_room::Request<'_>>, body: Ruma<forget_room::Request<'_>>,
...@@ -345,6 +353,7 @@ pub async fn forget_room_route( ...@@ -345,6 +353,7 @@ pub async fn forget_room_route(
feature = "conduit_bin", feature = "conduit_bin",
get("/_matrix/client/r0/joined_rooms", data = "<body>") get("/_matrix/client/r0/joined_rooms", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn joined_rooms_route( pub async fn joined_rooms_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<joined_rooms::Request>, body: Ruma<joined_rooms::Request>,
...@@ -365,6 +374,7 @@ pub async fn joined_rooms_route( ...@@ -365,6 +374,7 @@ pub async fn joined_rooms_route(
feature = "conduit_bin", feature = "conduit_bin",
get("/_matrix/client/r0/rooms/<_>/members", data = "<body>") get("/_matrix/client/r0/rooms/<_>/members", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn get_member_events_route( pub async fn get_member_events_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<get_member_events::Request<'_>>, body: Ruma<get_member_events::Request<'_>>,
...@@ -394,6 +404,7 @@ pub async fn get_member_events_route( ...@@ -394,6 +404,7 @@ pub async fn get_member_events_route(
feature = "conduit_bin", feature = "conduit_bin",
get("/_matrix/client/r0/rooms/<_>/joined_members", data = "<body>") get("/_matrix/client/r0/rooms/<_>/joined_members", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn joined_members_route( pub async fn joined_members_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<joined_members::Request<'_>>, body: Ruma<joined_members::Request<'_>>,
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
feature = "conduit_bin", feature = "conduit_bin",
put("/_matrix/client/r0/rooms/<_>/send/<_>/<_>", data = "<body>") put("/_matrix/client/r0/rooms/<_>/send/<_>/<_>", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn send_message_event_route( pub async fn send_message_event_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<send_message_event::Request<'_>>, body: Ruma<send_message_event::Request<'_>>,
...@@ -87,6 +88,7 @@ pub async fn send_message_event_route( ...@@ -87,6 +88,7 @@ pub async fn send_message_event_route(
feature = "conduit_bin", feature = "conduit_bin",
get("/_matrix/client/r0/rooms/<_>/messages", data = "<body>") get("/_matrix/client/r0/rooms/<_>/messages", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn get_message_events_route( pub async fn get_message_events_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<get_message_events::Request<'_>>, body: Ruma<get_message_events::Request<'_>>,
......
...@@ -75,6 +75,7 @@ ...@@ -75,6 +75,7 @@
#[cfg(feature = "conduit_bin")] #[cfg(feature = "conduit_bin")]
#[options("/<_..>")] #[options("/<_..>")]
#[tracing::instrument]
pub async fn options_route() -> ConduitResult<send_event_to_device::Response> { pub async fn options_route() -> ConduitResult<send_event_to_device::Response> {
Ok(send_event_to_device::Response.into()) Ok(send_event_to_device::Response.into())
} }
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
feature = "conduit_bin", feature = "conduit_bin",
put("/_matrix/client/r0/presence/<_>/status", data = "<body>") put("/_matrix/client/r0/presence/<_>/status", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn set_presence_route( pub async fn set_presence_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<set_presence::Request<'_>>, body: Ruma<set_presence::Request<'_>>,
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
feature = "conduit_bin", feature = "conduit_bin",
put("/_matrix/client/r0/profile/<_>/displayname", data = "<body>") put("/_matrix/client/r0/profile/<_>/displayname", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn set_displayname_route( pub async fn set_displayname_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<set_display_name::Request<'_>>, body: Ruma<set_display_name::Request<'_>>,
...@@ -98,6 +99,7 @@ pub async fn set_displayname_route( ...@@ -98,6 +99,7 @@ pub async fn set_displayname_route(
feature = "conduit_bin", feature = "conduit_bin",
get("/_matrix/client/r0/profile/<_>/displayname", data = "<body>") get("/_matrix/client/r0/profile/<_>/displayname", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn get_displayname_route( pub async fn get_displayname_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<get_display_name::Request<'_>>, body: Ruma<get_display_name::Request<'_>>,
...@@ -112,6 +114,7 @@ pub async fn get_displayname_route( ...@@ -112,6 +114,7 @@ pub async fn get_displayname_route(
feature = "conduit_bin", feature = "conduit_bin",
put("/_matrix/client/r0/profile/<_>/avatar_url", data = "<body>") put("/_matrix/client/r0/profile/<_>/avatar_url", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn set_avatar_url_route( pub async fn set_avatar_url_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<set_avatar_url::Request<'_>>, body: Ruma<set_avatar_url::Request<'_>>,
...@@ -191,6 +194,7 @@ pub async fn set_avatar_url_route( ...@@ -191,6 +194,7 @@ pub async fn set_avatar_url_route(
feature = "conduit_bin", feature = "conduit_bin",
get("/_matrix/client/r0/profile/<_>/avatar_url", data = "<body>") get("/_matrix/client/r0/profile/<_>/avatar_url", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn get_avatar_url_route( pub async fn get_avatar_url_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<get_avatar_url::Request<'_>>, body: Ruma<get_avatar_url::Request<'_>>,
...@@ -205,6 +209,7 @@ pub async fn get_avatar_url_route( ...@@ -205,6 +209,7 @@ pub async fn get_avatar_url_route(
feature = "conduit_bin", feature = "conduit_bin",
get("/_matrix/client/r0/profile/<_>", data = "<body>") get("/_matrix/client/r0/profile/<_>", data = "<body>")
)] )]
#[tracing::instrument(skip(db, body))]
pub async fn get_profile_route( pub async fn get_profile_route(
db: State<'_, Database>, db: State<'_, Database>,
body: Ruma<get_profile::Request<'_>>, body: Ruma<get_profile::Request<'_>>,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment