From 3459fcc4e92c2ef5b770a68698f53551bbcab61e Mon Sep 17 00:00:00 2001 From: Barry Deen Date: Tue, 29 Oct 2024 18:50:36 -0400 Subject: [PATCH] reject upload --- main.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main.go b/main.go index 10d61cd..0c41c21 100644 --- a/main.go +++ b/main.go @@ -306,13 +306,13 @@ func makeNewRelay(relayType string, w http.ResponseWriter, r *http.Request) *kha bl.DeleteBlob = append(bl.DeleteBlob, func(ctx context.Context, sha256 string) error { return fs.Remove(config.BlossomPath + sha256) }) - // bl.RejectUpload = append(bl.RejectUpload, func(ctx context.Context, event *nostr.Event, size int, ext string) (bool, string, int) { - // if event.PubKey == nPubToPubkey(config.OwnerNpub) { - // return false, ext, size - // } + bl.RejectUpload = append(bl.RejectUpload, func(ctx context.Context, event *nostr.Event, size int, ext string) (bool, string, int) { + if event.PubKey == nPubToPubkey(config.OwnerNpub) { + return false, ext, size + } - // return true, "only notes signed by the owner of this relay are allowed", 0 - // }) + return true, "only notes signed by the owner of this relay are allowed", 0 + }) return outboxRelay }