diff --git a/neode-ui/src/views/web5/Web5Identities.vue b/neode-ui/src/views/web5/Web5Identities.vue index 77a124a1..30b09c74 100644 --- a/neode-ui/src/views/web5/Web5Identities.vue +++ b/neode-ui/src/views/web5/Web5Identities.vue @@ -555,12 +555,29 @@ async function publishProfile() { method: 'identity.update-profile', params: { id: profileEditorIdentity.value.id, ...profileForm.value }, }) - const res = await rpcClient.call<{ event_id: string }>({ + const res = await rpcClient.call<{ + event_id: string + accepted: string[] + rejected: Array<[string, string]> + relays_attempted: number + published: boolean + }>({ method: 'identity.publish-profile', params: { id: profileEditorIdentity.value.id }, }) await loadIdentities() - profileSuccess.value = `Published to relay (${res.event_id.slice(0, 12)}...)` + const n = res.accepted?.length ?? 0 + const total = res.relays_attempted ?? 0 + const tail = `(${res.event_id.slice(0, 12)}…)` + if (n === total) { + profileSuccess.value = `Published to all ${total} relays ${tail}` + } else if (n > 0) { + profileSuccess.value = `Published to ${n}/${total} relays ${tail}` + const first = res.rejected?.[0] + if (first) profileError.value = `Rejected by ${first[0]}: ${first[1]}` + } else { + profileError.value = `Published to 0/${total} relays — check Manage Relays` + } setTimeout(() => { profileSuccess.value = '' }, 5000) } catch (err: unknown) { profileError.value = err instanceof Error ? err.message : 'Failed to publish'