( identityInfo: IdentityInfo, contentOneTimeKeys: $ReadOnlyArray<string>, notifOneTimeKeys: $ReadOnlyArray<string>, )
| 99 | } |
| 100 | |
| 101 | async function uploadOneTimeKeys( |
| 102 | identityInfo: IdentityInfo, |
| 103 | contentOneTimeKeys: $ReadOnlyArray<string>, |
| 104 | notifOneTimeKeys: $ReadOnlyArray<string>, |
| 105 | ): Promise<void> { |
| 106 | const [rustAPI, deviceID] = await Promise.all([ |
| 107 | getRustAPI(), |
| 108 | getContentSigningKey(), |
| 109 | ]); |
| 110 | |
| 111 | await authVerifiedEndpoint( |
| 112 | rustAPI.uploadOneTimeKeys( |
| 113 | identityInfo.userId, |
| 114 | deviceID, |
| 115 | identityInfo.accessToken, |
| 116 | contentOneTimeKeys, |
| 117 | notifOneTimeKeys, |
| 118 | ), |
| 119 | ); |
| 120 | } |
| 121 | |
| 122 | async function publishPrekeys( |
| 123 | deviceID: string, |
no test coverage detected