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, %{})
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 =
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),
<p class="pull-right">
<%= link @published, to: @link, class: "activity-link" %>
</p>
- <%= render("user_card.html", %{user: @user}) %>
+ <%= render("_user_card.html", %{user: @user}) %>
<div class="activity-content">
<%= if @title != "" do %>
<details>
-<h1>
+<h1><%= link @instance_name, to: "/" %></h1>
+
+<h3>
<form class="pull-right collapse" method="POST" action="<%= Helpers.util_path(@conn, :remote_subscribe) %>">
<input type="hidden" name="nickname" value="<%= @user.nickname %>">
<input type="hidden" name="profile" value="">
<button type="submit" class="collapse">Remote follow</button>
</form>
<%= raw (@user.name |> Formatter.emojify(emoji_for_user(@user))) %>
-</h1>
+</h3>
<p><%= raw @user.bio %></p>
<div class="activity-stream">
<%= for activity <- @timeline do %>