Merge branch 'charlesmchen/missingInteractions'

pull/1/head
Matthew Chen 7 years ago
commit d3ea8582b6

@ -4719,7 +4719,20 @@ typedef enum : NSUInteger {
for (NSUInteger row = 0; row < count; row++) {
TSInteraction *interaction =
[viewTransaction objectAtRow:row inSection:0 withMappings:self.messageMappings];
OWSAssert(interaction);
if (!interaction) {
OWSFail(@"%@ missing interaction in message mappings: %zd / %zd.", self.logTag, row, count);
// TODO: Add analytics.
continue;
}
if (!interaction.uniqueId) {
OWSFail(@"%@ invalid interaction in message mappings: %zd / %zd: %@.",
self.logTag,
row,
count,
interaction.description);
// TODO: Add analytics.
continue;
}
ConversationViewItem *_Nullable viewItem = self.viewItemCache[interaction.uniqueId];
if (viewItem) {

Loading…
Cancel
Save