logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma
commit: 44295dd49ad004b8c7a289387e913b1234ad1e61
parent: 04217f52c92d5a287b317e10be4b42bf74b30e07
Author: Roger Braun <roger@rogerbraun.net>
Date:   Tue, 31 Oct 2017 17:49:47 +0100

MastoAPI: Include CW.

Diffstat:

Mlib/pleroma/web/mastodon_api/views/status_view.ex2+-
Mtest/support/factory.ex1+
Mtest/web/mastodon_api/status_view_test.exs2+-
3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex @@ -93,7 +93,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do favourited: !!favorited, muted: false, sensitive: sensitive, - spoiler_text: "", + spoiler_text: object["summary"] || "", visibility: "public", media_attachments: attachments, mentions: mentions, diff --git a/test/support/factory.ex b/test/support/factory.ex @@ -26,6 +26,7 @@ defmodule Pleroma.Factory do "likes" => [], "like_count" => 0, "context" => "2hu", + "summary" => "2hu", "tag" => ["2hu"], "emoji" => %{ "2hu" => "corndog.png" diff --git a/test/web/mastodon_api/status_view_test.exs b/test/web/mastodon_api/status_view_test.exs @@ -32,7 +32,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do favourited: false, muted: false, sensitive: false, - spoiler_text: "", + spoiler_text: note.data["object"]["summary"], visibility: "public", media_attachments: [], mentions: [],