Make it possible to display remote blogs

This commit is contained in:
Bat
2018-05-13 18:00:47 +01:00
parent fdc481e384
commit 5e7d513a7e
4 changed files with 79 additions and 9 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ fn webfinger(query: WebfingerQuery, conn: DbConn) -> Content<Result<String, &'st
if res_dom == BASE_URL.as_str() {
let res = match User::find_local(&*conn, String::from(user)) {
Some(usr) => Ok(usr.webfinger(&*conn)),
None => match Blog::find_by_actor_id(&*conn, String::from(user)) {
None => match Blog::find_local(&*conn, String::from(user)) {
Some(blog) => Ok(blog.webfinger(&*conn)),
None => Err("Requested actor not found")
}