Fix User.get_or_fetch/1 with usernames starting with http
This commit is contained in:
parent
453a66f8c2
commit
50923f5438
2 changed files with 9 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue