summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfeld <feld@feld.me>2023-12-27 17:51:52 +0000
committerfeld <feld@feld.me>2023-12-27 17:51:52 +0000
commit47e00524f7c443d5313c1b05f05d61f50c3a1f7c (patch)
tree3e66ec5ff796d244f6c2876d2926d6216f5e9e14
parent40f170f0a70eaf81f13bbe64964a98843a2ecaa9 (diff)
parent1a337dcc18f3dabb97bf480f5569e8787e5ce2cf (diff)
downloadpleroma-47e00524f7c443d5313c1b05f05d61f50c3a1f7c.tar.gz
pleroma-47e00524f7c443d5313c1b05f05d61f50c3a1f7c.zip
Merge branch 'instance-defdelegates' into 'develop'
defdelegates for Pleroma.Instances See merge request pleroma/pleroma!4016
-rw-r--r--changelog.d/instance-defdelegates.skip0
-rw-r--r--lib/pleroma/instances.ex11
2 files changed, 5 insertions, 6 deletions
diff --git a/changelog.d/instance-defdelegates.skip b/changelog.d/instance-defdelegates.skip
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/changelog.d/instance-defdelegates.skip
diff --git a/lib/pleroma/instances.ex b/lib/pleroma/instances.ex
index 782948f83..b6d83f591 100644
--- 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())