From a58015b3e9a1629a6a7827050562d12b503f62ea Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Tue, 6 May 2025 11:57:15 -0300 Subject: [PATCH] sdk: FetchSpecificEvent takes an option SaveToLocalStore that defaults to false. --- sdk/specific_event.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sdk/specific_event.go b/sdk/specific_event.go index 3fe907b..f66ce44 100644 --- a/sdk/specific_event.go +++ b/sdk/specific_event.go @@ -18,8 +18,10 @@ type FetchSpecificEventParameters struct { WithRelays bool // SkipLocalStore indicates whether to skip checking the local store for the event - // and storing the result in the local store. SkipLocalStore bool + + // SaveToLocalStore indicates the result should be saved to local store + SaveToLocalStore bool } // FetchSpecificEventFromInput tries to get a specific event from a NIP-19 code or event ID. @@ -165,7 +167,7 @@ attempts: } // save stuff in cache and in internal store - if !params.SkipLocalStore { + if params.SaveToLocalStore { sys.Publisher.Publish(ctx, *result) }