diff --git a/lib/pleroma/web/static_fe/static_fe_controller.ex b/lib/pleroma/web/static_fe/static_fe_controller.ex index 6e8d0d622..c77df8e7d 100644 --- a/lib/pleroma/web/static_fe/static_fe_controller.ex +++ b/lib/pleroma/web/static_fe/static_fe_controller.ex @@ -17,22 +17,20 @@ defmodule Pleroma.Web.StaticFE.StaticFEController do def show_notice(%{assigns: %{notice_id: notice_id}} = conn, _params) do with {:ok, data} <- ActivityRepresenter.represent(notice_id) do context = data.object.data["context"] - activities = ActivityPub.fetch_activities_for_context(context, %{}) - data = - for a <- Enum.reverse(activities) do + activities = + for a <- Enum.reverse(ActivityPub.fetch_activities_for_context(context, %{})) do ActivityRepresenter.prepare_activity(data.user, a) |> Map.put(:selected, a.object.id == data.object.id) end - render(conn, "conversation.html", data: data) + render(conn, "conversation.html", activities: activities) end end def show_user(%{assigns: %{username_or_id: username_or_id}} = conn, _params) do - with {:ok, data} <- UserRepresenter.represent(username_or_id) do - render(conn, "profile.html", data: data) - end + {:ok, data} = UserRepresenter.represent(username_or_id) + render(conn, "profile.html", %{user: data.user, timeline: data.timeline}) end def assign_id(%{path_info: ["notice", notice_id]} = conn, _opts), diff --git a/lib/pleroma/web/templates/static_fe/static_fe/_notice.html.eex b/lib/pleroma/web/templates/static_fe/static_fe/_notice.html.eex index c4cdb1029..b16d19a2c 100644 --- a/lib/pleroma/web/templates/static_fe/static_fe/_notice.html.eex +++ b/lib/pleroma/web/templates/static_fe/static_fe/_notice.html.eex @@ -1,19 +1,19 @@ -
- <%= link @data.published, to: @data.link, class: "activity-link" %> + <%= link @published, to: @link, class: "activity-link" %>
- <%= render("user_card.html", %{user: @data.user}) %> + <%= render("user_card.html", %{user: @user}) %><%= raw @data.user.bio %>
+<%= raw @user.bio %>