fix: nostr auth
This commit is contained in:
parent
2fdd3da9d0
commit
1100ea80b6
1 changed files with 1 additions and 6 deletions
|
@ -134,7 +134,7 @@ func NewRelay(version string) *khatru.Relay {
|
|||
relay.DeleteEvent = append(relay.DeleteEvent, RelayDb.DeleteEvent)
|
||||
|
||||
// apply policies
|
||||
policies.ApplySaneDefaults(relay)
|
||||
//policies.ApplySaneDefaults(relay)
|
||||
|
||||
relay.RejectEvent = append(
|
||||
relay.RejectEvent,
|
||||
|
@ -152,11 +152,6 @@ func NewRelay(version string) *khatru.Relay {
|
|||
|
||||
func RejectUnregisteredNpubs(ctx context.Context, event *nostr.Event) (reject bool, msg string) {
|
||||
l := gologger.Get(config.GetConfig().LogLevel).With().Str("context", "nostr-reject-unregistered").Logger()
|
||||
authenticatedUser := khatru.GetAuthed(ctx)
|
||||
|
||||
if authenticatedUser == "" {
|
||||
return true, fmt.Sprintf("auth-required: user (%s) not authed", event.PubKey)
|
||||
}
|
||||
|
||||
// reject nip-04 messages to users who aren't registered
|
||||
if event.Kind == 4 {
|
||||
|
|
Loading…
Reference in a new issue