Convert signal.js and preload.js to Typescript
This commit is contained in:
parent
e18510e41c
commit
2464e0a9c1
94 changed files with 2113 additions and 1848 deletions
|
@ -88,7 +88,14 @@ function getUrlsToDownload(): Array<string> {
|
|||
async function downloadBadgeImageFile(url: string): Promise<string> {
|
||||
await waitForOnline(navigator, window, { timeout: 1 * MINUTE });
|
||||
|
||||
const imageFileData = await window.textsecure.server.getBadgeImageFile(url);
|
||||
const { server } = window.textsecure;
|
||||
if (!server) {
|
||||
throw new Error(
|
||||
'downloadBadgeImageFile: window.textsecure.server is not available!'
|
||||
);
|
||||
}
|
||||
|
||||
const imageFileData = await server.getBadgeImageFile(url);
|
||||
const localPath = await window.Signal.Migrations.writeNewBadgeImageFileData(
|
||||
imageFileData
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue