Add a link to author's profile on article card

Use a macro to render those cards too
This commit is contained in:
Bat
2018-05-13 18:19:23 +01:00
parent 5e7d513a7e
commit 91b19bccb5
8 changed files with 36 additions and 19 deletions
+5 -1
View File
@@ -227,7 +227,11 @@ impl User {
}
pub fn get_fqn(&self, conn: &PgConnection) -> String {
format!("{}@{}", self.username, self.get_instance(conn).public_domain)
if self.instance_id == Instance::local_id(conn) {
self.username.clone()
} else {
format!("{}@{}", self.username, self.get_instance(conn).public_domain)
}
}
pub fn get_followers(&self, conn: &PgConnection) -> Vec<User> {