mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-30 00:41:12 +00:00
Fix group loading
This commit is contained in:
parent
a23f71d307
commit
058a99b372
@ -160,7 +160,7 @@ projections.addHandler(34550, (e: TrustedEvent) => {
|
|||||||
meta: {
|
meta: {
|
||||||
name: meta.name,
|
name: meta.name,
|
||||||
about: meta.description,
|
about: meta.description,
|
||||||
banner: meta.image,
|
banner: meta.banner,
|
||||||
picture: meta.image,
|
picture: meta.image,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -140,18 +140,13 @@ export const getStaleAddrs = (addrs: string[]) => {
|
|||||||
|
|
||||||
for (const addr of addrs) {
|
for (const addr of addrs) {
|
||||||
const attempts = attemptedAddrs.get(addr) | 0
|
const attempts = attemptedAddrs.get(addr) | 0
|
||||||
|
const group = groups.key(addr).get()
|
||||||
|
|
||||||
if (attempts > 1) {
|
if (!group?.meta || attempts === 0) {
|
||||||
continue
|
stale.add(addr)
|
||||||
}
|
}
|
||||||
|
|
||||||
attemptedAddrs.set(addr, attempts + 1)
|
attemptedAddrs.set(addr, attempts + 1)
|
||||||
|
|
||||||
const group = groups.key(addr).get()
|
|
||||||
|
|
||||||
if (!group?.meta) {
|
|
||||||
stale.add(addr)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return Array.from(stale)
|
return Array.from(stale)
|
||||||
|
Loading…
Reference in New Issue
Block a user