Fix more specs.
This commit is contained in:
parent
d3b0167854
commit
4ea2a41014
8 changed files with 24 additions and 19 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPI do
|
|||
def fetch_user_statuses(user, opts \\ %{}) do
|
||||
opts = opts
|
||||
|> Map.put("type", ["Create", "Announce", "Follow"])
|
||||
ActivityPub.fetch_activities([], opts)
|
||||
ActivityPub.fetch_public_activities(opts)
|
||||
|> activities_to_statuses(%{for: user})
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue