From 4fd67fa7dd9c05d5f412e0b752d6b03971fe9193 Mon Sep 17 00:00:00 2001 From: Jannis Braun <151788261+TheZwiss@users.noreply.github.com> Date: Sun, 26 Apr 2026 22:43:52 +0200 Subject: [PATCH] fix(web): map peer_pending_local_admin to user-facing message Without this, when the local admin gate fires on friend-add, the user got a generic 'Could not send friend request' fallback. Now they see 'Your admin needs to approve federation with this instance' with a pointer to Connections settings where Task 12's pending-approvals section shows their queued request. --- packages/web/src/utils/friendErrors.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/web/src/utils/friendErrors.ts b/packages/web/src/utils/friendErrors.ts index ec1531a5..12fddf4f 100644 --- a/packages/web/src/utils/friendErrors.ts +++ b/packages/web/src/utils/friendErrors.ts @@ -20,6 +20,8 @@ export function mapServerErrorToMessage( case 'already_friends': return "You're already friends with this user."; case 'peer_pending_approval': return "The remote instance's admin needs to approve federation. Try again later."; + case 'peer_pending_local_admin': + return "Your admin needs to approve federation with this instance. You'll see your request in Connections settings."; case 'peer_pending': return 'Connecting to the remote instance — try again in a moment.'; case 'incoming_request_exists':