From 907df9b8eda1951a70fbec3adb68029b367932a0 Mon Sep 17 00:00:00 2001 From: Gian Sass Date: Wed, 11 Apr 2018 14:55:49 -0400 Subject: [PATCH] Fix issue #124 --- lib/pleroma/web/mastodon_api/mastodon_api_controller.ex | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex index 21b99f919..21a3660c8 100644 --- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex +++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex @@ -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"])