add some logging for unexpected activities

This commit is contained in:
Ted Unangst 2023-08-24 11:54:10 -04:00
parent 57e34c344d
commit f7cd268fe2
1 changed files with 14 additions and 1 deletions

15
web.go
View File

@ -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!")
}
}
}