diff --git a/config.go b/config.go index e6a5f7d..5d9c17f 100644 --- a/config.go +++ b/config.go @@ -62,7 +62,7 @@ func loadConfig() Config { DBEngine: getEnv("DB_ENGINE"), RelayURL: getEnv("RELAY_URL"), RelaySoftware: "https://github.com/bitvora/haven", - RelayVersion: "v0.4.2", + RelayVersion: "v0.4.4", PrivateRelayName: getEnv("PRIVATE_RELAY_NAME"), PrivateRelayNpub: getEnv("PRIVATE_RELAY_NPUB"), PrivateRelayDescription: getEnv("PRIVATE_RELAY_DESCRIPTION"), diff --git a/main.go b/main.go index cfa438a..397e491 100644 --- a/main.go +++ b/main.go @@ -238,10 +238,6 @@ func makeNewRelay(relayType string, w http.ResponseWriter, r *http.Request) *kha return inboxRelay default: // default to outbox - outboxRelay.StoreEvent = append(outboxRelay.StoreEvent, outboxDB.SaveEvent, func(ctx context.Context, event *nostr.Event) error { - go blast(event) - return nil - }) outboxRelay.QueryEvents = append(outboxRelay.QueryEvents, outboxDB.QueryEvents) outboxRelay.DeleteEvent = append(outboxRelay.DeleteEvent, outboxDB.DeleteEvent) @@ -252,6 +248,11 @@ func makeNewRelay(relayType string, w http.ResponseWriter, r *http.Request) *kha return true, "only notes signed by the owner of this relay are allowed" }) + outboxRelay.StoreEvent = append(outboxRelay.StoreEvent, outboxDB.SaveEvent, func(ctx context.Context, event *nostr.Event) error { + go blast(event) + return nil + }) + mux := outboxRelay.Router() mux.HandleFunc(relayType, func(w http.ResponseWriter, r *http.Request) {