From 233f80fa4a7d5f6ebf9ab2b8eb6391c4fba492b8 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Sat, 25 May 2019 14:34:46 -0400 Subject: [PATCH] log excessive attachment separately --- activity.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/activity.go b/activity.go index c49b023..0d97b38 100644 --- a/activity.go +++ b/activity.go @@ -551,7 +551,9 @@ func xonkxonk(user *WhatAbout, item interface{}, origin string) *Honk { mt, _ := jsongetstring(att, "mediaType") u, _ := jsongetstring(att, "url") name, _ := jsongetstring(att, "name") - if i < 4 && (at == "Document" || at == "Image") { + if i > 4 { + log.Printf("excessive attachment: %s", at) + } else if at == "Document" || at == "Image" { mt = strings.ToLower(mt) log.Printf("attachment: %s %s", mt, u) if mt == "image/jpeg" || mt == "image/png" ||