diff options
author | Phil Hagelberg <phil@hagelb.org> | 2019-10-29 20:55:43 -0700 |
---|---|---|
committer | Phil Hagelberg <phil@hagelb.org> | 2019-11-09 18:07:50 -0800 |
commit | 918e1353f6bc7f6dfe317a87d942dfa2e53064af (patch) | |
tree | 4b467d80365383c6b155f72087f959e49356a8b7 /lib/pleroma/web/static_fe | |
parent | 33a26b61c30ad8084003f0f1c646bc997a8d88ac (diff) | |
download | pleroma-918e1353f6bc7f6dfe317a87d942dfa2e53064af.tar.gz |
Add header to profile/notice pages linking to pleroma-fe.
Diffstat (limited to 'lib/pleroma/web/static_fe')
-rw-r--r-- | lib/pleroma/web/static_fe/static_fe_controller.ex | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/pleroma/web/static_fe/static_fe_controller.ex b/lib/pleroma/web/static_fe/static_fe_controller.ex index a5cb76167..fe2fb09c4 100644 --- a/lib/pleroma/web/static_fe/static_fe_controller.ex +++ b/lib/pleroma/web/static_fe/static_fe_controller.ex @@ -43,6 +43,7 @@ defmodule Pleroma.Web.StaticFE.StaticFEController do end def show_notice(%{assigns: %{notice_id: notice_id}} = conn, _params) do + instance_name = Pleroma.Config.get([:instance, :name], "Pleroma") activity = Activity.get_by_id_with_object(notice_id) context = activity.object.data["context"] activities = ActivityPub.fetch_activities_for_context(context, %{}) @@ -52,10 +53,11 @@ defmodule Pleroma.Web.StaticFE.StaticFEController do represent(activity, a.object.id == activity.object.id) end - render(conn, "conversation.html", activities: represented) + render(conn, "conversation.html", %{activities: represented, instance_name: instance_name}) end def show_user(%{assigns: %{username_or_id: username_or_id}} = conn, _params) do + instance_name = Pleroma.Config.get([:instance, :name], "Pleroma") %User{} = user = User.get_cached_by_nickname_or_id(username_or_id) timeline = @@ -63,7 +65,7 @@ defmodule Pleroma.Web.StaticFE.StaticFEController do represent(activity, user, false) end - render(conn, "profile.html", %{user: user, timeline: timeline}) + render(conn, "profile.html", %{user: user, timeline: timeline, instance_name: instance_name}) end def assign_id(%{path_info: ["notice", notice_id]} = conn, _opts), |