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

@@ -12,8 +12,8 @@ defmodule Mobilizon.Service.Notifier.Email do
import Mobilizon.Service.DateTime,
only: [
is_delay_ok_since_last_notification_sent?: 1,
is_delay_ok_since_last_notification_sent?: 2
delay_ok_since_last_notification_sent?: 1,
delay_ok_since_last_notification_sent?: 2
]
require Logger
@@ -129,7 +129,7 @@ defmodule Mobilizon.Service.Notifier.Email do
# Delay ok since last notification
defp match_group_notifications_setting(:one_hour, _, %DateTime{} = last_notification_sent, _) do
is_delay_ok_since_last_notification_sent?(last_notification_sent)
delay_ok_since_last_notification_sent?(last_notification_sent)
end
# Delay ok since last notification
@@ -139,7 +139,7 @@ defmodule Mobilizon.Service.Notifier.Email do
%DateTime{} = last_notification_sent,
options
) do
is_delay_ok_since_last_notification_sent?(last_notification_sent, 3_600 * 23) and
delay_ok_since_last_notification_sent?(last_notification_sent, 3_600 * 23) and
Keyword.get(options, :recap, false) != false
end
@@ -149,7 +149,7 @@ defmodule Mobilizon.Service.Notifier.Email do
%DateTime{} = last_notification_sent,
options
) do
is_delay_ok_since_last_notification_sent?(last_notification_sent, 3_600 * 24 * 6) and
delay_ok_since_last_notification_sent?(last_notification_sent, 3_600 * 24 * 6) and
Keyword.get(options, :recap, false) != false
end