(queryClient: QueryClient)
| 2050 | }; |
| 2051 | |
| 2052 | export const setChatUserRole = (queryClient: QueryClient) => ({ |
| 2053 | mutationFn: ({ chatId, userId, role }: SetChatUserRoleVariables) => |
| 2054 | API.experimental.updateChatACL(chatId, { |
| 2055 | user_roles: { [userId]: role }, |
| 2056 | }), |
| 2057 | onSuccess: async (_data: unknown, { chatId }: SetChatUserRoleVariables) => { |
| 2058 | await queryClient.invalidateQueries({ |
| 2059 | queryKey: chatACLKey(chatId), |
| 2060 | exact: true, |
| 2061 | }); |
| 2062 | }, |
| 2063 | }); |
| 2064 | |
| 2065 | export const setChatGroupRole = (queryClient: QueryClient) => ({ |
| 2066 | mutationFn: ({ chatId, groupId, role }: SetChatGroupRoleVariables) => |
no test coverage detected