diff options
author | lain <lain@soykaf.club> | 2018-02-25 17:48:31 +0100 |
---|---|---|
committer | lain <lain@soykaf.club> | 2018-02-25 17:48:31 +0100 |
commit | 4ea2a41014c71cd4b60d62a2d013840ad98d8600 (patch) | |
tree | fdc76385331e1abf6a64eb38cc369ed8a0bf90d1 /lib | |
parent | d3b01678545dc4ebb9f5ad883b734f25fd74328c (diff) | |
download | pleroma-4ea2a41014c71cd4b60d62a2d013840ad98d8600.tar.gz |
Fix more specs.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/twitter_api/representers/activity_representer.ex | 2 | ||||
-rw-r--r-- | lib/pleroma/web/twitter_api/twitter_api.ex | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/pleroma/web/twitter_api/representers/activity_representer.ex b/lib/pleroma/web/twitter_api/representers/activity_representer.ex index 8970b7c68..5199cef8e 100644 --- a/lib/pleroma/web/twitter_api/representers/activity_representer.ex +++ b/lib/pleroma/web/twitter_api/representers/activity_representer.ex @@ -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 diff --git a/lib/pleroma/web/twitter_api/twitter_api.ex b/lib/pleroma/web/twitter_api/twitter_api.ex index ccd79625c..34e3d75af 100644 --- a/lib/pleroma/web/twitter_api/twitter_api.ex +++ b/lib/pleroma/web/twitter_api/twitter_api.ex @@ -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 |