From f7cd268fe29dc6a37bee06bdcbb56f3aad5fc532 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Thu, 24 Aug 2023 11:54:10 -0400 Subject: [PATCH] add some logging for unexpected activities --- web.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/web.go b/web.go index 918634a..e88e35f 100644 --- a/web.go +++ b/web.go @@ -449,7 +449,20 @@ func inbox(w http.ResponseWriter, r *http.Request) { 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!") + } } }