Refactor html caching functions to have a key instead of a module, use more correct terminology and fix summaries in mastoapi

This commit is contained in:
rinpatch 2019-04-05 15:19:44 +03:00
commit f0f30019e1
4 changed files with 22 additions and 15 deletions

View file

@ -12,7 +12,7 @@ defmodule Pleroma.Web.Metadata.Utils do
# html content comes from DB already encoded, decode first and scrub after
|> HtmlEntities.decode()
|> String.replace(~r/<br\s?\/?>/, " ")
|> HTML.get_cached_stripped_html_for_object(object, __MODULE__)
|> HTML.get_cached_stripped_html_for_activity(object, "metadata")
|> Formatter.demojify()
|> Formatter.truncate()
end