Use User.get_or_fetch/1 instead of OStatus.find_or_make_user/1
This commit is contained in:
parent
4a8b522639
commit
e818381042
@ -17,7 +17,6 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do
|
|||||||
alias Pleroma.Web
|
alias Pleroma.Web
|
||||||
alias Pleroma.Web.ActivityPub.ActivityPub
|
alias Pleroma.Web.ActivityPub.ActivityPub
|
||||||
alias Pleroma.Web.CommonAPI
|
alias Pleroma.Web.CommonAPI
|
||||||
alias Pleroma.Web.OStatus
|
|
||||||
alias Pleroma.Web.WebFinger
|
alias Pleroma.Web.WebFinger
|
||||||
|
|
||||||
def help_test(conn, _params) do
|
def help_test(conn, _params) do
|
||||||
@ -60,7 +59,7 @@ def remote_follow(%{assigns: %{user: user}} = conn, %{"acct" => acct}) do
|
|||||||
%Activity{id: activity_id} = Activity.get_create_by_object_ap_id(object.data["id"])
|
%Activity{id: activity_id} = Activity.get_create_by_object_ap_id(object.data["id"])
|
||||||
redirect(conn, to: "/notice/#{activity_id}")
|
redirect(conn, to: "/notice/#{activity_id}")
|
||||||
else
|
else
|
||||||
{err, followee} = OStatus.find_or_make_user(acct)
|
{err, followee} = User.get_or_fetch(acct)
|
||||||
avatar = User.avatar_url(followee)
|
avatar = User.avatar_url(followee)
|
||||||
name = followee.nickname
|
name = followee.nickname
|
||||||
id = followee.id
|
id = followee.id
|
||||||
|
Loading…
Reference in New Issue
Block a user