khatru: fix GetAuthed() boolean return value.

This commit is contained in:
fiatjaf
2025-05-08 12:36:55 -03:00
parent c0934e0639
commit cafcfc6bcc

View File

@@ -33,7 +33,7 @@ func GetConnection(ctx context.Context) *WebSocket {
func GetAuthed(ctx context.Context) (nostr.PubKey, bool) {
if conn := GetConnection(ctx); conn != nil {
return conn.AuthedPublicKey, true
return conn.AuthedPublicKey, conn.AuthedPublicKey != nostr.ZeroPK
}
if nip86Auth := ctx.Value(nip86HeaderAuthKey); nip86Auth != nil {
return nip86Auth.(nostr.PubKey), true