restore function signature of ExtractAttachments

This commit is contained in:
tobi 2025-04-26 15:02:12 +02:00
commit b2f244aa96
3 changed files with 23 additions and 9 deletions

View file

@ -142,7 +142,14 @@ func (f *Filter) StatusableOK(
}
// HEURISTIC 6: Are there any media attachments?
attachments := ap.ExtractAttachments(statusable)
attachments, err := ap.ExtractAttachments(statusable)
if err != nil {
log.Warnf(ctx,
"error(s) extracting attachments for %s: %v",
ap.GetJSONLDId(statusable), err,
)
}
hasAttachments := len(attachments) != 0
if hasAttachments {
err := errors.New("status has attachment(s)")