we don't actually need the object on redirect
authorFloatingGhost <hannah@coffee-and-dreams.uk>
Wed, 29 Mar 2023 10:44:03 +0000 (11:44 +0100)
committerFloatingGhost <hannah@coffee-and-dreams.uk>
Wed, 29 Mar 2023 10:44:03 +0000 (11:44 +0100)
lib/pleroma/activity.ex
lib/pleroma/web/o_status/o_status_controller.ex

index 0a376be04a6a34f32a743c675065e54193d41dd8..925612d3ce1104c2a7884e7cf09f8639e9eb18d0 100644 (file)
@@ -277,9 +277,9 @@ defmodule Pleroma.Activity 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
index 79db112dfda8bea60d03a651cb4ec515886f1b59..95a22895e547a1aca24c39759c91955c249b4826 100644 (file)
@@ -36,7 +36,7 @@ defmodule Pleroma.Web.OStatus.OStatusController do
   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}")