Different caches based on the module. Remove scrubber version since it is not relevant anymore

This commit is contained in:
Rin Toshaka 2019-01-05 00:19:46 +01:00
commit 846082e54f
3 changed files with 16 additions and 28 deletions

View file

@ -120,7 +120,11 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
content =
object
|> render_content()
|> HTML.get_cached_scrubbed_html_for_object(User.html_filter_policy(opts[:for]), activity)
|> HTML.get_cached_scrubbed_html_for_object(
User.html_filter_policy(opts[:for]),
activity,
__MODULE__
)
%{
id: to_string(activity.id),

View file

@ -245,14 +245,18 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do
html =
content
|> HTML.get_cached_scrubbed_html_for_object(User.html_filter_policy(opts[:for]), activity)
|> HTML.get_cached_scrubbed_html_for_object(
User.html_filter_policy(opts[:for]),
activity,
__MODULE__
)
|> Formatter.emojify(object["emoji"])
text =
if content do
content
|> String.replace(~r/<br\s?\/?>/, "\n")
|> HTML.get_cached_stripped_html_for_object(activity)
|> HTML.get_cached_stripped_html_for_object(activity, __MODULE__)
end
reply_parent = Activity.get_in_reply_to_activity(activity)