From 7cce1a7cc65c34906a730a6470369e257e044e04 Mon Sep 17 00:00:00 2001
From: tobi <31960611+tsmethurst@users.noreply.github.com>
Date: Tue, 9 Jan 2024 10:41:32 +0100
Subject: [PATCH] [bugfix] Outdent placeholder from `
-//
+//
+// ℹ️ Note from your.instance.com: 2 attachments in this status could not be downloaded. Treat the following external links with care:
+//
func placeholdUnknownAttachments(arr []*apimodel.Attachment) (string, []*apimodel.Attachment) {
// Extract unknown-type attachments into a separate
// slice, deleting them from arr in the process.
@@ -146,11 +144,12 @@ func placeholdUnknownAttachments(arr []*apimodel.Attachment) (string, []*apimode
links = "links"
}
- var aside strings.Builder
- aside.WriteString(``)
- aside.WriteString(``)
- aside.WriteString(`Note from ` + config.GetHost() + `: ` + attachments + ` in this status could not be downloaded. Treat the following external ` + links + ` with care:`)
- aside.WriteString(`
`)
+ var note strings.Builder
+ note.WriteString(`
`)
+ note.WriteString(``)
+ note.WriteString(`ℹ️ Note from ` + config.GetHost() + `: ` + attachments + ` in this status could not be downloaded. Treat the following external ` + links + ` with care:`)
+ note.WriteString(`
`)
+ note.WriteString(``)
for _, a := range unknowns {
var (
remoteURL = *a.RemoteURL
@@ -160,13 +159,11 @@ func placeholdUnknownAttachments(arr []*apimodel.Attachment) (string, []*apimode
if d := a.Description; d != nil && *d != "" {
entry += ` [` + *d + `]`
}
- aside.WriteString(`- ` + entry + `
`)
+ note.WriteString(`- ` + entry + `
`)
}
- aside.WriteString(`
`)
- aside.WriteString(``)
- aside.WriteString(`
`)
+ note.WriteString(``)
- return text.SanitizeToHTML(aside.String()), arr
+ return text.SanitizeToHTML(note.String()), arr
}
// ContentToContentLanguage tries to