mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[bugfix] Fix web media not showing as sensitive (#2433)
* [bugfix] Fix web media not showing as sensitive * test * go fmt
This commit is contained in:
@ -111,11 +111,11 @@ func misskeyReportInlineURLs(content string) []*url.URL {
|
||||
// </ul>
|
||||
// </p>
|
||||
// </aside>
|
||||
func placeholdUnknownAttachments(arr []apimodel.Attachment) (string, []apimodel.Attachment) {
|
||||
func placeholdUnknownAttachments(arr []*apimodel.Attachment) (string, []*apimodel.Attachment) {
|
||||
// Extract unknown-type attachments into a separate
|
||||
// slice, deleting them from arr in the process.
|
||||
var unknowns []apimodel.Attachment
|
||||
arr = slices.DeleteFunc(arr, func(elem apimodel.Attachment) bool {
|
||||
var unknowns []*apimodel.Attachment
|
||||
arr = slices.DeleteFunc(arr, func(elem *apimodel.Attachment) bool {
|
||||
unknown := elem.Type == "unknown"
|
||||
if unknown {
|
||||
// Set aside unknown-type attachment.
|
||||
|
Reference in New Issue
Block a user