Implement exclude_reblogs and include_rts
This commit is contained in:
parent
92b114499f
commit
e4562105e7
5 changed files with 74 additions and 0 deletions
|
|
@ -130,6 +130,15 @@ defmodule Pleroma.Web.TwitterAPI.Controller do
|
|||
def user_timeline(%{assigns: %{user: user}} = conn, params) do
|
||||
case TwitterAPI.get_user(user, params) do
|
||||
{:ok, target_user} ->
|
||||
# Twitter and ActivityPub use a different name and sense for this parameter.
|
||||
{include_rts, params} = Map.pop(params, "include_rts")
|
||||
|
||||
params =
|
||||
case include_rts do
|
||||
x when x == "false" or x == "0" -> Map.put(params, "exclude_reblogs", "true")
|
||||
_ -> params
|
||||
end
|
||||
|
||||
activities = ActivityPub.fetch_user_activities(target_user, user, params)
|
||||
|
||||
conn
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue