X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Factivity_pub%2Factivity_pub.ex;h=4f7be4293332cb09bc75e86e337fe8a1589e7d62;hb=ed1eb5deea35ff2c3487ef550fad3a543a80cb32;hp=a62be2511767d3057568572db19059966cd349bf;hpb=867ac1e4f5b1a5b994b57a73bed36710100f9cf8;p=akkoma diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index a62be2511..4f7be4293 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -158,7 +158,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do # Only search through last 100_000 activities by default defp restrict_recent(query, _) do - since = Repo.aggregate(Activity, :max, :id) - 100_000 + since = (Repo.aggregate(Activity, :max, :id) || 0) - 100_000 from activity in query, where: activity.id > ^since