fix for use of published from different entities
This commit is contained in:
parent
2b57f73b77
commit
4d330d9df1
6 changed files with 28 additions and 32 deletions
|
|
@ -23,7 +23,7 @@ defmodule Pleroma.Web.Feed.FeedView do
|
|||
def pub_date(%DateTime{} = date), do: Timex.format!(date, "{RFC822}")
|
||||
|
||||
def prepare_activity(activity, opts \\ []) do
|
||||
object = activity_object(activity)
|
||||
object = Object.normalize(activity)
|
||||
|
||||
actor =
|
||||
if opts[:actor] do
|
||||
|
|
@ -33,7 +33,6 @@ defmodule Pleroma.Web.Feed.FeedView do
|
|||
%{
|
||||
activity: activity,
|
||||
data: Map.get(object, :data),
|
||||
object: object,
|
||||
actor: actor
|
||||
}
|
||||
end
|
||||
|
|
@ -68,9 +67,7 @@ defmodule Pleroma.Web.Feed.FeedView do
|
|||
|
||||
def last_activity(activities), do: List.last(activities)
|
||||
|
||||
def activity_object(activity), do: Object.normalize(activity)
|
||||
|
||||
def activity_title(%{data: %{"content" => content}}, opts \\ %{}) do
|
||||
def activity_title(%{"content" => content}, opts \\ %{}) do
|
||||
content
|
||||
|> Pleroma.Web.Metadata.Utils.scrub_html()
|
||||
|> Pleroma.Emoji.Formatter.demojify()
|
||||
|
|
@ -78,7 +75,7 @@ defmodule Pleroma.Web.Feed.FeedView do
|
|||
|> escape()
|
||||
end
|
||||
|
||||
def activity_content(%{data: %{"content" => content}}) do
|
||||
def activity_content(%{"content" => content}) do
|
||||
content
|
||||
|> String.replace(~r/[\n\r]/, "")
|
||||
|> escape()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue