diff --git a/src/app/views/Onboarding.svelte b/src/app/views/Onboarding.svelte index 824319a4..4075f0aa 100644 --- a/src/app/views/Onboarding.svelte +++ b/src/app/views/Onboarding.svelte @@ -1,6 +1,6 @@
-

+

1/4

New to Nostr?

diff --git a/src/app/views/OnboardingNote.svelte b/src/app/views/OnboardingNote.svelte index 3e6a42d5..e42446b8 100644 --- a/src/app/views/OnboardingNote.svelte +++ b/src/app/views/OnboardingNote.svelte @@ -19,7 +19,7 @@

+ class="-ml-1 -mt-2 flex h-12 w-12 items-center justify-center rounded-full bg-neutral-700 text-lg"> 4/4

You're all set!

diff --git a/src/app/views/OnboardingProfile.svelte b/src/app/views/OnboardingProfile.svelte index e1036e92..eca3e1aa 100644 --- a/src/app/views/OnboardingProfile.svelte +++ b/src/app/views/OnboardingProfile.svelte @@ -34,7 +34,7 @@
-

+

2/4

Give us something to go on!

diff --git a/src/engine/groups/requests.ts b/src/engine/groups/requests.ts index a55fe694..01c2b4a0 100644 --- a/src/engine/groups/requests.ts +++ b/src/engine/groups/requests.ts @@ -4,6 +4,7 @@ import {partition} from "ramda" import {noteKinds, giftWrapKinds, repostKinds} from "src/util/nostr" import {load} from "src/engine/network/utils" import {hints} from "src/engine/relays/utils" +import {env} from "src/engine/session/state" import {updateCurrentSession} from "src/engine/session/commands" import {groups} from "./state" import {deriveUserCircles, getGroupReqInfo, getCommunityReqInfo} from "./utils" @@ -40,7 +41,11 @@ export const loadGroups = async (rawAddrs: string[], relays: string[] = []) => { if (addrs.length > 0) { load({ relays: hints - .merge([hints.scenario([relays]), hints.WithinMultipleContexts(addrs)]) + .merge([ + hints.scenario([relays]), + hints.WithinMultipleContexts(addrs), + hints.scenario([env.get().PLATFORM_RELAYS]), + ]) .getUrls(), filters: [{kinds: [34550, 35834], authors, "#d": identifiers}], }) diff --git a/src/engine/groups/utils.ts b/src/engine/groups/utils.ts index 3de8a6a2..aa882074 100644 --- a/src/engine/groups/utils.ts +++ b/src/engine/groups/utils.ts @@ -3,7 +3,7 @@ import {ellipsize, seconds} from "hurdak" import {Tags, decodeAddress, addressToNaddr} from "paravel" import {fuzzy} from "src/util/misc" import type {GroupStatus, Session} from "src/engine/session/model" -import {pubkey} from "src/engine/session/state" +import {env, pubkey} from "src/engine/session/state" import {session} from "src/engine/session/derived" import {hints} from "src/engine/relays/utils" import {groups, groupSharedKeys, groupAdminKeys} from "./state" @@ -72,7 +72,9 @@ export const getGroupReqInfo = (address = null) => { recipients.push(key.pubkey) } - const relays = hints.merge(addresses.map(hints.WithinContext)).getUrls() + const relays = hints + .merge([hints.WithinMultipleContexts(addresses), hints.scenario([env.get().PLATFORM_RELAYS])]) + .getUrls() return {admins, recipients, relays, since} } diff --git a/src/engine/network/utils/pubkeys.ts b/src/engine/network/utils/pubkeys.ts index 9a8db661..5a163c1f 100644 --- a/src/engine/network/utils/pubkeys.ts +++ b/src/engine/network/utils/pubkeys.ts @@ -1,3 +1,4 @@ +import type {Event} from "nostr-tools" import {without, uniq} from "ramda" import {seconds} from "hurdak" import {now} from "paravel" @@ -11,6 +12,7 @@ export type LoadPeopleOpts = { relays?: string[] kinds?: number[] force?: boolean + onEvent?: (e: Event) => void } export const attemptedPubkeys = new Map() @@ -48,7 +50,7 @@ export const getStalePubkeys = (pubkeys: Iterable) => { export const loadPubkeys = async ( rawPubkeys: Iterable, - {relays, force, kinds = personKinds}: LoadPeopleOpts = {}, + {relays, force, onEvent, kinds = personKinds}: LoadPeopleOpts = {}, ) => { const pubkeys = force ? uniq(Array.from(rawPubkeys)) : getStalePubkeys(rawPubkeys) @@ -68,6 +70,7 @@ export const loadPubkeys = async ( return load({ filters, + onEvent, relays: hints.merge([hints.scenario([relays]), hints.FromPubkeys(pubkeys)]).getUrls(), }) }