From 15477875da6b43643ef479f0576995c9285e2abd Mon Sep 17 00:00:00 2001 From: Bat Date: Thu, 26 Jul 2018 16:19:21 +0200 Subject: [PATCH] Fix links for post from remote blogs --- plume-models/src/posts.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plume-models/src/posts.rs b/plume-models/src/posts.rs index d090974..947f774 100644 --- a/plume-models/src/posts.rs +++ b/plume-models/src/posts.rs @@ -206,14 +206,14 @@ impl Post { json!({ "post": self, "author": self.get_authors(conn)[0].to_json(conn), - "url": format!("/~/{}/{}/", blog.actor_id, self.slug), + "url": format!("/~/{}/{}/", blog.get_fqn(conn), self.slug), "date": self.creation_date.timestamp(), "blog": blog.to_json(conn) }) } pub fn compute_id(&self, conn: &PgConnection) -> String { - ap_url(format!("{}/~/{}/{}/", BASE_URL.as_str(), self.get_blog(conn).actor_id, self.slug)) + ap_url(format!("{}/~/{}/{}/", BASE_URL.as_str(), self.get_blog(conn).get_fqn(conn), self.slug)) } }