move nostr-sdk repository into here because why not?
This commit is contained in:
21
sdk/helpers.go
Normal file
21
sdk/helpers.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package sdk
|
||||
|
||||
import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// IsVirtualRelay returns true if the given normalized relay URL shouldn't be considered for outbox-model calculations.
|
||||
func IsVirtualRelay(url string) bool {
|
||||
if len(url) < 6 {
|
||||
// this is just invalid
|
||||
return true
|
||||
}
|
||||
|
||||
if strings.HasPrefix(url, "wss://feeds.nostr.band") ||
|
||||
strings.HasPrefix(url, "wss://filter.nostr.wine") ||
|
||||
strings.HasPrefix(url, "wss://cache") {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
Reference in New Issue
Block a user