mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-11 07:57:29 -06:00
[feature] Parse content warning as HTML, serialize via API to plaintext
This commit is contained in:
parent
69461c461b
commit
22ce924129
47 changed files with 947 additions and 553 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue