all repos — honk @ 9447d067132c6eb078f0d89114999ce8b48c8d0b

my fork of honk

retouch the server inbox
Ted Unangst tedu@tedunangst.com
Tue, 18 Feb 2020 12:43:32 -0500
commit

9447d067132c6eb078f0d89114999ce8b48c8d0b

parent

4a2eaddaf5dd2712c4a821c6b169d1f8fab27676

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

jump to
M web.goweb.go

@@ -455,7 +455,8 @@ }

} func serverinbox(w http.ResponseWriter, r *http.Request) { - if stealthmode(serverUID, r) { + user := getserveruser() + if stealthmode(user.ID, r) { http.NotFound(w, r) return }

@@ -489,7 +490,6 @@ }

http.Error(w, "what did you call me?", http.StatusTeapot) return } - user := getserveruser() who, _ := j.GetString("actor") origin := keymatch(keyname, who) if origin == "" {

@@ -557,11 +557,11 @@ }

} func serveractor(w http.ResponseWriter, r *http.Request) { - if stealthmode(serverUID, r) { + user := getserveruser() + if stealthmode(user.ID, r) { http.NotFound(w, r) return } - user := getserveruser() j := junkuser(user) w.Write(j) }

@@ -2342,6 +2342,7 @@ getters.HandleFunc("/.well-known/webfinger", fingerlicker)

getters.HandleFunc("/server", serveractor) posters.HandleFunc("/server/inbox", serverinbox) + posters.HandleFunc("/inbox", serverinbox) getters.HandleFunc("/style.css", serveasset) getters.HandleFunc("/local.css", serveasset)