refactor(backend): change naming of function names to avoid the is_ prefix

Following Credo.Check.Readability.PredicateFunctionNames check

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2024-01-04 13:35:02 +01:00
parent fe0cf93604
commit d0835232d6
45 changed files with 182 additions and 181 deletions

View File

@@ -16,7 +16,7 @@ defmodule Mobilizon.Service.Export.Common do
def fetch_actor_event_feed(name, limit) do
case Actors.get_actor_by_name(name) do
%Actor{} = actor ->
if Actor.is_public_visibility?(actor) do
if Actor.public_visibility?(actor) do
%Page{elements: events} = Events.list_public_upcoming_events_for_actor(actor, 1, limit)
%Page{elements: posts} = Posts.get_public_posts_for_group(actor, 1, limit)
{:ok, actor, events, posts}

View File

@@ -265,7 +265,7 @@ defmodule Mobilizon.Service.Export.Feed do
end
defp clear_actor_feed(%Actor{preferred_username: preferred_username} = actor) do
if Actor.is_public_visibility?(actor) do
if Actor.public_visibility?(actor) do
Cachex.del(:feed, "actor_#{preferred_username}")
end
end

View File

@@ -216,7 +216,7 @@ defmodule Mobilizon.Service.Export.ICalendar do
end
defp clear_actor_feed(%Actor{preferred_username: preferred_username} = actor) do
if Actor.is_public_visibility?(actor) do
if Actor.public_visibility?(actor) do
Cachex.del(:ics, "actor_#{preferred_username}")
end
end