From e173d50570da30f4b2ba8dc4a711f8399b05ebef Mon Sep 17 00:00:00 2001 From: mleku Date: Sat, 24 May 2025 12:02:15 +0100 Subject: [PATCH] debugging auth --- lol/log.go | 2 +- realy/acceptevent.go | 2 +- socketapi/handleMessage.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lol/log.go b/lol/log.go index 18e884c..9ebe16f 100644 --- a/lol/log.go +++ b/lol/log.go @@ -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 } diff --git a/realy/acceptevent.go b/realy/acceptevent.go index ac7a0d7..8ab4813 100644 --- a/realy/acceptevent.go +++ b/realy/acceptevent.go @@ -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 } diff --git a/socketapi/handleMessage.go b/socketapi/handleMessage.go index 89ebbfb..8a0a474 100644 --- a/socketapi/handleMessage.go +++ b/socketapi/handleMessage.go @@ -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