user: add User.html_filter_policy()

This commit is contained in:
William Pitcock 2018-09-22 01:37:05 +00:00
parent 8ae9424edb
commit 735cdfb848
1 changed files with 6 additions and 0 deletions

View File

@ -669,6 +669,12 @@ def delete(%User{} = user) do
:ok :ok
end end
def html_filter_policy(%User{info: %{"no_rich_text" => true}}) do
Pleroma.HTML.Scrubber.TwitterText
end
def html_filter_policy(_), do: nil
def get_or_fetch_by_ap_id(ap_id) do def get_or_fetch_by_ap_id(ap_id) do
user = get_by_ap_id(ap_id) user = get_by_ap_id(ap_id)