projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ObjectValidator: Basic `Block` support.
[akkoma]
/
lib
/
pleroma
/
web
/
feed
/
feed_view.ex
diff --git
a/lib/pleroma/web/feed/feed_view.ex
b/lib/pleroma/web/feed/feed_view.ex
index 334802e0a62ad4cd05361d2335a4dd92aae625de..1ae03e7e28d2d3651cb91a9134168e7f50beb2b9 100644
(file)
--- a/
lib/pleroma/web/feed/feed_view.ex
+++ b/
lib/pleroma/web/feed/feed_view.ex
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-20
19
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-20
20
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Feed.FeedView do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Feed.FeedView do
@@
-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
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
actor =
if opts[:actor] do
@@
-33,7
+33,6
@@
defmodule Pleroma.Web.Feed.FeedView do
%{
activity: activity,
data: Map.get(object, :data),
%{
activity: activity,
data: Map.get(object, :data),
- object: object,
actor: actor
}
end
actor: actor
}
end
@@
-68,9
+67,7
@@
defmodule Pleroma.Web.Feed.FeedView do
def last_activity(activities), do: List.last(activities)
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()
content
|> Pleroma.Web.Metadata.Utils.scrub_html()
|> Pleroma.Emoji.Formatter.demojify()
@@
-78,7
+75,7
@@
defmodule Pleroma.Web.Feed.FeedView do
|> escape()
end
|> escape()
end
- def activity_content(%{
data: %{"content" => content}
}) do
+ def activity_content(%{
"content" => content
}) do
content
|> String.replace(~r/[\n\r]/, "")
|> escape()
content
|> String.replace(~r/[\n\r]/, "")
|> escape()