debugging auth

This commit is contained in:
2025-05-24 12:02:15 +01:00
parent 767233754a
commit e173d50570
3 changed files with 3 additions and 3 deletions

View File

@@ -318,7 +318,7 @@ func TimeStamper() (s string) {
// GetNLoc returns multiple levels of depth of code location from the current.
func GetNLoc(n int) (output string) {
for ; n > 1; n-- {
output += fmt.Sprintf("%s\n", GetLoc(n))
output += fmt.Sprintf(" %s\n", GetLoc(n))
}
return
}

View File

@@ -111,11 +111,11 @@ func (s *Server) acceptEvent(c context.T, evt *event.T, authedPubkey []byte,
// }
// check the authed pubkey is in the follow list
for pk := range s.followed {
log.I.F("%0x %0x", authedPubkey, []byte(pk))
// allow all events from follows of owners
if bytes.Equal(authedPubkey, []byte(pk)) {
log.I.F("accepting event %0x because %0x on owner follow list",
evt.Id, []byte(pk))
// log.I.S([]byte(pk))
accept = true
return
}

View File

@@ -14,7 +14,7 @@ import (
)
func (a *A) HandleMessage(msg []byte, remote string) {
log.T.F("received message from %s\n%s", remote, msg)
// log.T.F("received message from %s\n%s", remote, msg)
var notice []byte
var err error
var t string