diff options
author | kaniini <nenolod@gmail.com> | 2019-01-04 23:35:56 +0000 |
---|---|---|
committer | kaniini <nenolod@gmail.com> | 2019-01-04 23:35:56 +0000 |
commit | bf5aaefbb56a8ff8ac4e43874dacd794f3deda84 (patch) | |
tree | 8fe0d0295b432cabaedf407ae200fb1eeedef99f /lib/pleroma/web | |
parent | 4258dd8633407587ca1f3dfe275afa6a91be9197 (diff) | |
parent | 1e2d58982ee6a74a249fc92fa2711f678a9f7464 (diff) | |
download | pleroma-bf5aaefbb56a8ff8ac4e43874dacd794f3deda84.tar.gz |
Merge branch 'fix/html-cache-content-collision' into 'develop'
Different caches based on the module. Remove scrubber version since it is not relevant anymore
See merge request pleroma/pleroma!628
Diffstat (limited to 'lib/pleroma/web')
-rw-r--r-- | lib/pleroma/web/mastodon_api/views/status_view.ex | 6 | ||||
-rw-r--r-- | lib/pleroma/web/twitter_api/views/activity_view.ex | 8 |
2 files changed, 11 insertions, 3 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex index 477ab3b5f..8e8fa8121 100644 --- a/lib/pleroma/web/mastodon_api/views/status_view.ex +++ b/lib/pleroma/web/mastodon_api/views/status_view.ex @@ -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), diff --git a/lib/pleroma/web/twitter_api/views/activity_view.ex b/lib/pleroma/web/twitter_api/views/activity_view.ex index 84f35ebf9..a0be5cfc5 100644 --- a/lib/pleroma/web/twitter_api/views/activity_view.ex +++ b/lib/pleroma/web/twitter_api/views/activity_view.ex @@ -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) |