From e8dd15f8bd4bd7ccfc19b9b4401eb611aca2f2e3 Mon Sep 17 00:00:00 2001 From: alemi Date: Mon, 22 Apr 2024 00:16:40 +0200 Subject: [PATCH] fix: also context gives full objects would clear local cached image oof --- src/routes/activitypub/context.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/routes/activitypub/context.rs b/src/routes/activitypub/context.rs index 951b40ae..7ae98d82 100644 --- a/src/routes/activitypub/context.rs +++ b/src/routes/activitypub/context.rs @@ -51,14 +51,15 @@ pub async fn page( .all(ctx.db()) .await?; + let mut out = Vec::new(); + for item in items { + out.push(item.ap_filled(ctx.db()).await?); + } + Ok(JsonLD( ctx.ap_collection_page( &url!(ctx, "/context/{id}/page"), - offset, limit, - items - .into_iter() - .map(|x| x.object.ap()) - .collect() + offset, limit, out, ).ld_context() )) }