Get rid of unsafe variables.

This commit is contained in:
eal 2018-05-06 09:58:59 +03:00
commit bfad57c7c9
5 changed files with 50 additions and 35 deletions

View file

@ -212,14 +212,14 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
|> Map.put("actor_id", ap_id)
|> Map.put("whole_db", true)
if params["pinned"] == "true" do
# Since Pleroma has no "pinned" posts feature, we'll just set an empty list here
activities = []
else
activities =
activities =
if params["pinned"] == "true" do
# Since Pleroma has no "pinned" posts feature, we'll just set an empty list here
[]
else
ActivityPub.fetch_public_activities(params)
|> Enum.reverse()
end
end
conn
|> add_link_headers(:user_statuses, activities, params["id"])