Merge branch 'rate-limit-ap-routes' into 'develop'
[akkoma] / lib / pleroma / web / twitter_api / views / notification_view.ex
index d6a1c0a4d78e07a94446fed04744d6b8407944bb..085cd5aa3a64f8f8d9f73466a56a79e5eb9a7468 100644 (file)
@@ -4,10 +4,13 @@
 
 defmodule Pleroma.Web.TwitterAPI.NotificationView do
   use Pleroma.Web, :view
-  alias Pleroma.{Notification, User}
+  alias Pleroma.Notification
+  alias Pleroma.User
   alias Pleroma.Web.CommonAPI.Utils
-  alias Pleroma.Web.TwitterAPI.UserView
   alias Pleroma.Web.TwitterAPI.ActivityView
+  alias Pleroma.Web.TwitterAPI.UserView
+
+  require Pleroma.Constants
 
   defp get_user(ap_id, opts) do
     cond do
@@ -17,7 +20,7 @@ defmodule Pleroma.Web.TwitterAPI.NotificationView do
       String.ends_with?(ap_id, "/followers") ->
         nil
 
-      ap_id == "https://www.w3.org/ns/activitystreams#Public" ->
+      ap_id == Pleroma.Constants.as_public() ->
         nil
 
       true ->