commit: 1a337dcc18f3dabb97bf480f5569e8787e5ce2cf
parent 40f170f0a70eaf81f13bbe64964a98843a2ecaa9
Author: Mark Felder <feld@feld.me>
Date: Wed, 27 Dec 2023 12:43:12 -0500
These functions in Pleroma.Instances should be defdelegates to Pleroma.Instances.Instance
Diffstat:
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/changelog.d/instance-defdelegates.skip b/changelog.d/instance-defdelegates.skip
diff --git a/lib/pleroma/instances.ex b/lib/pleroma/instances.ex
@@ -7,16 +7,15 @@ defmodule Pleroma.Instances do
alias Pleroma.Instances.Instance
- def filter_reachable(urls_or_hosts), do: Instance.filter_reachable(urls_or_hosts)
+ defdelegate filter_reachable(urls_or_hosts), to: Instance
- def reachable?(url_or_host), do: Instance.reachable?(url_or_host)
+ defdelegate reachable?(url_or_host), to: Instance
- def set_reachable(url_or_host), do: Instance.set_reachable(url_or_host)
+ defdelegate set_reachable(url_or_host), to: Instance
- def set_unreachable(url_or_host, unreachable_since \\ nil),
- do: Instance.set_unreachable(url_or_host, unreachable_since)
+ defdelegate set_unreachable(url_or_host, unreachable_since \\ nil), to: Instance
- def get_consistently_unreachable, do: Instance.get_consistently_unreachable()
+ defdelegate get_consistently_unreachable, to: Instance
def set_consistently_unreachable(url_or_host),
do: set_unreachable(url_or_host, reachability_datetime_threshold())