StatusView: add quote_visible param

This commit is contained in:
Alex Gleason 2022-01-26 11:52:50 -06:00 committed by tusooa
commit 74e0a4555f
No known key found for this signature in database
GPG key ID: 42AEC43D48433C51
3 changed files with 9 additions and 0 deletions

View file

@ -204,6 +204,10 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Status do
nullable: true,
description: "URL of the quoted status"
},
quote_visible: %Schema{
type: :boolean,
description: "`true` if the quoted post is visible to the user"
},
local: %Schema{
type: :boolean,
description: "`true` if the post was made on the local instance"

View file

@ -432,6 +432,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
in_reply_to_account_acct: reply_to_user && reply_to_user.nickname,
quote: quote_post,
quote_url: object.data["quoteUrl"],
quote_visible: visible_for_user?(quote_activity, opts[:for]),
content: %{"text/plain" => content_plaintext},
spoiler_text: %{"text/plain" => summary},
expires_at: expires_at,