From 7cb2e2971e8d348e9c808455e2e4c262e09da806 Mon Sep 17 00:00:00 2001 From: eal Date: Wed, 30 May 2018 15:02:22 +0300 Subject: [PATCH] MastoAPI: fix dm_timeline getting non-create activities. --- lib/pleroma/web/mastodon_api/mastodon_api_controller.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex index e89186ae3..64a8a66f7 100644 --- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex +++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex @@ -241,7 +241,9 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do end def dm_timeline(%{assigns: %{user: user}} = conn, params) do - query = ActivityPub.fetch_activities_query([user.ap_id], %{visibility: "direct"}) + query = + ActivityPub.fetch_activities_query([user.ap_id], %{"type" => "Create", visibility: "direct"}) + activities = Repo.all(query) conn -- 2.45.2