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
+4 -2
View File
@@ -668,10 +668,12 @@ class RPCClient {
}
// Federation
async federationInvite(): Promise<{ code: string; did: string; onion: string }> {
async federationInvite(
trustLevel: 'trusted' | 'observer' = 'trusted'
): Promise<{ code: string; did: string; onion: string; trust_level: string }> {
return this.call({
method: 'federation.invite',
params: {},
params: { trust_level: trustLevel },
})
}