Fix issue #124
authorGian Sass <gian.sass@outlook.de>
Wed, 11 Apr 2018 18:55:49 +0000 (14:55 -0400)
committerGian Sass <gian.sass@outlook.de>
Wed, 11 Apr 2018 18:55:49 +0000 (14:55 -0400)
lib/pleroma/web/mastodon_api/mastodon_api_controller.ex

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