all repos — honk @ e2c6e21093741f27092b4ff017fff619dd1f0173

my fork of honk

we aren't interested in random reactions
Ted Unangst tedu@tedunangst.com
Wed, 29 Jan 2020 22:33:59 -0500
commit

e2c6e21093741f27092b4ff017fff619dd1f0173

parent

07351e03551fe7c6d243e087542fd1f277281bd2

1 files changed, 4 insertions(+), 5 deletions(-)

jump to
M web.goweb.go

@@ -329,7 +329,8 @@ if crappola(j) {

return } what, _ := j.GetString("type") - if what == "Like" { + obj, _ := j.GetString("object") + if what == "Like" || (what == "EmojiReaction" && originate(obj) != serverName) { return } who, _ := j.GetString("actor")

@@ -361,14 +362,12 @@ }

switch what { case "Ping": - obj, _ := j.GetString("id") - log.Printf("ping from %s: %s", who, obj) + id, _ := j.GetString("id") + log.Printf("ping from %s: %s", who, id) pong(user, who, obj) case "Pong": - obj, _ := j.GetString("object") log.Printf("pong from %s: %s", who, obj) case "Follow": - obj, _ := j.GetString("object") if obj != user.URL { log.Printf("can't follow %s", obj) return