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

@@ -81,7 +81,7 @@ defmodule Mobilizon.Service.Workers.LegacyNotifierBuilder do
options
) do
mentionned_actor_ids
|> Enum.filter(&Actors.is_member?(&1, Keyword.fetch!(options, :group_id)))
|> Enum.filter(&Actors.member?(&1, Keyword.fetch!(options, :group_id)))
|> users_from_actor_ids(Keyword.fetch!(options, :author_id))
end

View File

@@ -16,7 +16,7 @@ defmodule Mobilizon.Service.Workers.SendActivityRecapWorker do
only: [
is_between_hours?: 1,
is_between_hours_on_first_day?: 1,
is_delay_ok_since_last_notification_sent?: 1
delay_ok_since_last_notification_sent?: 1
]
@impl Oban.Worker
@@ -108,7 +108,7 @@ defmodule Mobilizon.Service.Workers.SendActivityRecapWorker do
"Testing if it's less than an hour since the last time we sent an activity recap"
)
is_delay_ok_since_last_notification_sent?(last_notification_sent)
delay_ok_since_last_notification_sent?(last_notification_sent)
end
# If we're between notification hours