diff --git a/src/lib/components/layout/Header.svelte b/src/lib/components/layout/Header.svelte index 6510565..5094091 100644 --- a/src/lib/components/layout/Header.svelte +++ b/src/lib/components/layout/Header.svelte @@ -33,12 +33,14 @@
{#if url} -

+

{#if $relay?.info?.icon} {/if} - { url } + + { url } + @@ -56,6 +58,6 @@
- +

\ No newline at end of file diff --git a/src/lib/components/partials/login.svelte b/src/lib/components/partials/login.svelte index 251877a..e8e760c 100644 --- a/src/lib/components/partials/login.svelte +++ b/src/lib/components/partials/login.svelte @@ -44,7 +44,7 @@ {#if browser && window?.nostr}
{#if mrp?.ndk && (typeof mrp?.ndk?.user === 'undefined' || mrp?.ndk?.user === null)} - + {:else if mrp?.ndk?.user?.profile}
{#if userIsOperator} diff --git a/src/lib/core/MRPNostr.ts b/src/lib/core/MRPNostr.ts index 6f1dc50..129f8ee 100644 --- a/src/lib/core/MRPNostr.ts +++ b/src/lib/core/MRPNostr.ts @@ -73,7 +73,8 @@ export class MRPNostr { this.user.relayList.created_at = undefined this.user.relayList.id = "" this.user.relayList.tags.push([ 'r', relay ]) - const publishToRelays = NDKRelaySet.fromRelayUrls([...(this.user.relayList.writeRelayUrls|| []), relay], this.$) + console.log('joinRelay', this.user.relayList.writeRelayUrls) + const publishToRelays = NDKRelaySet.fromRelayUrls([...(this.user.relayList.writeRelayUrls|| []), relay], this?.$?.ndk as NDK) await this.user.relayList.publish(publishToRelays) //console.log('joined relay') } @@ -85,7 +86,8 @@ export class MRPNostr { this.user.relayList.created_at = undefined this.user.relayList.id = "" this.user.relayList.tags = this.user.relayList.tags.filter( tag => tag[1] !== relay ) - const publishToRelays = NDKRelaySet.fromRelayUrls([...(this.user.relayList.writeRelayUrls|| []), relay], this.$) + console.log('leaveRelay', this.user.relayList.writeRelayUrls) + const publishToRelays = NDKRelaySet.fromRelayUrls([...(this.user.relayList.writeRelayUrls|| []), relay], this?.$?.ndk as NDK) await this.user.relayList.publish(publishToRelays) //console.log('left relay') }