From: William Pitcock Date: Sat, 22 Sep 2018 01:37:05 +0000 (+0000) Subject: user: add User.html_filter_policy() X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=735cdfb8481af7ff78a0637fe5045d3f10961141;p=akkoma user: add User.html_filter_policy() --- diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index e3e6aa0d8..487bfce32 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -669,6 +669,12 @@ defmodule Pleroma.User do :ok 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 user = get_by_ap_id(ap_id)