Commit c7be7a94 authored by lain's avatar lain
Browse files

Unify user fetching.

parent e3a81fe5
Pipeline #968 failed with stage
in 2 minutes and 17 seconds
......@@ -328,7 +328,8 @@ def conversation_id_to_context(id) do
end
def get_external_profile(for_user, uri) do
with {:ok, %User{} = user} <- OStatus.find_or_make_user(uri) do
IO.inspect(uri)
with %User{} = user <- User.get_or_fetch_by_nickname(uri) do
spawn(fn ->
with url <- user.info["topic"],
{:ok, %{body: body}} <- @httpoison.get(url, [], follow_redirect: true, timeout: 10000, recv_timeout: 20000) do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment