a big bundle of conversions and other changes.

This commit is contained in:
fiatjaf
2025-04-15 17:13:57 -03:00
parent f493293be2
commit 2b5b646a62
92 changed files with 852 additions and 2136 deletions

View File

@@ -31,14 +31,14 @@ func GetConnection(ctx context.Context) *WebSocket {
return nil
}
func GetAuthed(ctx context.Context) string {
func GetAuthed(ctx context.Context) (nostr.PubKey, bool) {
if conn := GetConnection(ctx); conn != nil {
return conn.AuthedPublicKey
return conn.AuthedPublicKey, true
}
if nip86Auth := ctx.Value(nip86HeaderAuthKey); nip86Auth != nil {
return nip86Auth.(string)
return nip86Auth.(nostr.PubKey), true
}
return ""
return nostr.ZeroPK, false
}
// IsInternalCall returns true when a call to QueryEvents, for example, is being made because of a deletion