From cfefbc08d822cd85787d95dc2ee253e3368826d8 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Tue, 21 Nov 2023 15:13:30 +0100 Subject: [feature] Federate status language in and out (#2366) * [feature] Federate status language in + out * go fmt * tests, little fix * improve comments * unnest a bit * avoid unnecessary nil check * use more descriptive variable for contentMap * prefer instance languages when selecting from contentMap * update docs to reflect lang selection * rename rdfLangString -> rdfLangs * update comments to mention Pollable * iter through slice instead of map --- internal/gtsmodel/status.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'internal/gtsmodel/status.go') diff --git a/internal/gtsmodel/status.go b/internal/gtsmodel/status.go index a009a726d..9b93e34a1 100644 --- a/internal/gtsmodel/status.go +++ b/internal/gtsmodel/status.go @@ -237,3 +237,14 @@ const ( // VisibilityDefault is used when no other setting can be found. VisibilityDefault Visibility = VisibilityUnlocked ) + +// Content models the simple string content +// of a status along with its ContentMap, +// which contains content entries keyed by +// BCP47 language tag. +// +// Content and/or ContentMap may be zero/nil. +type Content struct { + Content string + ContentMap map[string]string +} -- cgit v1.2.3