commit: 47e00524f7c443d5313c1b05f05d61f50c3a1f7c
parent 40f170f0a70eaf81f13bbe64964a98843a2ecaa9
Author: feld <feld@feld.me>
Date: Wed, 27 Dec 2023 17:51:52 +0000
Merge branch 'instance-defdelegates' into 'develop'
defdelegates for Pleroma.Instances
See merge request pleroma/pleroma!4016
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())