Merge branch 'main' into timeline-order

This commit is contained in:
KitaitiMakoto
2022-05-05 19:11:30 +00:00
7 changed files with 394 additions and 184 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ migrations_internals= "1.4.0"
openssl = "0.10.40"
rocket = "0.4.6"
rocket_i18n = "0.4.1"
reqwest = "0.9"
reqwest = "0.11.10"
scheduled-thread-pool = "0.2.2"
serde = "1.0"
serde_derive = "1.0"
+4 -4
View File
@@ -243,7 +243,7 @@ impl User {
}
fn fetch(url: &str) -> Result<CustomPerson> {
let mut res = get(url, Self::get_sender(), CONFIG.proxy().cloned())?;
let res = get(url, Self::get_sender(), CONFIG.proxy().cloned())?;
let text = &res.text()?;
// without this workaround, publicKey is not correctly deserialized
let ap_sign = serde_json::from_str::<ApSignature>(text)?;
@@ -482,7 +482,7 @@ impl User {
Ok(coll)
}
fn fetch_outbox_page<T: Activity>(&self, url: &str) -> Result<(Vec<T>, Option<String>)> {
let mut res = get(url, Self::get_sender(), CONFIG.proxy().cloned())?;
let res = get(url, Self::get_sender(), CONFIG.proxy().cloned())?;
let text = &res.text()?;
let json: serde_json::Value = serde_json::from_str(text)?;
let items = json["items"]
@@ -496,7 +496,7 @@ impl User {
Ok((items, next))
}
pub fn fetch_outbox<T: Activity>(&self) -> Result<Vec<T>> {
let mut res = get(
let res = get(
&self.outbox_url[..],
Self::get_sender(),
CONFIG.proxy().cloned(),
@@ -532,7 +532,7 @@ impl User {
}
pub fn fetch_followers_ids(&self) -> Result<Vec<String>> {
let mut res = get(
let res = get(
&self.followers_endpoint[..],
Self::get_sender(),
CONFIG.proxy().cloned(),