- # Only search through last 100_000 activities by default
- defp restrict_recent(query, %{"whole_db" => true}), do: query
-
- defp restrict_recent(query, _) do
- since = (Repo.aggregate(Activity, :max, :id) || 0) - 100_000
-
- from(activity in query, where: activity.id > ^since)
+ defp restrict_reblogs(query, %{"exclude_reblogs" => val}) when val == "true" or val == "1" do
+ from(activity in query, where: fragment("?->>'type' != 'Announce'", activity.data))