|
|
|
@ -872,7 +872,8 @@
|
|
|
|
|
// that contact. Otherwise, it will be a standalone entry.
|
|
|
|
|
const errors = _.reject(allErrors, error => Boolean(error.number));
|
|
|
|
|
const errorsGroupedById = _.groupBy(allErrors, 'number');
|
|
|
|
|
const finalContacts = await Promise.all((phoneNumbers || []).map(async id => {
|
|
|
|
|
const finalContacts = await Promise.all(
|
|
|
|
|
(phoneNumbers || []).map(async id => {
|
|
|
|
|
const errorsForContact = errorsGroupedById[id];
|
|
|
|
|
const isOutgoingKeyError = Boolean(
|
|
|
|
|
_.find(errorsForContact, error => error.name === OUTGOING_KEY_ERROR)
|
|
|
|
@ -906,7 +907,8 @@
|
|
|
|
|
onShowSafetyNumber: () =>
|
|
|
|
|
this.trigger('show-identity', this.findContact(id)),
|
|
|
|
|
};
|
|
|
|
|
}));
|
|
|
|
|
})
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
// The prefix created here ensures that contacts with errors are listed
|
|
|
|
|
// first; otherwise it's alphabetical
|
|
|
|
|