all repos — honk @ ccfcaac0c06d34da8fe7f54b6dbeefc4c280bfee

my fork of honk

support a few more actor types
Ted Unangst tedu@tedunangst.com
Wed, 10 Jul 2019 01:21:56 -0400
commit

ccfcaac0c06d34da8fe7f54b6dbeefc4c280bfee

parent

34e2004eac07b14b178bc52f099f03f15919ae3e

2 files changed, 14 insertions(+), 3 deletions(-)

jump to
M activity.goactivity.go

@@ -977,6 +977,17 @@ handlock.Unlock()

return "" } +func isactor(t string) bool { + switch t { + case "Person": + case "Application": + case "Service": + default: + return false + } + return true +} + func investigate(name string) string { if name == "" { return ""

@@ -993,10 +1004,10 @@ log.Printf("error investigating honker: %s", err)

return "" } t, _ := obj.GetString("type") - id, _ := obj.GetString("id") - if t != "Person" { + if !isactor(t) { log.Printf("it's not a person! %s", name) return "" } + id, _ := obj.GetString("id") return id }
M honk.gohonk.go

@@ -438,7 +438,7 @@ u := login.GetUserInfo(r)

user, _ := butwhatabout(u.Username) what, _ := j.GetString("type") - if what == "Person" { + if isactor(what) { outbox, _ := j.GetString("outbox") gimmexonks(user, outbox) http.Redirect(w, r, "/h?xid="+url.QueryEscape(xid), http.StatusSeeOther)