Fix more specs.

This commit is contained in:
lain 2018-02-25 17:48:31 +01:00
commit 4ea2a41014
8 changed files with 24 additions and 19 deletions

View file

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