diff options
author | Mark Felder <feld@feld.me> | 2024-09-06 11:27:07 -0400 |
---|---|---|
committer | Mark Felder <feld@feld.me> | 2024-09-06 11:27:07 -0400 |
commit | 06ce5e3b43b4a6809397bdb0eb192a82e7243e93 (patch) | |
tree | 38b0352f6255b1b1722d0646088c97621369138d | |
parent | 1d0e3b1355c5a5883be1522f0f925c398c0e87a4 (diff) | |
download | pleroma-06ce5e3b43b4a6809397bdb0eb192a82e7243e93.tar.gz pleroma-06ce5e3b43b4a6809397bdb0eb192a82e7243e93.zip |
Dialyzer: pattern_match The pattern can never match the type {:diff, false}.
-rw-r--r-- | lib/pleroma/user/backup.ex | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/pleroma/user/backup.ex b/lib/pleroma/user/backup.ex index c5038c8f4..d77d49890 100644 --- a/lib/pleroma/user/backup.ex +++ b/lib/pleroma/user/backup.ex @@ -118,14 +118,13 @@ defmodule Pleroma.User.Backup do end defp permitted?(user) do - with {_, %__MODULE__{inserted_at: inserted_at}} <- {:last, get_last(user)}, - days = Config.get([__MODULE__, :limit_days]), - diff = Timex.diff(NaiveDateTime.utc_now(), inserted_at, :days), - {_, true} <- {:diff, diff > days} do - true + with {_, %__MODULE__{inserted_at: inserted_at}} <- {:last, get_last(user)} do + days = Config.get([__MODULE__, :limit_days]) + diff = Timex.diff(NaiveDateTime.utc_now(), inserted_at, :days) + + diff > days else {:last, nil} -> true - {:diff, false} -> false end end |