MastoAPI: fix dm_timeline getting non-create activities.
authoreal <eal@waifu.club>
Wed, 30 May 2018 12:02:22 +0000 (15:02 +0300)
committereal <eal@waifu.club>
Wed, 30 May 2018 12:02:22 +0000 (15:02 +0300)
lib/pleroma/web/mastodon_api/mastodon_api_controller.ex

index e89186ae360101ee84224ab8221927de052be525..64a8a66f76b57204041d1923bcbd4e64265b54cf 100644 (file)
@@ -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