mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[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
This commit is contained in:
@ -607,9 +607,17 @@ func (c *Converter) StatusToAS(ctx context.Context, s *gtsmodel.Status) (ap.Stat
|
||||
// conversation
|
||||
// TODO
|
||||
|
||||
// content -- the actual post itself
|
||||
// content -- the actual post
|
||||
// itself, plus the language
|
||||
contentProp := streams.NewActivityStreamsContentProperty()
|
||||
contentProp.AppendXMLSchemaString(s.Content)
|
||||
|
||||
if s.Language != "" {
|
||||
contentProp.AppendRDFLangString(map[string]string{
|
||||
s.Language: s.Content,
|
||||
})
|
||||
}
|
||||
|
||||
status.SetActivityStreamsContent(contentProp)
|
||||
|
||||
// attachments
|
||||
|
Reference in New Issue
Block a user