summaryrefslogtreecommitdiff
path: root/internal/typeutils/internaltofrontend.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-12-05 12:43:07 +0100
committerLibravatar GitHub <noreply@github.com>2023-12-05 12:43:07 +0100
commitdacfd413dcfc5ead5d019efbe45059f2f6922696 (patch)
tree9b028b31d16eb90a5cf0697617e50ab1b0b7fa74 /internal/typeutils/internaltofrontend.go
parent[chore]: Bump go.opentelemetry.io/otel/exporters/prometheus (#2412) (diff)
downloadgotosocial-dacfd413dcfc5ead5d019efbe45059f2f6922696.tar.xz
[chore/frontend] Refactor status templates slightly, put polls behind CWs if present (#2419)
* [chore/frontend] Reorder templates, allow polls to be inside content warnings * show when multiple-choice
Diffstat (limited to 'internal/typeutils/internaltofrontend.go')
-rw-r--r--internal/typeutils/internaltofrontend.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/typeutils/internaltofrontend.go b/internal/typeutils/internaltofrontend.go
index fe5c8ec8f..b3d263963 100644
--- a/internal/typeutils/internaltofrontend.go
+++ b/internal/typeutils/internaltofrontend.go
@@ -721,6 +721,12 @@ func (c *Converter) StatusToWebStatus(
webStatus.WebPollOptions = webPollOptions
}
+ // Set additional templating
+ // variables on media attachments.
+ for _, a := range webStatus.MediaAttachments {
+ a.Sensitive = webStatus.Sensitive
+ }
+
return webStatus, nil
}