forked from AkkomaGang/akkoma
ostatus: use Activity.normalize() instead of directly using Activity.get_by_ap_id().
This commit is contained in:
parent
5b240c3b18
commit
6f4ca7ddf7
2 changed files with 2 additions and 2 deletions
|
@ -246,7 +246,7 @@ def to_simple_form(
|
|||
author = if with_author, do: [{:author, UserRepresenter.to_simple_form(user)}], else: []
|
||||
|
||||
mentions = (activity.recipients || []) |> get_mentions
|
||||
follow_activity = Activity.get_by_ap_id(follow_activity["id"])
|
||||
follow_activity = Activity.normalize(follow_activity)
|
||||
|
||||
[
|
||||
{:"activity:object-type", ['http://activitystrea.ms/schema/1.0/activity']},
|
||||
|
|
|
@ -107,7 +107,7 @@ def object(conn, %{"uuid" => uuid}) do
|
|||
|
||||
def activity(conn, %{"uuid" => uuid}) do
|
||||
with id <- o_status_url(conn, :activity, uuid),
|
||||
{_, %Activity{} = activity} <- {:activity, Activity.get_by_ap_id(id)},
|
||||
{_, %Activity{} = activity} <- {:activity, Activity.normalize(id)},
|
||||
{_, true} <- {:public?, ActivityPub.is_public?(activity)},
|
||||
%User{} = user <- User.get_cached_by_ap_id(activity.data["actor"]) do
|
||||
case get_format(conn) do
|
||||
|
|
Loading…
Reference in a new issue