Handle sensitive property.

This commit is contained in:
lain 2018-02-18 14:14:16 +01:00
commit 539340d914
4 changed files with 6 additions and 3 deletions

View file

@ -133,7 +133,9 @@ defmodule Pleroma.Web.TwitterAPI.Representers.ActivityRepresenter do
conversation_id = conversation_id(activity)
tags = activity.data["object"]["tag"] || []
possibly_sensitive = Enum.member?(tags, "nsfw")
possibly_sensitive = activity.data["object"]["sensitive"] || Enum.member?(tags, "nsfw")
tags = if possibly_sensitive, do: ["nsfw" | tags], else: tags
summary = activity.data["object"]["summary"]
content = if !!summary and summary != "" do