[feature] Parse content warning as HTML, serialize via API to plaintext

This commit is contained in:
tobi 2025-03-06 15:36:58 +01:00
commit 22ce924129
47 changed files with 947 additions and 553 deletions

View file

@ -361,10 +361,10 @@ func formatNotificationBody(apiNotification *apimodel.Notification) string {
if apiNotification.Status.SpoilerText != "" {
body = apiNotification.Status.SpoilerText
} else {
body = text.SanitizeToPlaintext(apiNotification.Status.Content)
body = text.RemoveHTML(apiNotification.Status.Content)
}
} else {
body = text.SanitizeToPlaintext(apiNotification.Account.Note)
body = text.RemoveHTML(apiNotification.Account.Note)
}
return firstNBytesTrimSpace(body, bodyMaxLen)
}