Remove PgConnection when we don't need it

Massive simplification in the ActivityPub module!
This commit is contained in:
Bat
2018-06-21 16:31:42 +01:00
parent 7ddad12420
commit 2217ec0d56
10 changed files with 17 additions and 20 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ impl Follow {
let mut accept = Accept::default();
accept.accept_props.set_actor_link::<Id>(from.clone().into_id()).unwrap();
accept.accept_props.set_object_object(follow).unwrap();
broadcast(conn, &*from, accept, vec![target.clone()]);
broadcast(&*from, accept, vec![target.clone()]);
res
}
}
+1 -1
View File
@@ -401,7 +401,7 @@ impl APActor for User {
fn custom_props(&self, conn: &PgConnection) -> serde_json::Map<String, serde_json::Value> {
let mut res = serde_json::Map::new();
res.insert("publicKey".to_string(), json!({
"id": self.get_key_id(conn),
"id": self.get_key_id(),
"owner": self.ap_url,
"publicKeyPem": self.public_key
}));