diff --git a/lib/pleroma/activity.ex b/lib/pleroma/activity.ex index 0a376be04..925612d3c 100644 --- a/lib/pleroma/activity.ex +++ b/lib/pleroma/activity.ex @@ -277,9 +277,9 @@ def get_create_by_object_ap_id_with_object(ap_id) when is_binary(ap_id) do def get_create_by_object_ap_id_with_object(_), do: nil - def get_local_create_by_object_ap_id_with_object(ap_id) when is_binary(ap_id) do + def get_local_create_by_object_ap_id(ap_id) when is_binary(ap_id) do ap_id - |> create_by_object_ap_id_with_object() + |> create_by_object_ap_id() |> where(local: true) |> Repo.one() end diff --git a/lib/pleroma/web/o_status/o_status_controller.ex b/lib/pleroma/web/o_status/o_status_controller.ex index 79db112df..95a22895e 100644 --- a/lib/pleroma/web/o_status/o_status_controller.ex +++ b/lib/pleroma/web/o_status/o_status_controller.ex @@ -36,7 +36,7 @@ def object(%{assigns: %{format: format}} = conn, _params) def object(conn, _params) do with id <- Endpoint.url() <> conn.request_path, {_, %Activity{} = activity} <- - {:activity, Activity.get_local_create_by_object_ap_id_with_object(id)}, + {:activity, Activity.get_local_create_by_object_ap_id(id)}, {_, true} <- {:public?, Visibility.is_public?(activity)}, {_, false} <- {:local_public?, Visibility.is_local_public?(activity)} do redirect(conn, to: "/notice/#{activity.id}")