mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-12-15 07:12:11 +01:00
sdk: pubkey feeds, live and past pages.
This commit is contained in:
@@ -28,9 +28,3 @@ func encodeTimestamp(t nostr.Timestamp) []byte {
|
||||
func decodeTimestamp(b []byte) nostr.Timestamp {
|
||||
return nostr.Timestamp(binary.BigEndian.Uint32(b))
|
||||
}
|
||||
|
||||
// shouldRefreshFromNetwork checks if we should try fetching from network
|
||||
func shouldRefreshFromNetwork(lastFetchData []byte) bool {
|
||||
lastFetch := decodeTimestamp(lastFetchData)
|
||||
return nostr.Now()-lastFetch > 7*24*60*60
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user