Merge branch 'develop' into global-status-expiration
[akkoma] / lib / pleroma / web / activity_pub / mrf / object_age_policy.ex
index f6c6f31cb7e531606b8d6e715a9f59f6a94b7486..4a8bc91ae1ff6d80a6f2c1663bd717e19e7f1922 100644 (file)
@@ -1,17 +1,15 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
 # SPDX-License-Identifier: AGPL-3.0-only
 
 defmodule Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy do
   alias Pleroma.Config
   alias Pleroma.User
-  alias Pleroma.Web.ActivityPub.MRF
 
-  require Logger
   require Pleroma.Constants
 
   @moduledoc "Filter activities depending on their age"
-  @behaviour MRF
+  @behaviour Pleroma.Web.ActivityPub.MRF
 
   defp check_date(%{"published" => published} = message) do
     with %DateTime{} = now <- DateTime.utc_now(),
@@ -50,8 +48,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy do
         {:ok, message}
       else
         # Unhandleable error: somebody is messing around, just drop the message.
-        e ->
-          Logger.error("ERROR: #{inspect(e)}")
+        _e ->
           {:reject, nil}
       end
     else