Commit 9c61f605 authored by Hakaba Hitoyo's avatar Hakaba Hitoyo

introduce max_id parameter in feed.atom

parent f0cde24f
......@@ -25,6 +25,7 @@ defmodule Pleroma.Web.OStatus.OStatusController do
order_by: [desc: :id]
activities = query
|> restrict_max(opts)
|> Repo.all
response = user
......@@ -54,6 +55,11 @@ defmodule Pleroma.Web.OStatus.OStatusController do
end
end
defp restrict_max(query, %{"max_id" => max_id}) do
from activity in query, where: activity.id < ^max_id
end
defp restrict_max(query, _), do: query
def salmon_incoming(conn, _) do
{:ok, body, _conn} = read_body(conn)
{:ok, doc} = decode_or_retry(body)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment