Add empty spoiler_text property to Mastodon API Status object

This commit is contained in:
silverpill 2023-02-24 00:26:39 +00:00
parent bacb8c8380
commit 56e0ed8f5d
3 changed files with 6 additions and 0 deletions

View file

@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Set fetcher timeout to 3 minutes.
- Set deliverer timeout to 30 seconds.
- Added `federation` parameter group to configuration.
- Add empty `spoiler_text` property to Mastodon API Status object.
### Deprecated

View file

@ -1800,6 +1800,9 @@ components:
visibility:
description: Visibility of this post.
$ref: '#/components/schemas/Visibility'
spoiler_text:
description: Subject or summary line, below which post content is collapsed until expanded.
type: string
media_attachments:
description: Media that is attached to this post.
type: array

View file

@ -64,6 +64,7 @@ pub struct Status {
pub in_reply_to_id: Option<Uuid>,
pub reblog: Option<Box<Status>>,
pub visibility: String,
pub spoiler_text: Option<String>,
pub replies_count: i32,
pub favourites_count: i32,
pub reblogs_count: i32,
@ -132,6 +133,7 @@ impl Status {
in_reply_to_id: post.in_reply_to_id,
reblog: reblog,
visibility: visibility.to_string(),
spoiler_text: None,
replies_count: post.reply_count,
favourites_count: post.reaction_count,
reblogs_count: post.repost_count,