projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ae9424
)
user: add User.html_filter_policy()
author
William Pitcock
<nenolod@dereferenced.org>
Sat, 22 Sep 2018 01:37:05 +0000
(
01:37
+0000)
committer
William Pitcock
<nenolod@dereferenced.org>
Sat, 22 Sep 2018 02:53:00 +0000
(
02:53
+0000)
lib/pleroma/user.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/user.ex
b/lib/pleroma/user.ex
index e3e6aa0d807783e334203fba2ebc48c5c7ba650d..487bfce3264173a9d81bf57a43b4f25d45e059c8 100644
(file)
--- 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)