aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/instances.ex
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2021-06-17 15:38:10 -0500
committerAlex Gleason <alex@alexgleason.me>2021-06-17 15:38:10 -0500
commit3a03d9b65f96099e7c7a831469532c2cec7294c6 (patch)
tree46d84731c3a53157117fc4c8141fdf6b3d7b8b25 /lib/pleroma/instances.ex
parenta704d5499c03cb5609ea38a5f2ef06095ced3ef3 (diff)
parenta8adc300d4cfc88ef19f1977e32068437ed4ad00 (diff)
downloadpleroma-nsfw-api-mrf.tar.gz
Merge remote-tracking branch 'pleroma/develop' into nsfw-api-mrfnsfw-api-mrf
Diffstat (limited to 'lib/pleroma/instances.ex')
-rw-r--r--lib/pleroma/instances.ex17
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/pleroma/instances.ex b/lib/pleroma/instances.ex
index 80addcc52..6b57e56da 100644
--- a/lib/pleroma/instances.ex
+++ b/lib/pleroma/instances.ex
@@ -5,13 +5,18 @@
defmodule Pleroma.Instances do
@moduledoc "Instances context."
- @adapter Pleroma.Instances.Instance
+ alias Pleroma.Instances.Instance
- defdelegate filter_reachable(urls_or_hosts), to: @adapter
- defdelegate reachable?(url_or_host), to: @adapter
- defdelegate set_reachable(url_or_host), to: @adapter
- defdelegate set_unreachable(url_or_host, unreachable_since \\ nil), to: @adapter
- defdelegate get_consistently_unreachable(), to: @adapter
+ def filter_reachable(urls_or_hosts), do: Instance.filter_reachable(urls_or_hosts)
+
+ def reachable?(url_or_host), do: Instance.reachable?(url_or_host)
+
+ def set_reachable(url_or_host), do: Instance.set_reachable(url_or_host)
+
+ def set_unreachable(url_or_host, unreachable_since \\ nil),
+ do: Instance.set_unreachable(url_or_host, unreachable_since)
+
+ def get_consistently_unreachable, do: Instance.get_consistently_unreachable()
def set_consistently_unreachable(url_or_host),
do: set_unreachable(url_or_host, reachability_datetime_threshold())