aboutsummaryrefslogtreecommitdiff
path: root/renderer
diff options
context:
space:
mode:
Diffstat (limited to 'renderer')
-rw-r--r--renderer/renderer.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/renderer/renderer.go b/renderer/renderer.go
index c9cae28..cabf92d 100644
--- a/renderer/renderer.go
+++ b/renderer/renderer.go
@@ -84,7 +84,10 @@ func EmojiFilter(content string, emojis []mastodon.Emoji) string {
return strings.NewReplacer(replacements...).Replace(content)
}
-func StatusContentFilter(content string, emojis []mastodon.Emoji, mentions []mastodon.Mention) string {
+func StatusContentFilter(spoiler string, content string, emojis []mastodon.Emoji, mentions []mastodon.Mention) string {
+ if len(spoiler) > 0 {
+ content = spoiler + "<br />" + content
+ }
var replacements []string
for _, e := range emojis {
replacements = append(replacements, ":"+e.ShortCode+":", "<img class=\"status-emoji\" src=\""+e.URL+"\" alt=\""+e.ShortCode+"\" />")