Pass expires_in param from status controller
authorRoman Chvanikov <chvanikoff@pm.me>
Tue, 8 Sep 2020 12:26:06 +0000 (15:26 +0300)
committerRoman Chvanikov <chvanikoff@pm.me>
Tue, 8 Sep 2020 12:26:06 +0000 (15:26 +0300)
lib/pleroma/web/mastodon_api/controllers/status_controller.ex

index ecfa38489837eadae7b299324fb6ebe8cf60dbc2..da14c0b6c33a6965b9b2187bee37eafd12e15bf4 100644 (file)
@@ -285,9 +285,9 @@ defmodule Pleroma.Web.MastodonAPI.StatusController do
   end
 
   @doc "POST /api/v1/statuses/:id/mute"
-  def mute_conversation(%{assigns: %{user: user}} = conn, %{id: id}) do
+  def mute_conversation(%{assigns: %{user: user}, body_params: params} = conn, %{id: id}) do
     with %Activity{} = activity <- Activity.get_by_id(id),
-         {:ok, activity} <- CommonAPI.add_mute(user, activity) do
+         {:ok, activity} <- CommonAPI.add_mute(user, activity, params) do
       try_render(conn, "show.json", activity: activity, for: user, as: :activity)
     end
   end