Refactor User.post_register_action/1 emails
[akkoma] / lib / pleroma / web / pleroma_api / controllers / emoji_reaction_controller.ex
index 19dcffdf344f72210c5424468304f4bd09de1585..7f9254c135dc7e8f80d88f6366ac81c9a342d0c5 100644 (file)
@@ -25,7 +25,8 @@ defmodule Pleroma.Web.PleromaAPI.EmojiReactionController do
   action_fallback(Pleroma.Web.MastodonAPI.FallbackController)
 
   def index(%{assigns: %{user: user}} = conn, %{id: activity_id} = params) do
-    with %Activity{} = activity <- Activity.get_by_id_with_object(activity_id),
+    with true <- Pleroma.Config.get([:instance, :show_reactions]),
+         %Activity{} = activity <- Activity.get_by_id_with_object(activity_id),
          %Object{data: %{"reactions" => reactions}} when is_list(reactions) <-
            Object.normalize(activity) do
       reactions = filter(reactions, params)