( userID: string, deviceID: string, )
| 152 | } |
| 153 | |
| 154 | async function getInboundKeysForUserDevice( |
| 155 | userID: string, |
| 156 | deviceID: string, |
| 157 | ): Promise<InboundKeyInfoResponse> { |
| 158 | const [authDeviceID, identityInfo, rustAPI] = await Promise.all([ |
| 159 | getContentSigningKey(), |
| 160 | verifyUserLoggedIn(), |
| 161 | getRustAPI(), |
| 162 | ]); |
| 163 | |
| 164 | if (!identityInfo) { |
| 165 | throw new ServerError('account_not_registered_on_identity_service'); |
| 166 | } |
| 167 | |
| 168 | return authVerifiedEndpoint( |
| 169 | rustAPI.getInboundKeysForUserDevice( |
| 170 | identityInfo.userId, |
| 171 | authDeviceID, |
| 172 | identityInfo.accessToken, |
| 173 | userID, |
| 174 | deviceID, |
| 175 | ), |
| 176 | ); |
| 177 | } |
| 178 | |
| 179 | export { |
| 180 | findUserIdentities, |
no test coverage detected