all repos — honk @ db3aac04ae890fed68c87d7468444e4363d5e900

my fork of honk

only apply attachment limit to localized atts
Ted Unangst tedu@tedunangst.com
Sat, 10 Jun 2023 23:23:11 -0400
commit

db3aac04ae890fed68c87d7468444e4363d5e900

parent

7934597a6db41099ee928fcd5e7b4ef811602d8c

1 files changed, 6 insertions(+), 4 deletions(-)

jump to
M activity.goactivity.go

@@ -871,14 +871,16 @@ if desc == "" {

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)