fix(ui): Invite a Peer sends trust_level=observer to federation.invite

The invite type chosen in QuickActions was only used for the modal
title — the RPC never carried it, so every invite was minted Trusted.
Pass it through so 'Invite a Peer' mints observer invites and 'Link
Your Nodes' keeps trusted ones.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
archipelago
2026-07-14 06:34:33 -04:00
co-authored by Claude Fable 5
parent 2434c55f32
commit f9f120f397
2 changed files with 7 additions and 3 deletions
+3 -1
View File
@@ -400,7 +400,9 @@ async function generateInvite() {
try {
generatingInvite.value = true
error.value = ''
const result = await rpcClient.federationInvite()
// The invite type is not cosmetic: it sets the trust level the invite
// grants both sides ("Invite a Peer" = observer, "Link Your Nodes" = trusted)
const result = await rpcClient.federationInvite(inviteType.value)
inviteCode.value = result.code
} catch (e) {
error.value = e instanceof Error ? e.message : 'Failed to generate invite'