diff options
author | Tusooa Zhu <tusooa@kazv.moe> | 2022-09-08 11:58:17 -0400 |
---|---|---|
committer | Tusooa Zhu <tusooa@kazv.moe> | 2022-09-08 11:58:17 -0400 |
commit | 50923f543826bb97efe8e01737ca854003ab934f (patch) | |
tree | dd8c5246b9b0bae501b3fc6a4e83f72b687b2505 /lib | |
parent | 453a66f8c268580148475e11a7d4141ac7e93515 (diff) | |
download | pleroma-50923f543826bb97efe8e01737ca854003ab934f.tar.gz pleroma-50923f543826bb97efe8e01737ca854003ab934f.zip |
Fix User.get_or_fetch/1 with usernames starting with http
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/user.ex | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index 85d3382cb..b422e5c1d 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -2126,7 +2126,8 @@ defmodule Pleroma.User do @doc "Gets or fetch a user by uri or nickname." @spec get_or_fetch(String.t()) :: {:ok, User.t()} | {:error, String.t()} - def get_or_fetch("http" <> _host = uri), do: get_or_fetch_by_ap_id(uri) + def get_or_fetch("http://" <> _host = uri), do: get_or_fetch_by_ap_id(uri) + def get_or_fetch("https://" <> _host = uri), do: get_or_fetch_by_ap_id(uri) def get_or_fetch(nickname), do: get_or_fetch_by_nickname(nickname) # wait a period of time and return newest version of the User structs |