diff options
author | lambda <pleromagit@rogerbraun.net> | 2018-05-06 18:41:46 +0000 |
---|---|---|
committer | lambda <pleromagit@rogerbraun.net> | 2018-05-06 18:41:46 +0000 |
commit | 2b708f76e05b4ece7a189d5c74adaf252c2e8b97 (patch) | |
tree | 3dfd38f379dfddced3c8887439a1f5d9cb5210f6 /lib/pleroma/web/mastodon_api/mastodon_api_controller.ex | |
parent | 1e83727fdd61de05d734e8395996cb695c4b1e15 (diff) | |
parent | bfad57c7c975cdd455e165ee50001b202952564f (diff) | |
download | pleroma-2b708f76e05b4ece7a189d5c74adaf252c2e8b97.tar.gz |
Merge branch 'fix/unsafe-variables' into 'develop'
Get rid of unsafe variables.
See merge request pleroma/pleroma!145
Diffstat (limited to 'lib/pleroma/web/mastodon_api/mastodon_api_controller.ex')
-rw-r--r-- | lib/pleroma/web/mastodon_api/mastodon_api_controller.ex | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex index b77c9fc02..9f4261143 100644 --- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex +++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex @@ -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"]) |