mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-18 19:23:40 +00:00
Add bech32-provided relays to person detail feeds
This commit is contained in:
parent
4edefc216f
commit
5e15015cab
@ -1,5 +1,6 @@
|
||||
# Current
|
||||
|
||||
- [ ] Fix tag-style event mentions. Probably transform all mentions into entities in parse
|
||||
- [ ] Fix performance issues
|
||||
- [ ] https://github.com/techfort/LokiJS
|
||||
- Use indexed adapter github.com/techfort/LokiJS/blob/master/tutorials/Persistence%20Adapters.md and partitioning adapter
|
||||
|
@ -87,7 +87,7 @@
|
||||
|
||||
// When we get an AUTH challenge from our pool, attempt to authenticate
|
||||
pool.Config.authHandler = async (url, challenge) => {
|
||||
if (!seenChallenges.has(challenge)) {
|
||||
if (keys.canSign() && !seenChallenges.has(challenge)) {
|
||||
seenChallenges.add(challenge)
|
||||
|
||||
const publishable = await cmd.authenticate(url, challenge)
|
||||
|
@ -5,7 +5,7 @@
|
||||
import {warn} from "src/util/logger"
|
||||
import Content from "src/partials/Content.svelte"
|
||||
import NoteDetail from "src/views/notes/NoteDetail.svelte"
|
||||
import Person from "src/routes/PersonDetail.svelte"
|
||||
import PersonDetail from "src/routes/PersonDetail.svelte"
|
||||
import {sampleRelays} from "src/agent/relays"
|
||||
|
||||
export let entity
|
||||
@ -31,9 +31,9 @@
|
||||
<NoteDetail note={{id: data}} />
|
||||
</Content>
|
||||
{:else if type === "nprofile"}
|
||||
<Person npub={nip19.npubEncode(data.pubkey)} {relays} activeTab="notes" />
|
||||
<PersonDetail npub={nip19.npubEncode(data.pubkey)} {relays} activeTab="notes" />
|
||||
{:else if type === "npub"}
|
||||
<Person npub={entity} activeTab="notes" />
|
||||
<PersonDetail npub={entity} activeTab="notes" />
|
||||
{:else}
|
||||
<Content size="lg" class="text-center">
|
||||
<div>Sorry, we weren't able to find "{entity}".</div>
|
||||
|
@ -101,7 +101,7 @@
|
||||
document.title = displayPerson(person)
|
||||
|
||||
// Refresh our person
|
||||
network.loadPeople([pubkey], {force: true}).then(() => {
|
||||
network.loadPeople([pubkey], {relays, force: true}).then(() => {
|
||||
ownRelays = getPubkeyWriteRelays(pubkey)
|
||||
person = getPersonWithFallback(pubkey)
|
||||
loading = false
|
||||
@ -210,9 +210,9 @@
|
||||
<Tabs {tabs} {activeTab} {setActiveTab} />
|
||||
|
||||
{#if activeTab === "notes"}
|
||||
<Notes {pubkey} />
|
||||
<Notes {pubkey} {relays} />
|
||||
{:else if activeTab === "likes"}
|
||||
<Likes {pubkey} />
|
||||
<Likes {pubkey} {relays} />
|
||||
{:else if activeTab === "relays"}
|
||||
{#if ownRelays.length > 0}
|
||||
<Relays relays={ownRelays} />
|
||||
|
@ -2,11 +2,10 @@
|
||||
import Feed from "src/views/feed/Feed.svelte"
|
||||
import {isLike} from "src/util/nostr"
|
||||
import {timedelta} from "src/util/misc"
|
||||
import {sampleRelays, getPubkeyWriteRelays} from "src/agent/relays"
|
||||
|
||||
export let pubkey
|
||||
export let relays
|
||||
|
||||
const relays = sampleRelays(getPubkeyWriteRelays(pubkey))
|
||||
const filter = {kinds: [7], authors: [pubkey]}
|
||||
const shouldDisplay = e => isLike(e.content)
|
||||
</script>
|
||||
|
@ -1,11 +1,10 @@
|
||||
<script lang="ts">
|
||||
import {timedelta} from "src/util/misc"
|
||||
import Feed from "src/views/feed/Feed.svelte"
|
||||
import {sampleRelays, getPubkeyWriteRelays} from "src/agent/relays"
|
||||
|
||||
export let pubkey
|
||||
export let relays
|
||||
|
||||
const relays = sampleRelays(getPubkeyWriteRelays(pubkey))
|
||||
const filter = {kinds: [1], authors: [pubkey]}
|
||||
</script>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user