Additional logging, new ability to force Conversation 'change' event

This commit is contained in:
Scott Nonnenberg 2021-09-20 11:51:30 -07:00 committed by GitHub
parent e9ef239ff0
commit 250a89d953
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 45 additions and 85 deletions

View file

@ -71,6 +71,8 @@ export async function onRetryRequest(event: RetryRequestEvent): Promise<void> {
);
}
await archiveSessionOnMatch(retryRequest);
if (isOlderThan(sentAt, retryRespondMaxAge)) {
log.info(
`onRetryRequest/${logId}: Message is too old, refusing to send again.`
@ -92,7 +94,6 @@ export async function onRetryRequest(event: RetryRequestEvent): Promise<void> {
}
log.info(`onRetryRequest/${logId}: Resending message`);
await archiveSessionOnMatch(retryRequest);
const { contentHint, messageIds, proto, timestamp } = sentProto;
@ -206,8 +207,6 @@ async function sendDistributionMessageOrNullMessage(
let sentDistributionMessage = false;
log.info(`sendDistributionMessageOrNullMessage/${logId}: Starting...`);
await archiveSessionOnMatch(options);
const conversation = window.ConversationController.getOrCreate(
requesterUuid,
'private'