mirror of
https://github.com/github-tijlxyz/khatru-pyramid.git
synced 2025-04-19 18:31:18 +00:00
15 lines
277 B
Go
15 lines
277 B
Go
![]() |
package main
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
|
||
|
"github.com/nbd-wtf/go-nostr"
|
||
|
)
|
||
|
|
||
|
func rejectEventsFromUsersNotInWhitelist(ctx context.Context, event *nostr.Event) (reject bool, msg string) {
|
||
|
if isPublicKeyInWhitelist(event.PubKey) {
|
||
|
return false, ""
|
||
|
}
|
||
|
return true, "not authorized"
|
||
|
}
|