mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-29 08:21:20 +00:00
Fix spread error, allow re-fetching group meta
This commit is contained in:
parent
1ae96395d1
commit
dd3910b15d
@ -32,7 +32,7 @@
|
||||
|
||||
for (const {address, relay} of parsedGroups) {
|
||||
if (relay) {
|
||||
groupHints.update($gh => ({...$gh, [address]: [...$gh[address], relay]}))
|
||||
groupHints.update($gh => ({...$gh, [address]: [...($gh[address] || []), relay]}))
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -67,8 +67,6 @@ import {loadPubkeyRelays} from "src/engine/requests/pubkeys"
|
||||
|
||||
export * from "src/engine/requests/pubkeys"
|
||||
|
||||
export const attemptedAddrs = new Map()
|
||||
|
||||
export const addSinceToFilter = (filter, overlap = seconds(1, "hour")) => {
|
||||
const limit = 50
|
||||
const events = repository.query([{...filter, limit}])
|
||||
@ -136,6 +134,8 @@ export const loadZapper = cached({
|
||||
getValue: ([handle]) => fetchZapper(handle),
|
||||
})
|
||||
|
||||
export const attemptedAddrs = new Map()
|
||||
|
||||
export const getStaleAddrs = (addrs: string[]) => {
|
||||
const stale = new Set<string>()
|
||||
|
||||
@ -146,11 +146,7 @@ export const getStaleAddrs = (addrs: string[]) => {
|
||||
continue
|
||||
}
|
||||
|
||||
const meta = get(deriveGroupMeta(addr))
|
||||
|
||||
if (!meta) {
|
||||
stale.add(addr)
|
||||
}
|
||||
stale.add(addr)
|
||||
|
||||
attemptedAddrs.set(addr, attempts + 1)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user