From ef3535831972e38cb9d23a49a17992f5ed89a686 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Sun, 22 Oct 2023 09:31:29 -0300 Subject: [PATCH] get rid of fallback for cache. --- nostr.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/nostr.go b/nostr.go index 787aeb1..f5cad4c 100644 --- a/nostr.go +++ b/nostr.go @@ -66,14 +66,8 @@ func getRelay() string { func getEvent(ctx context.Context, code string) (*nostr.Event, []string, error) { if b, ok := cache.Get(code); ok { - // at this point `b` may be a StoredEvent json or an old naked Event json - // TODO: after a week we can assume everything will be StoredEvent, so we can simplify this v := CachedEvent{} err := json.Unmarshal(b, &v) - if v.Event == nil { - v.Event = &nostr.Event{} - err = json.Unmarshal(b, v.Event) - } return v.Event, v.Relays, err }