mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 00:26:30 +00:00
Fix a bug where reblogs were displayed under the wrong user.
This commit is contained in:
parent
5d7c44266b
commit
2ac1ece652
1 changed files with 4 additions and 7 deletions
|
@ -34,7 +34,9 @@ defmodule Pleroma.Web.StaticFE.StaticFEController do
|
||||||
}
|
}
|
||||||
end
|
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,
|
user: user,
|
||||||
title: get_title(activity.object),
|
title: get_title(activity.object),
|
||||||
|
@ -48,11 +50,6 @@ defmodule Pleroma.Web.StaticFE.StaticFEController do
|
||||||
}
|
}
|
||||||
end
|
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
|
def show_notice(%{assigns: %{notice_id: notice_id}} = conn, _params) do
|
||||||
instance_name = Pleroma.Config.get([:instance, :name], "Pleroma")
|
instance_name = Pleroma.Config.get([:instance, :name], "Pleroma")
|
||||||
activity = Activity.get_by_id_with_object(notice_id)
|
activity = Activity.get_by_id_with_object(notice_id)
|
||||||
|
@ -73,7 +70,7 @@ defmodule Pleroma.Web.StaticFE.StaticFEController do
|
||||||
|
|
||||||
timeline =
|
timeline =
|
||||||
for activity <- ActivityPub.fetch_user_activities(user, nil, %{}) do
|
for activity <- ActivityPub.fetch_user_activities(user, nil, %{}) do
|
||||||
represent(activity, user, false)
|
represent(activity, false)
|
||||||
end
|
end
|
||||||
|
|
||||||
render(conn, "profile.html", %{user: user, timeline: timeline, instance_name: instance_name})
|
render(conn, "profile.html", %{user: user, timeline: timeline, instance_name: instance_name})
|
||||||
|
|
Loading…
Reference in a new issue