all repos — honk @ 490c069bb66f0163d84a4a6d1693bf11b1ea9525

my fork of honk

try logging only unknown activities for a while
Ted Unangst tedu@tedunangst.com
Tue, 07 May 2019 20:55:11 -0400
commit

490c069bb66f0163d84a4a6d1693bf11b1ea9525

parent

c677ac16b180eb86c7c15637bbc23b01f9e711ce

2 files changed, 5 insertions(+), 9 deletions(-)

jump to
M activity.goactivity.go

@@ -494,6 +494,10 @@ rid, _ = jsongetstring(item, "object")

what = "eradicate" default: log.Printf("unknown activity: %s", what) + fd, _ := os.OpenFile("savedinbox.json", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666) + WriteJunk(fd, item.(map[string]interface{})) + io.WriteString(fd, "\n") + fd.Close() return nil }
M honk.gohonk.go

@@ -293,11 +293,6 @@ if keyname != "" {

keyname, err = makeitworksomehowwithoutregardforkeycontinuity(keyname, r, payload) } if err != nil { - fd, _ := os.OpenFile("savedinbox.json", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666) - io.WriteString(fd, "bad signature:\n") - WriteJunk(fd, j) - io.WriteString(fd, "\n") - fd.Close() return } }

@@ -315,10 +310,6 @@ if thoudostbitethythumb(user.ID, []string{who}, objid) {

log.Printf("ignoring thumb sucker %s", who) return } - fd, _ := os.OpenFile("savedinbox.json", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666) - WriteJunk(fd, j) - io.WriteString(fd, "\n") - fd.Close() switch what { case "Ping": obj, _ := jsongetstring(j, "id")

@@ -357,6 +348,7 @@ log.Printf("error updating honker: %s", err)

return } case "Like": + case "Announce": default: log.Printf("unknown undo: %s", what) }