From e3831650caf9d2f7cdb772ca8fa4c5070710b4ef Mon Sep 17 00:00:00 2001 From: alemi Date: Wed, 29 May 2024 21:37:21 +0200 Subject: [PATCH] feat: add frontend url to users --- src/routes/activitypub/user/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/routes/activitypub/user/mod.rs b/src/routes/activitypub/user/mod.rs index 7cef50ac..4dfac26d 100644 --- a/src/routes/activitypub/user/mod.rs +++ b/src/routes/activitypub/user/mod.rs @@ -70,6 +70,10 @@ pub async fn view( user = user.set_following_count(None); } + if let Some(ref fe) = ctx.cfg().instance.frontend { + user = user.set_url(Node::link(format!("{fe}/actors/{id}"))); + } + Ok(JsonLD(user.ld_context())) }, // remote user