diff --git a/sdk/list.go b/sdk/list.go index 084f489..8f1028d 100644 --- a/sdk/list.go +++ b/sdk/list.go @@ -94,7 +94,7 @@ func fetchGenericList[V comparable, I TagItemWithValue[V]]( // we'll only save this if we got something which means we found at least one event lastFetchKey := makeLastFetchKey(actualKind, pubkey) sys.KVStore.Set(lastFetchKey, encodeTimestamp(nostr.Now())) - sys.Store.SaveEvent(*v.Event) + sys.Store.ReplaceEvent(*v.Event) } // save cache even if we didn't get anything diff --git a/sdk/metadata.go b/sdk/metadata.go index f5956a2..4fd21bf 100644 --- a/sdk/metadata.go +++ b/sdk/metadata.go @@ -142,7 +142,7 @@ func (sys *System) FetchProfileMetadata(ctx context.Context, pubkey nostr.PubKey if newM := sys.tryFetchMetadataFromNetwork(ctx, pubkey); newM != nil { pm = *newM - sys.Store.SaveEvent(*pm.Event) + sys.Store.ReplaceEvent(*pm.Event) // we'll only save this if we got something which means we found at least one event lastFetchKey := makeLastFetchKey(0, pubkey)