sdk: fix for when we have no record of ever trying to fetch replaceables.
This commit is contained in:
@@ -68,7 +68,7 @@ func fetchGenericList[I TagItemWithValue](
|
||||
// but if we haven't tried fetching from the network recently we should do it
|
||||
lastFetchKey := makeLastFetchKey(actualKind, pubkey)
|
||||
lastFetchData, _ := sys.KVStore.Get(lastFetchKey)
|
||||
if nostr.Now()-decodeTimestamp(lastFetchData) > 7*24*60*60 {
|
||||
if lastFetchData == nil || nostr.Now()-decodeTimestamp(lastFetchData) > 7*24*60*60 {
|
||||
newV := tryFetchListFromNetwork(ctx, sys, pubkey, replaceableIndex, parseTag)
|
||||
if newV != nil && newV.Event.CreatedAt > v.Event.CreatedAt {
|
||||
v = *newV
|
||||
|
||||
Reference in New Issue
Block a user