summaryrefslogtreecommitdiff
path: root/internal/api/model/status.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-12-15 09:41:49 +0100
committerLibravatar GitHub <noreply@github.com>2022-12-15 09:41:49 +0100
commit1d24c1c28312a5a97746df2e091a0838fa24cb7e (patch)
treefc4641db7716520ea4f9db9a50e58f6b354deead /internal/api/model/status.go
parent[docs] Update Apache docs to use 127.0.0.1 instead of localhost (#1266) (diff)
downloadgotosocial-1d24c1c28312a5a97746df2e091a0838fa24cb7e.tar.xz
[bugfix] Use null for empty api status `language` (#1268)
* [bugfix] Use null for empty api status `language` * update swagger docs
Diffstat (limited to 'internal/api/model/status.go')
-rw-r--r--internal/api/model/status.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/api/model/status.go b/internal/api/model/status.go
index e63ea610e..43ec6a387 100644
--- a/internal/api/model/status.go
+++ b/internal/api/model/status.go
@@ -46,8 +46,9 @@ type Status struct {
// example: unlisted
Visibility Visibility `json:"visibility"`
// Primary language of this status (ISO 639 Part 1 two-letter language code).
+ // Will be null if language is not known.
// example: en
- Language string `json:"language"`
+ Language *string `json:"language"`
// ActivityPub URI of the status. Equivalent to the status's activitypub ID.
// example: https://example.org/users/some_user/statuses/01FBVD42CQ3ZEEVMW180SBX03B
URI string `json:"uri"`