From d63e3380893f0f8e735e01d192f97fe35b5f5689 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Sat, 10 Jun 2023 23:23:11 -0400 Subject: [PATCH] only apply attachment limit to localized atts --- activity.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/activity.go b/activity.go index 99b61c1..2239407 100644 --- a/activity.go +++ b/activity.go @@ -871,14 +871,16 @@ func xonksaver(user *WhatAbout, item junk.Junk, origin string) *Honk { desc = name } localize := false - if numatts > 4 { - ilog.Printf("excessive attachment: %s", at) - } else if at == "Document" || at == "Image" || (preferorig && at == "Link") { + if at == "Document" || at == "Image" { mt = strings.ToLower(mt) dlog.Printf("attachment: %s %s", mt, u) if mt == "text/plain" || mt == "application/pdf" || strings.HasPrefix(mt, "image") { - localize = true + if numatts > 4 { + ilog.Printf("excessive attachment: %s", at) + } else { + localize = true + } } } else { ilog.Printf("unknown attachment: %s", at)