mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-25 02:19:31 +00:00
Fix OStatus controller to know about StaticFEController.
But only when it's configured to be on.
This commit is contained in:
parent
e79d8985ab
commit
0cf04e1088
|
@ -76,6 +76,9 @@ defmodule Pleroma.Web.OStatus.OStatusController do
|
||||||
end
|
end
|
||||||
|
|
||||||
def notice(%{assigns: %{format: format}} = conn, %{"id" => id}) do
|
def notice(%{assigns: %{format: format}} = conn, %{"id" => id}) do
|
||||||
|
if Pleroma.Config.get([:instance, :static_fe], false) do
|
||||||
|
Pleroma.Web.StaticFE.StaticFEController.show(conn, %{"notice_id" => id})
|
||||||
|
else
|
||||||
with {_, %Activity{} = activity} <- {:activity, Activity.get_by_id_with_object(id)},
|
with {_, %Activity{} = activity} <- {:activity, Activity.get_by_id_with_object(id)},
|
||||||
{_, true} <- {:public?, Visibility.is_public?(activity)},
|
{_, true} <- {:public?, Visibility.is_public?(activity)},
|
||||||
%User{} = user <- User.get_cached_by_ap_id(activity.data["actor"]) do
|
%User{} = user <- User.get_cached_by_ap_id(activity.data["actor"]) do
|
||||||
|
@ -109,6 +112,7 @@ defmodule Pleroma.Web.OStatus.OStatusController do
|
||||||
e
|
e
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# Returns an HTML embedded <audio> or <video> player suitable for embed iframes.
|
# Returns an HTML embedded <audio> or <video> player suitable for embed iframes.
|
||||||
def notice_player(conn, %{"id" => id}) do
|
def notice_player(conn, %{"id" => id}) do
|
||||||
|
|
Loading…
Reference in a new issue