aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hagelberg <phil@hagelb.org>2019-10-30 20:21:10 -0700
committerPhil Hagelberg <phil@hagelb.org>2019-11-09 18:08:08 -0800
commit2ac1ece652621df9adf591255f4506564a8ace68 (patch)
tree2cb3df67f36e2aa5dc4c58a627f9b39c52b6b828
parent5d7c44266ba0355557e5a62ecca69428c5784d88 (diff)
downloadpleroma-2ac1ece652621df9adf591255f4506564a8ace68.tar.gz
Fix a bug where reblogs were displayed under the wrong user.
-rw-r--r--lib/pleroma/web/static_fe/static_fe_controller.ex11
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/pleroma/web/static_fe/static_fe_controller.ex b/lib/pleroma/web/static_fe/static_fe_controller.ex
index d2e72b476..9b565d07d 100644
--- a/lib/pleroma/web/static_fe/static_fe_controller.ex
+++ b/lib/pleroma/web/static_fe/static_fe_controller.ex
@@ -34,7 +34,9 @@ defmodule Pleroma.Web.StaticFE.StaticFEController do
}
end
- def represent(%Activity{} = activity, %User{} = user, selected) do
+ def represent(%Activity{} = activity, selected) do
+ {:ok, user} = User.get_or_fetch(activity.object.data["actor"])
+
%{
user: user,
title: get_title(activity.object),
@@ -48,11 +50,6 @@ defmodule Pleroma.Web.StaticFE.StaticFEController do
}
end
- def represent(%Activity{} = activity, selected) do
- {:ok, user} = User.get_or_fetch(activity.data["actor"])
- represent(activity, user, selected)
- 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)
@@ -73,7 +70,7 @@ defmodule Pleroma.Web.StaticFE.StaticFEController do
timeline =
for activity <- ActivityPub.fetch_user_activities(user, nil, %{}) do
- represent(activity, user, false)
+ represent(activity, false)
end
render(conn, "profile.html", %{user: user, timeline: timeline, instance_name: instance_name})