From 0095a66198f322da72d5968c1565dc396345528b Mon Sep 17 00:00:00 2001 From: Ekaterina Vaartis Date: Wed, 4 Nov 2026 19:19:05 +0300 Subject: [PATCH] Use limit and offset directly, otherwise the amount is wrong It will return less than 50 for some reason --- lib/pleroma/upload.ex | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/pleroma/upload.ex b/lib/pleroma/upload.ex index a557d71fa..11b18cd4e 100644 --- a/lib/pleroma/upload.ex +++ b/lib/pleroma/upload.ex @@ -343,8 +343,7 @@ defmodule Pleroma.Upload do where: fragment("(?)->>'type' = ?", obj.data, "Document") and fragment("(?)->>'actor' = ?", obj.data, ^user.ap_id), - order_by: [desc: obj.id] - ) - |> Pagination.fetch_paginated(%{"offset" => offset, "limit" => limit}, :offset) + order_by: [desc: obj.id], limit: ^limit, offset: ^offset + ) |> Repo.all() end end