mirror of
https://github.com/aljazceru/haven.git
synced 2026-02-11 00:24:19 +01:00
7
main.go
7
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, ""
|
||||
|
||||
Reference in New Issue
Block a user