[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:
tobi
2022-12-15 09:41:49 +01:00
committed by GitHub
parent bae73982f7
commit 1d24c1c283
5 changed files with 31 additions and 5 deletions

View File

@ -107,7 +107,9 @@ func (og *ogMeta) withStatus(status *apimodel.Status) *ogMeta {
og.Description = parseDescription(status.Text)
}
og.Locale = status.Language
if status.Language != nil {
og.Locale = *status.Language
}
og.ResourceType = "article"
og.Title = "Post by " + parseTitle(status.Account, og.SiteName)
og.URL = status.URL