summaryrefslogtreecommitdiff
path: root/internal/api/model/status.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api/model/status.go')
-rw-r--r--internal/api/model/status.go28
1 files changed, 14 insertions, 14 deletions
diff --git a/internal/api/model/status.go b/internal/api/model/status.go
index 2cb22aa0d..2456d1a8f 100644
--- a/internal/api/model/status.go
+++ b/internal/api/model/status.go
@@ -55,7 +55,7 @@ type Status struct {
// Have you bookmarked this status?
Bookmarked bool `json:"bookmarked"`
// Have you pinned this status? Only appears if the status is pinnable.
- Pinned bool `json:"pinned"`
+ Pinned bool `json:"pinned,omitempty"`
// HTML-encoded status content.
Content string `json:"content"`
// The status being reblogged.
@@ -86,23 +86,23 @@ type Status struct {
// It should be used at the path https://mastodon.example/api/v1/statuses
type StatusCreateRequest struct {
// Text content of the status. If media_ids is provided, this becomes optional. Attaching a poll is optional while status is provided.
- Status string `form:"status"`
+ Status string `form:"status" json:"status" xml:"status"`
// Array of Attachment ids to be attached as media. If provided, status becomes optional, and poll cannot be used.
MediaIDs []string `form:"media_ids" json:"media_ids" xml:"media_ids"`
// Poll to include with this status.
- Poll *PollRequest `form:"poll"`
+ Poll *PollRequest `form:"poll" json:"poll" xml:"poll"`
// ID of the status being replied to, if status is a reply
- InReplyToID string `form:"in_reply_to_id"`
+ InReplyToID string `form:"in_reply_to_id" json:"in_reply_to_id" xml:"in_reply_to_id"`
// Mark status and attached media as sensitive?
- Sensitive bool `form:"sensitive"`
+ Sensitive bool `form:"sensitive" json:"sensitive" xml:"sensitive"`
// Text to be shown as a warning or subject before the actual content. Statuses are generally collapsed behind this field.
- SpoilerText string `form:"spoiler_text"`
+ SpoilerText string `form:"spoiler_text" json:"spoiler_text" xml:"spoiler_text"`
// Visibility of the posted status. Enumerable oneOf public, unlisted, private, direct.
- Visibility Visibility `form:"visibility"`
+ Visibility Visibility `form:"visibility" json:"visibility" xml:"visibility"`
// ISO 8601 Datetime at which to schedule a status. Providing this paramter will cause ScheduledStatus to be returned instead of Status. Must be at least 5 minutes in the future.
- ScheduledAt string `form:"scheduled_at"`
+ ScheduledAt string `form:"scheduled_at" json:"scheduled_at" xml:"scheduled_at"`
// ISO 639 language code for this status.
- Language string `form:"language"`
+ Language string `form:"language" json:"language" xml:"language"`
}
// Visibility denotes the visibility of this status to other users
@@ -130,13 +130,13 @@ type AdvancedStatusCreateForm struct {
// to the standard mastodon-compatible ones.
type AdvancedVisibilityFlagsForm struct {
// The gotosocial visibility model
- VisibilityAdvanced *string `form:"visibility_advanced"`
+ VisibilityAdvanced *string `form:"visibility_advanced" json:"visibility_advanced" xml:"visibility_advanced"`
// This status will be federated beyond the local timeline(s)
- Federated *bool `form:"federated"`
+ Federated *bool `form:"federated" json:"federated" xml:"federated"`
// This status can be boosted/reblogged
- Boostable *bool `form:"boostable"`
+ Boostable *bool `form:"boostable" json:"boostable" xml:"boostable"`
// This status can be replied to
- Replyable *bool `form:"replyable"`
+ Replyable *bool `form:"replyable" json:"replyable" xml:"replyable"`
// This status can be liked/faved
- Likeable *bool `form:"likeable"`
+ Likeable *bool `form:"likeable" json:"likeable" xml:"likeable"`
}