log excessive attachment separately

This commit is contained in:
Ted Unangst 2019-05-25 14:34:46 -04:00
parent dcc055ace1
commit 233f80fa4a
1 changed files with 3 additions and 1 deletions

View File

@ -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" ||