projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'features/cleanup-incoming-actor' into 'develop'
[akkoma]
/
lib
/
pleroma
/
web
/
metadata.ex
diff --git
a/lib/pleroma/web/metadata.ex
b/lib/pleroma/web/metadata.ex
index 2164b0fe866d89ddbb99b4817e76b4f83aa0b243..8761260f2cd7398fd244f2b8397a160adfb60eb9 100644
(file)
--- a/
lib/pleroma/web/metadata.ex
+++ b/
lib/pleroma/web/metadata.ex
@@
-1,6
+1,7
@@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
# Pleroma: A lightweight social networking server
# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
+
defmodule Pleroma.Web.Metadata do
alias Phoenix.HTML
defmodule Pleroma.Web.Metadata do
alias Phoenix.HTML
@@
-28,4
+29,12
@@
defmodule Pleroma.Web.Metadata do
raise ArgumentError, message: "make_tag invalid args"
end
end
raise ArgumentError, message: "make_tag invalid args"
end
end
+
+ def activity_nsfw?(%{data: %{"sensitive" => sensitive}}) do
+ Pleroma.Config.get([__MODULE__, :unfurl_nsfw], false) == false and sensitive
+ end
+
+ def activity_nsfw?(_) do
+ false
+ end
end
end