summaryrefslogtreecommitdiff
path: root/internal/web
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/web
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/web')
-rw-r--r--internal/web/opengraph.go4
1 files changed, 3 insertions, 1 deletions
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