mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-29 00:10:52 +00:00
Only add local relay if relays are specified, force load on person detail page
This commit is contained in:
parent
e162893a65
commit
d7db61a7ab
@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import {identity} from "ramda"
|
||||
import {stripProtocol} from "@welshman/lib"
|
||||
import {REACTION, isShareableRelayUrl} from "@welshman/util"
|
||||
import {REACTION, PROFILE, RELAYS, INBOX_RELAYS, FOLLOWS, isShareableRelayUrl} from "@welshman/util"
|
||||
import {feedFromFilter} from "@welshman/feeds"
|
||||
import {
|
||||
deriveProfile,
|
||||
@ -26,7 +26,7 @@
|
||||
import PersonStats from "src/app/shared/PersonStats.svelte"
|
||||
import PersonCollections from "src/app/shared/PersonCollections.svelte"
|
||||
import {makeFeed} from "src/domain"
|
||||
import {makeZapSplit, userMutes, imgproxy} from "src/engine"
|
||||
import {load, makeZapSplit, userMutes, imgproxy} from "src/engine"
|
||||
import {router} from "src/app/util"
|
||||
|
||||
export let pubkey
|
||||
@ -51,6 +51,9 @@
|
||||
|
||||
document.title = displayProfileByPubkey(pubkey)
|
||||
|
||||
// Force load profile when the user visits the detail page
|
||||
load({filters: [{kinds: [PROFILE, RELAYS, INBOX_RELAYS, FOLLOWS], authors: [pubkey]}]})
|
||||
|
||||
const setActiveTab = tab => {
|
||||
activeTab = tab
|
||||
}
|
||||
|
@ -1275,8 +1275,9 @@ export const subscribe = ({forcePlatform, skipCache, ...request}: MySubscribeReq
|
||||
request.relays = env.PLATFORM_RELAYS
|
||||
}
|
||||
|
||||
if (!skipCache) {
|
||||
request.relays = [...(request.relays || []), LOCAL_RELAY_URL]
|
||||
// Only add our local relay if we have relay selections to avoid bypassing auto relay selection
|
||||
if (!skipCache && relays?.length > 0) {
|
||||
request.relays = [...relays, LOCAL_RELAY_URL]
|
||||
}
|
||||
|
||||
const sub = baseSubscribe(request)
|
||||
|
Loading…
Reference in New Issue
Block a user