Merge pull request #2326 from oxen-io/fix-search-results-crash-no-convo

fix: make sure a convo exists before returning it in search results
pull/2328/head
Audric Ackermann 3 years ago committed by GitHub
commit f559ba8a73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -25,6 +25,11 @@ export const getSearchResults = createSelector(
searchState.contactsAndGroups.map(id => {
const value = lookup[id];
// on some edges cases, we have an id but no corresponding convo because it matches a query but the conversation was removed.
if (!value) {
return null;
}
// Don't return anything when activeAt is unset (i.e. no current conversations with this user)
if (value.activeAt === undefined || value.activeAt === 0) {
//activeAt can be 0 when linking device

Loading…
Cancel
Save