fix: dedupe people pubkey lists to prevent keyed each duplicate crash

This commit is contained in:
Bhavishy
2026-04-08 00:10:15 +05:30
parent 436ced8dd7
commit 5c5ab2fedb
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -259,8 +259,9 @@ export const pubkeyLink = (pubkey: string, relays = Router.get().FromPubkeys([pu
export const bootstrapPubkeys = derived(userFollowList, $userFollowList => {
const appPubkeys = DEFAULT_PUBKEYS.split(",")
const userPubkeys = shuffle(getPubkeyTagValues(getListTags($userFollowList)))
const mergedPubkeys = userPubkeys.length > 5 ? userPubkeys : [...userPubkeys, ...appPubkeys]
return userPubkeys.length > 5 ? userPubkeys : [...userPubkeys, ...appPubkeys]
return uniq(mergedPubkeys)
})
export const deriveEvent = makeDeriveEvent({