mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[bugfix] Use null for empty api status language
(#1268)
* [bugfix] Use null for empty api status `language` * update swagger docs
This commit is contained in:
@ -508,6 +508,11 @@ func (c *converter) StatusToAPIStatus(ctx context.Context, s *gtsmodel.Status, r
|
||||
interacts = &statusInteractions{}
|
||||
}
|
||||
|
||||
var language *string
|
||||
if s.Language != "" {
|
||||
language = &s.Language
|
||||
}
|
||||
|
||||
apiStatus := &model.Status{
|
||||
ID: s.ID,
|
||||
CreatedAt: util.FormatISO8601(s.CreatedAt),
|
||||
@ -516,7 +521,7 @@ func (c *converter) StatusToAPIStatus(ctx context.Context, s *gtsmodel.Status, r
|
||||
Sensitive: *s.Sensitive,
|
||||
SpoilerText: s.ContentWarning,
|
||||
Visibility: c.VisToAPIVis(ctx, s.Visibility),
|
||||
Language: s.Language,
|
||||
Language: language,
|
||||
URI: s.URI,
|
||||
URL: s.URL,
|
||||
RepliesCount: repliesCount,
|
||||
|
Reference in New Issue
Block a user