Avoid calling compute_id when we shouldn't

It should only be used at initialization, after we should prefer ap_url,
as not everybody is using the same URLs as Plume.
This commit is contained in:
Bat
2018-06-21 15:48:54 +01:00
parent 514689cfc1
commit 5457a80eec
7 changed files with 20 additions and 20 deletions
+1 -1
View File
@@ -206,7 +206,7 @@ fn inbox(name: String, conn: DbConn, data: String) -> String {
#[get("/@/<name>/followers", format = "application/activity+json")]
fn ap_followers(name: String, conn: DbConn) -> ActivityPub {
let user = User::find_local(&*conn, name).unwrap();
let followers = user.get_followers(&*conn).into_iter().map(|f| f.compute_id(&*conn)).collect::<Vec<String>>();
let followers = user.get_followers(&*conn).into_iter().map(|f| f.ap_url).collect::<Vec<String>>();
let json = json!({
"@context": context(),