From 5d0fb4d41ccce0d29431d75c4d9e0583a8dfc202 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Thu, 4 Jul 2019 18:47:45 -0400 Subject: [PATCH] don't save large attachments that sneak in --- activity.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/activity.go b/activity.go index 6e14100..ac152ef 100644 --- a/activity.go +++ b/activity.go @@ -180,6 +180,10 @@ func savedonk(url string, name, media string, localize bool) *Donk { } data = img.Data media = "image/" + img.Format + } else if len(data) > 100000 { + log.Printf("not saving large attachment") + localize = false + data = []byte{} } } saveit: