feat: /keys/query and /keys/claim over federation

This commit is contained in:
Timo Kösters 2021-07-20 19:40:25 +02:00
parent 7d14a46607
commit 728e176a06
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
2 changed files with 79 additions and 14 deletions

View file

@ -2461,7 +2461,8 @@ pub async fn get_keys_route(
&body.device_keys,
|u| Some(u.server_name()) == body.sender_servername.as_deref(),
&db,
)?;
)
.await?;
db.flush().await?;
@ -2486,7 +2487,7 @@ pub async fn claim_keys_route(
return Err(Error::bad_config("Federation is disabled."));
}
let result = claim_keys_helper(&body.one_time_keys, &db)?;
let result = claim_keys_helper(&body.one_time_keys, &db).await?;
db.flush().await?;