all repos — honk @ f8049b65804733f370f4ec67ab3deef455822225

my fork of honk

more than 4 attachments seems execessive, leave the rest off.
Ted Unangst tedu@tedunangst.com
Wed, 01 May 2019 23:13:00 -0400
commit

f8049b65804733f370f4ec67ab3deef455822225

parent

2a3ea5fce90a575158f0c4e76e710bb2fb150777

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M activity.goactivity.go

@@ -518,12 +518,12 @@ if ot == "Tombstone" {

rid, _ = jsongetstring(obj, "id") } atts, _ := jsongetarray(obj, "attachment") - for _, att := range atts { + for i, att := range atts { at, _ := jsongetstring(att, "type") mt, _ := jsongetstring(att, "mediaType") u, _ := jsongetstring(att, "url") name, _ := jsongetstring(att, "name") - if at == "Document" || at == "Image" { + if i < 4 && (at == "Document" || at == "Image") { mt = strings.ToLower(mt) log.Printf("attachment: %s %s", mt, u) if mt == "image/jpeg" || mt == "image/png" ||