More logging in addDeliveryIssue, properly wait in getProfiles

This commit is contained in:
Scott Nonnenberg 2021-07-26 17:00:16 -07:00 committed by GitHub
parent 276c153ec4
commit 67d13e9ba8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 5 deletions

View file

@ -944,7 +944,7 @@ export async function startApp(): Promise<void> {
`retryPlaceholders/interval: Found ${expired.length} expired items`
);
expired.forEach(item => {
const { conversationId, senderUuid } = item;
const { conversationId, senderUuid, sentAt } = item;
const conversation = window.ConversationController.get(
conversationId
);
@ -956,6 +956,7 @@ export async function startApp(): Promise<void> {
receivedAt,
receivedAtCounter,
senderUuid,
sentAt,
})
);
}

View file

@ -2466,13 +2466,15 @@ export class ConversationModel extends window.Backbone
receivedAt,
receivedAtCounter,
senderUuid,
sentAt,
}: {
receivedAt: number;
receivedAtCounter: number;
senderUuid: string;
sentAt: number;
}): Promise<void> {
window.log.info(`addDeliveryIssue: adding for ${this.idForLogging()}`, {
receivedAt,
sentAt,
senderUuid,
});
@ -4379,9 +4381,9 @@ export class ConversationModel extends window.Backbone
// request all conversation members' keys
const conversations = (this.getMembers() as unknown) as Array<ConversationModel>;
return Promise.all(
window._.map(conversations, conversation => {
getProfile(conversation.get('uuid'), conversation.get('e164'));
})
window._.map(conversations, conversation =>
getProfile(conversation.get('uuid'), conversation.get('e164'))
)
);
}

View file

@ -472,6 +472,7 @@ async function requestResend(decryptionError: DecryptionErrorEventData) {
receivedAt: receivedAtDate,
receivedAtCounter,
senderUuid,
sentAt: timestamp,
});
});
}