Convert signal.js and preload.js to Typescript

This commit is contained in:
Scott Nonnenberg 2022-06-13 14:39:35 -07:00 committed by GitHub
parent e18510e41c
commit 2464e0a9c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
94 changed files with 2113 additions and 1848 deletions

View file

@ -45,6 +45,11 @@ export async function sendReceipts({
throw missingCaseError(type);
}
const { messaging } = window.textsecure;
if (!messaging) {
throw new Error('messaging is not available!');
}
if (requiresUserSetting && !window.storage.get('read-receipt-setting')) {
log.info('requires user setting. Not sending these receipts');
return;
@ -119,7 +124,7 @@ export async function sendReceipts({
const messageIds = batch.map(receipt => receipt.messageId);
await handleMessageSend(
window.textsecure.messaging[methodName]({
messaging[methodName]({
senderE164: sender.get('e164'),
senderUuid: sender.get('uuid'),
timestamps,