Move some stuff to welshman, broadcast profile updates

This commit is contained in:
Jon Staab
2025-06-13 15:17:20 -07:00
parent 528917b90e
commit dac9ef8e4e
5 changed files with 10 additions and 49 deletions
+6 -2
View File
@@ -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])
}