Pleroma API: `emoji_reactions_by` does not need authorization
authorlain <lain@soykaf.club>
Mon, 20 Jan 2020 12:05:35 +0000 (13:05 +0100)
committerlain <lain@soykaf.club>
Mon, 20 Jan 2020 12:05:35 +0000 (13:05 +0100)
lib/pleroma/web/pleroma_api/controllers/pleroma_api_controller.ex
test/web/pleroma_api/controllers/pleroma_api_controller_test.exs

index 772c535a498d0a79b236415c8f11b324dd78d7ad..3285dc11b7a4e238125e7503eea94806ee55e9f0 100644 (file)
@@ -23,7 +23,7 @@ defmodule Pleroma.Web.PleromaAPI.PleromaAPIController do
   plug(
     OAuthScopesPlug,
     %{scopes: ["read:statuses"]}
-    when action in [:conversation, :conversation_statuses, :emoji_reactions_by]
+    when action in [:conversation, :conversation_statuses]
   )
 
   plug(
index 3f7ef13bca36647ad9a729478b30916b4adc772a..fb75001348ab62306bba4b4fd2ef1aac20c52059 100644 (file)
@@ -57,11 +57,6 @@ defmodule Pleroma.Web.PleromaAPI.PleromaAPIControllerTest do
 
     {:ok, activity} = CommonAPI.post(user, %{"status" => "#cofe"})
 
-    conn =
-      conn
-      |> assign(:user, user)
-      |> assign(:token, insert(:oauth_token, user: user, scopes: ["read:statuses"]))
-
     result =
       conn
       |> get("/api/v1/pleroma/statuses/#{activity.id}/emoji_reactions_by")