fix(BREAKING): rename spoiler-text flag to summary
All checks were successful
REUSE Compliance Check / check (push) Successful in 5s

Rename the spoiler-text flag to summary as the text represents the
status' summary. The usage message and manual indicates that the text is
also known as the spoiler text or content warning.
This commit is contained in:
Dan Anglin 2024-08-18 06:48:15 +01:00
parent 7e4b8bb05f
commit 6e5e0c4c5a
Signed by: dananglin
GPG key ID: 0C1D44CFBEE68638
4 changed files with 9 additions and 9 deletions

View file

@ -517,7 +517,7 @@ Creates a new status.
| `media-description` | string | false | The description of the media attachment which will be used as the media's alt-text.<br>To use a description from a text file, use the `flag@` prefix followed by the path to the file (e.g. `file@description.txt`)<br>Use this flag multiple times to set multiple descriptions.| |
| `media-focus` | string | false | The media's focus values. This should be in the form of two comma-separated numbers between -1 and 1 (e.g. 0.25,-0.34).<br>Use this flag multiple times to set multiple focus values. | |
| `sensitive` | string | false | The status should be marked as sensitive.<br>If this is not specified then the default sensitivity from your posting preferences will be used. | |
| `spoiler-text` | string | false | The text to display as the status' warning or subject. | |
| `summary` | string | false | The summary of the status (a.k.a the subject, spoiler text or content warning). | |
| `visibility` | string | false | The visibility of the status.<br>Valid values are `public`, `private`, `unlisted`, `mutuals_only` and `direct`.<br>If this is not specified then the default visibility from your posting preferences will be used. | |
Additional flags for polls.

View file

@ -191,7 +191,7 @@ func (c *CreateExecutor) createStatus(gtsClient *client.Client) error {
Content: content,
ContentType: parsedContentType,
Language: language,
SpoilerText: c.spoilerText,
SpoilerText: c.summary,
Boostable: c.boostable,
Federated: c.federated,
InReplyTo: c.inReplyTo,

View file

@ -140,7 +140,7 @@ type CreateExecutor struct {
pollHidesVoteCounts bool
pollOptions internalFlag.StringSliceValue
sensitive internalFlag.BoolPtrValue
spoilerText string
summary string
resourceType string
visibility string
}
@ -184,7 +184,7 @@ func NewCreateExecutor(
exe.BoolVar(&exe.pollHidesVoteCounts, "poll-hides-vote-counts", false, "Set to true to hide the vote count until the poll is closed")
exe.Var(&exe.pollOptions, "poll-option", "A poll option. Use this multiple times to set multiple options")
exe.Var(&exe.sensitive, "sensitive", "Set to true if the status should be marked as sensitive")
exe.StringVar(&exe.spoilerText, "spoiler-text", "", "The subject, summary or content warning for the status")
exe.StringVar(&exe.summary, "summary", "", "The summary of the status (a.k.a the subject, spoiler text or content warning)")
exe.StringVar(&exe.resourceType, "type", "", "The type of resource you want to action on (e.g. account, status)")
exe.StringVar(&exe.visibility, "visibility", "", "The visibility of the posted status")

View file

@ -172,14 +172,14 @@
"type": "bool",
"description": "Set to true to skip showing your relationship to the account that you are viewing"
},
"spoiler-text": {
"type": "string",
"description": "The subject, summary or content warning for the status"
},
"status-id": {
"type": "string",
"description": "The ID of the status"
},
"summary": {
"type": "string",
"description": "The summary of the status (a.k.a the subject, spoiler text or content warning)"
},
"tag": {
"type": "string",
"description": "The name of the tag"
@ -265,7 +265,7 @@
{ "flag": "poll-hides-vote-counts", "default": "false" },
{ "flag": "poll-option", "fieldName": "pollOptions" },
{ "flag": "sensitive" },
{ "flag": "spoiler-text", "default": "" },
{ "flag": "summary", "default": "" },
{ "flag": "type", "fieldName": "resourceType", "default": "" },
{ "flag": "visibility", "default": "" }
],