From 1d24c1c28312a5a97746df2e091a0838fa24cb7e Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Thu, 15 Dec 2022 09:41:49 +0100 Subject: [bugfix] Use null for empty api status `language` (#1268) * [bugfix] Use null for empty api status `language` * update swagger docs --- internal/web/opengraph.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'internal/web/opengraph.go') diff --git a/internal/web/opengraph.go b/internal/web/opengraph.go index ce333171e..3456bfdec 100644 --- a/internal/web/opengraph.go +++ b/internal/web/opengraph.go @@ -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 -- cgit v1.2.3