1
0
Fork 0
forked from alemi/upub

fix: show outbox for remote users with url trick

This commit is contained in:
əlemi 2024-04-16 08:04:08 +02:00
parent 964b45e50b
commit dab4550d08
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -19,7 +19,11 @@ pub async fn page(
Query(page): Query<Pagination>,
AuthIdentity(auth): AuthIdentity,
) -> Result<JsonLD<serde_json::Value>, 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);