(queryClient: QueryClient)
| 2063 | }); |
| 2064 | |
| 2065 | export const setChatGroupRole = (queryClient: QueryClient) => ({ |
| 2066 | mutationFn: ({ chatId, groupId, role }: SetChatGroupRoleVariables) => |
| 2067 | API.experimental.updateChatACL(chatId, { |
| 2068 | group_roles: { [groupId]: role }, |
| 2069 | }), |
| 2070 | onSuccess: async (_data: unknown, { chatId }: SetChatGroupRoleVariables) => { |
| 2071 | await queryClient.invalidateQueries({ |
| 2072 | queryKey: chatACLKey(chatId), |
| 2073 | exact: true, |
| 2074 | }); |
| 2075 | }, |
| 2076 | }); |
no test coverage detected