Require that ephemeral posts live for at least one hour
If we didn't put some kind of lifetime requirement on these, I guess you could annoy people by sending large numbers of ephemeral posts that provoke notifications but then disappear before anyone can read them.
This commit is contained in:
parent
704960b3c1
commit
36012ef6c1
4 changed files with 37 additions and 3 deletions
|
|
@ -18,4 +18,10 @@ defmodule Pleroma.ActivityExpirationTest do
|
|||
assert length(expirations) == 1
|
||||
assert hd(expirations) == expiration_due
|
||||
end
|
||||
|
||||
test "denies expirations that don't live long enough" do
|
||||
activity = insert(:note_activity)
|
||||
now = NaiveDateTime.utc_now()
|
||||
assert {:error, _} = ActivityExpiration.create(activity, now)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue