From 6a26b1880fdf662d872f4326b4a86cf55f047c40 Mon Sep 17 00:00:00 2001 From: Barry Deen Date: Wed, 16 Oct 2024 19:54:00 -0400 Subject: [PATCH] remove kind 4 support --- main.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 397e491..da5bdbb 100644 --- a/main.go +++ b/main.go @@ -140,7 +140,6 @@ func makeNewRelay(relayType string, w http.ResponseWriter, r *http.Request) *kha }) allowedKinds := []int{ - nostr.KindEncryptedDirectMessage, nostr.KindSimpleGroupAddPermission, nostr.KindSimpleGroupAddUser, nostr.KindSimpleGroupAdmins, @@ -170,7 +169,7 @@ func makeNewRelay(relayType string, w http.ResponseWriter, r *http.Request) *kha } } - return true, "only direct messages are allowed in this relay" + return true, "only gift wrapped DMs are allowed" }) mux := chatRelay.Router() @@ -205,6 +204,10 @@ func makeNewRelay(relayType string, w http.ResponseWriter, r *http.Request) *kha return true, "you must be in the web of trust to post to this relay" } + if event.Kind == nostr.KindEncryptedDirectMessage { + return true, "only gift wrapped DMs are supported" + } + for _, tag := range event.Tags.GetAll([]string{"p"}) { if tag[1] == inboxRelay.Info.PubKey { return false, ""