Refactor SendMessage.ts to named parameters

This commit is contained in:
Scott Nonnenberg 2021-07-02 11:34:17 -07:00 committed by GitHub
parent 56933192ba
commit 615ae1ccf7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 540 additions and 470 deletions

View file

@ -17,7 +17,7 @@ export async function sendReadReceiptsFor(
isConversationAccepted(conversationAttrs)
) {
window.log.info(`Sending ${items.length} read receipts`);
const convoSendOptions = await getSendOptions(conversationAttrs);
const sendOptions = await getSendOptions(conversationAttrs);
const receiptsBySender = groupBy(items, 'senderId');
await Promise.all(
@ -27,14 +27,14 @@ export async function sendReadReceiptsFor(
if (conversation) {
await handleMessageSend(
window.textsecure.messaging.sendReadReceipts(
window.textsecure.messaging.sendReadReceipts({
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
conversation.get('e164')!,
senderE164: conversation.get('e164')!,
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
conversation.get('uuid')!,
senderUuid: conversation.get('uuid')!,
timestamps,
convoSendOptions
)
options: sendOptions,
})
);
}
})