Move ActivityExpiration creation from CommonApi.post/2 to ActivityPub.insert/4
[akkoma] / lib / pleroma / web / activity_pub / mrf / anti_link_spam_policy.ex
index d2738659101d2140399ccfb3c5ae1f0e4cb868d8..8abe18e29530db74d58b4d9766c209d4026b4109 100644 (file)
@@ -11,7 +11,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.AntiLinkSpamPolicy do
 
   # has the user successfully posted before?
   defp old_user?(%User{} = u) do
-    u.info.note_count > 0 || u.info.follower_count > 0
+    u.note_count > 0 || u.follower_count > 0
   end
 
   # does the post contain links?
@@ -50,5 +50,5 @@ defmodule Pleroma.Web.ActivityPub.MRF.AntiLinkSpamPolicy do
   def filter(message), do: {:ok, message}
 
   @impl true
-  def describe(), do: {:ok, %{}}
+  def describe, do: {:ok, %{}}
 end