From 09fa93553bf17a7058339bb0cf843daeb88ab0ff Mon Sep 17 00:00:00 2001
From: DS Boyce <260543580+ds-boyce@users.noreply.github.com>
Date: Thu, 4 Jun 2026 13:08:51 -0700
Subject: [PATCH] Fix useJoinRequestMutation (#10730)
---
src/state/queries/messages/join-requests.ts | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/state/queries/messages/join-requests.ts b/src/state/queries/messages/join-requests.ts
index a3eda671e8..179dfafaaf 100644
--- a/src/state/queries/messages/join-requests.ts
+++ b/src/state/queries/messages/join-requests.ts
@@ -39,14 +39,16 @@ export function useJoinRequestMutation(
return useMutation({
mutationFn: async ({member}: {member: string}) => {
if (!convoId) throw new Error('No convoId provided')
- const endpoint =
+ const {data} =
action === 'approve'
- ? agent.chat.bsky.group.approveJoinRequest
- : agent.chat.bsky.group.rejectJoinRequest
- const {data} = await endpoint(
- {convoId, member},
- {headers: DM_SERVICE_HEADERS, encoding: 'application/json'},
- )
+ ? await agent.chat.bsky.group.approveJoinRequest(
+ {convoId, member},
+ {headers: DM_SERVICE_HEADERS, encoding: 'application/json'},
+ )
+ : await agent.chat.bsky.group.rejectJoinRequest(
+ {convoId, member},
+ {headers: DM_SERVICE_HEADERS, encoding: 'application/json'},
+ )
return data as JoinRequestOutput
},
onMutate: ({member}) => {