projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' into global-status-expiration
[akkoma]
/
lib
/
pleroma
/
web
/
activity_pub
/
mrf
/
object_age_policy.ex
diff --git
a/lib/pleroma/web/activity_pub/mrf/object_age_policy.ex
b/lib/pleroma/web/activity_pub/mrf/object_age_policy.ex
index f6c6f31cb7e531606b8d6e715a9f59f6a94b7486..4a8bc91ae1ff6d80a6f2c1663bd717e19e7f1922 100644
(file)
--- a/
lib/pleroma/web/activity_pub/mrf/object_age_policy.ex
+++ b/
lib/pleroma/web/activity_pub/mrf/object_age_policy.ex
@@
-1,17
+1,15
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-20
19
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-20
20
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
# 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"
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(),
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.
{:ok, message}
else
# Unhandleable error: somebody is messing around, just drop the message.
- e ->
- Logger.error("ERROR: #{inspect(e)}")
+ _e ->
{:reject, nil}
end
else
{:reject, nil}
end
else