mirror of
https://github.com/coracle-social/flotilla.git
synced 2025-12-10 10:57:04 +00:00
Improve relay broadcasting and use
This commit is contained in:
@@ -241,7 +241,7 @@ export const setRelayPolicy = (url: string, read: boolean, write: boolean) => {
|
||||
|
||||
return publishThunk({
|
||||
event: createEvent(list.kind, {tags}),
|
||||
relays: ctx.app.router.FromUser().getUrls(),
|
||||
relays: [...INDEXER_RELAYS, ...ctx.app.router.FromUser().getUrls()],
|
||||
}).result
|
||||
}
|
||||
|
||||
@@ -258,7 +258,7 @@ export const setInboxRelayPolicy = (url: string, enabled: boolean) => {
|
||||
|
||||
return publishThunk({
|
||||
event: createEvent(list.kind, {tags}),
|
||||
relays: ctx.app.router.FromUser().getUrls(),
|
||||
relays: [...INDEXER_RELAYS, ...ctx.app.router.FromUser().getUrls()],
|
||||
}).result
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
import {derived} from "svelte/store"
|
||||
import {int, MINUTE, sortBy, remove} from "@welshman/lib"
|
||||
import type {TrustedEvent, EventContent} from "@welshman/util"
|
||||
import {createEvent, DIRECT_MESSAGE} from "@welshman/util"
|
||||
import {createEvent, DIRECT_MESSAGE, INBOX_RELAYS} from "@welshman/util"
|
||||
import {
|
||||
pubkey,
|
||||
formatTimestampAsDate,
|
||||
inboxRelaySelectionsByPubkey,
|
||||
loadInboxRelaySelections,
|
||||
load,
|
||||
tagPubkey,
|
||||
} from "@welshman/app"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
@@ -95,8 +95,9 @@
|
||||
elements.reverse()
|
||||
}
|
||||
|
||||
onMount(async () => {
|
||||
await Promise.all(others.map(pk => loadInboxRelaySelections(pk)))
|
||||
onMount(() => {
|
||||
// Don't use loadInboxRelaySelections because we want to force reload
|
||||
load({filters: [{kinds: [INBOX_RELAYS], authors: others}]})
|
||||
})
|
||||
|
||||
setTimeout(() => {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
import "@src/app.css"
|
||||
import {onMount} from "svelte"
|
||||
import {nip19} from "nostr-tools"
|
||||
import {get, derived} from "svelte/store"
|
||||
import {page} from "$app/stores"
|
||||
import {dev} from "$app/environment"
|
||||
@@ -71,7 +72,7 @@
|
||||
let ready: Promise<unknown> = Promise.resolve()
|
||||
|
||||
onMount(async () => {
|
||||
Object.assign(window, {get, ...lib, ...util, ...net, ...app, ...state, ...notifications})
|
||||
Object.assign(window, {get, nip19, ...lib, ...util, ...net, ...app, ...state, ...notifications})
|
||||
|
||||
const getScoreEvent = () => {
|
||||
const ALWAYS_KEEP = Infinity
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
<Collapse class="card2 bg-alt column gap-4">
|
||||
<h2 slot="title" class="flex items-center gap-3 text-xl">
|
||||
<Icon icon="earth" />
|
||||
Broadcast Relays
|
||||
Outbox Relays
|
||||
</h2>
|
||||
<p slot="description" class="text-sm">
|
||||
These relays will be advertised on your profile as places where you send your public notes. Be
|
||||
|
||||
Reference in New Issue
Block a user