Suspended actors don't need refreshing
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
cb4a801519
commit
6ad4e33fab
@ -1282,11 +1282,13 @@ defmodule Mobilizon.Actors do
|
||||
@doc """
|
||||
Whether the actor needs to be updated.
|
||||
|
||||
Local actors obviously don't need to be updated
|
||||
Local actors obviously don't need to be updated, neither do suspended ones
|
||||
"""
|
||||
@spec needs_update?(Actor.t()) :: boolean
|
||||
def needs_update?(%Actor{domain: nil}), do: false
|
||||
|
||||
def needs_update?(%Actor{suspended: true}), do: false
|
||||
|
||||
def needs_update?(%Actor{last_refreshed_at: nil, domain: domain}) when not is_nil(domain),
|
||||
do: true
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user