all repos — honk @ fc6607ef85f04b58a51df07d6c88c92824a2eceb

my fork of honk

add some logging for unexpected activities
Ted Unangst tedu@tedunangst.com
Thu, 24 Aug 2023 11:54:10 -0400
commit

fc6607ef85f04b58a51df07d6c88c92824a2eceb

parent

185dd8367e76da9883a89d70ed1c72722eb1da20

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

jump to
M web.goweb.go

@@ -449,7 +449,20 @@ content, _ := j.GetString("content")

addreaction(user, obj, who, content) } default: - go xonksaver(user, j, origin) + go saveandcheck(user, j, origin) + } +} + +func saveandcheck(user *WhatAbout, j junk.Junk, origin string) { + xonk := xonksaver(user, j, origin) + if xonk == nil { + return + } + if sname := shortname(user.ID, xonk.Honker); sname == "" { + dlog.Printf("received unexpected activity from %s", xonk.Honker) + if xonk.Whofore == 0 { + dlog.Printf("it's not even for me!") + } } }