forked from coracle/flotilla
Move some stuff to welshman, broadcast profile updates
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
isPublishedProfile,
|
||||
uniqTags,
|
||||
} from "@welshman/util"
|
||||
import {Router} from "@welshman/router"
|
||||
import {Router, addMaximalFallbacks} from "@welshman/router"
|
||||
import {pubkey, profilesByPubkey, publishThunk} from "@welshman/app"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import ProfileEditForm from "@app/components/ProfileEditForm.svelte"
|
||||
@@ -28,7 +28,11 @@
|
||||
const relays = [...getMembershipUrls($userMembership)]
|
||||
|
||||
if (shouldBroadcast) {
|
||||
relays.push(...Router.get().FromUser().getUrls())
|
||||
const router = Router.get()
|
||||
|
||||
relays.push(
|
||||
...router.merge([router.FromUser(), router.Index()]).policy(addMaximalFallbacks).getUrls(),
|
||||
)
|
||||
} else {
|
||||
template.tags = uniqTags([...template.tags, PROTECTED])
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import {goto} from "$app/navigation"
|
||||
import {randomId} from "@welshman/lib"
|
||||
import {displayRelayUrl} from "@welshman/util"
|
||||
import {deriveRelay, getThunkError} from "@welshman/app"
|
||||
import {deriveRelay, getThunkError, createRoom, editRoom, joinRoom} from "@welshman/app"
|
||||
import {preventDefault} from "@lib/html"
|
||||
import Field from "@lib/components/Field.svelte"
|
||||
import Spinner from "@lib/components/Spinner.svelte"
|
||||
@@ -11,7 +11,6 @@
|
||||
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import {hasNip29, loadChannel} from "@app/state"
|
||||
import {createRoom, editRoom, joinRoom} from "@app/commands"
|
||||
import {makeSpacePath} from "@app/routes"
|
||||
import {pushToast} from "@app/toast"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user