instance.reachable?: Limit to binary input

This commit is contained in:
Haelwenn (lanodan) Monnier 2020-12-07 21:18:51 +01:00
commit 1403798820
No known key found for this signature in database
GPG key ID: D5B7A8E43C997DEE
2 changed files with 4 additions and 4 deletions

View file

@ -77,7 +77,7 @@ defmodule Pleroma.Instances.Instance do
)
end
def reachable?(_), do: true
def reachable?(url_or_host) when is_binary(url_or_host), do: true
def set_reachable(url_or_host) when is_binary(url_or_host) do
with host <- host(url_or_host),