Compare commits

..

No commits in common. "main" and "1.2" have entirely different histories.
main ... 1.2

2 changed files with 7 additions and 7 deletions

View File

@ -22,6 +22,11 @@ import (
"time"
)
type OriginalBlog struct {
Id string `json:"id"`
Author Account `json:"account"`
}
type Blog struct {
Id string `json:"id"`
Content string `json:"content"`
@ -29,7 +34,7 @@ type Blog struct {
Author Account `json:"account"`
Tags []Tag `json:"tags"`
Mentions []Mention `json:"mentions"`
Reblog *Blog `json:"reblog"`
Reblog *OriginalBlog `json:"reblog"`
Medias []Media `json:"media_attachments"`
}

View File

@ -89,12 +89,7 @@ func removeHTMLTags(content string) string {
}
func formatBlog(toot Blog) string {
var content string
if toot.Reblog == nil {
content = toot.Content
} else {
content = toot.Reblog.Content
}
content := toot.Content
content = removeHTMLTags(content)
content = strings.Trim(content, " \n\r")
content = strings.ReplaceAll(content, "\n#", "\n[#]")