mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2025-05-03 18:38:46 +00:00
Show content warning in status
This commit is contained in:
parent
2648484a1d
commit
df875381d4
2 changed files with 5 additions and 2 deletions
|
@ -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+"\" />")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue