Merge branch 'bugfix/pleroma_conversation_api' into 'develop'
[akkoma] / lib / pleroma / web / feed / user_controller.ex
index e5d8427ce41abdd11b7a0a43ddd9473e9132bfbd..59aabb5498ead8314ca3bb44fd495fcc5ef38403 100644 (file)
@@ -1,5 +1,5 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
 # SPDX-License-Identifier: AGPL-3.0-only
 
 defmodule Pleroma.Web.Feed.UserController do
@@ -11,6 +11,8 @@ defmodule Pleroma.Web.Feed.UserController do
   alias Pleroma.Web.ActivityPub.ActivityPubController
   alias Pleroma.Web.Feed.FeedView
 
+  import Pleroma.Web.ControllerHelper, only: [put_in_if_exist: 3]
+
   plug(Pleroma.Plugs.SetFormatPlug when action in [:feed_redirect])
 
   action_fallback(:errors)
@@ -37,10 +39,9 @@ defmodule Pleroma.Web.Feed.UserController do
       activities =
         %{
           "type" => ["Create"],
-          "whole_db" => true,
           "actor_id" => user.ap_id
         }
-        |> Map.merge(Map.take(params, ["max_id"]))
+        |> put_in_if_exist("max_id", params["max_id"])
         |> ActivityPub.fetch_public_activities()
 
       conn