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.
This commit is contained in:
Jannis Braun
2026-04-26 22:43:52 +02:00
parent cebbd5c859
commit 4fd67fa7dd
+2
View File
@@ -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':