TwitterAPI: Fix some bugz.
authorlain <lain@soykaf.club>
Wed, 21 Feb 2018 07:16:04 +0000 (08:16 +0100)
committerlain <lain@soykaf.club>
Wed, 21 Feb 2018 07:16:04 +0000 (08:16 +0100)
lib/pleroma/web/twitter_api/twitter_api.ex

index a8bdbe716fc289dc908fee86319937d049008c66..80c4ec1929b090a44595985f23f019429cc73acd 100644 (file)
@@ -16,7 +16,7 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPI do
     opts = opts
     |> Map.put("blocking_user", user)
     |> Map.put("user", user)
-    |> Map.put("type", ["Create", "Announce", "Follow"])
+    |> Map.put("type", ["Create", "Announce", "Follow", "Like"])
 
     ActivityPub.fetch_activities([user.ap_id | user.following], opts)
     |> activities_to_statuses(%{for: user})
@@ -42,8 +42,9 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPI do
   end
 
   def fetch_user_statuses(user, opts \\ %{}) do
-    ActivityPub.fetch_activities([], opts)
+    opts = opts
     |> Map.put("type", ["Create", "Announce", "Follow"])
+    ActivityPub.fetch_activities([], opts)
     |> activities_to_statuses(%{for: user})
   end