From dfec7155949f35975aa95c6d524318a6c014c384 Mon Sep 17 00:00:00 2001 From: alemi Date: Mon, 22 Apr 2024 01:01:42 +0200 Subject: [PATCH] chore: comments, clearer code --- src/routes/activitypub/context.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/routes/activitypub/context.rs b/src/routes/activitypub/context.rs index 7ae98d82..37098055 100644 --- a/src/routes/activitypub/context.rs +++ b/src/routes/activitypub/context.rs @@ -33,7 +33,7 @@ pub async fn page( let offset = page.offset.unwrap_or(0); let context = if id.starts_with('+') { - format!("https://{}", id.replacen('+', "", 1).replace('@', "/")) + id.replacen('+', "https://", 1).replace('@', "/") } else if id.starts_with("tag:") { id.clone() } else { @@ -43,7 +43,6 @@ pub async fn page( let items = model::addressing::Entity::find_objects() .filter(auth.filter_condition()) .filter(model::object::Column::Context.eq(context)) - // TODO also limit to only local activities .order_by(model::addressing::Column::Published, Order::Desc) .limit(limit) .offset(offset)