From dab4550d08efecb2ef3783d54c62be8ec2ca23e6 Mon Sep 17 00:00:00 2001 From: alemi Date: Tue, 16 Apr 2024 08:04:08 +0200 Subject: [PATCH] fix: show outbox for remote users with url trick --- src/routes/activitypub/user/outbox.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/routes/activitypub/user/outbox.rs b/src/routes/activitypub/user/outbox.rs index 396553c..e102d8e 100644 --- a/src/routes/activitypub/user/outbox.rs +++ b/src/routes/activitypub/user/outbox.rs @@ -19,7 +19,11 @@ pub async fn page( Query(page): Query, AuthIdentity(auth): AuthIdentity, ) -> Result, StatusCode> { - let uid = ctx.uid(id.clone()); + let uid = if id.starts_with('+') { + format!("https://{}", id.replacen('+', "", 1).replace('@', "/")) + } else { + ctx.uid(id.clone()) + }; let limit = page.batch.unwrap_or(20).min(50); let offset = page.offset.unwrap_or(0);