Merge pull request #2036 from Bilb/fix-search-result-inactive-convo
Fix search result inactive convo
This commit is contained in:
commit
fcff08b1c2
|
@ -3,6 +3,7 @@ import { FileServerV2Request } from '../../fileserver/FileServerApiV2';
|
|||
import { PubKey } from '../../session/types';
|
||||
import { allowOnlyOneAtATime } from '../../session/utils/Promise';
|
||||
import { updateDefaultRooms, updateDefaultRoomsInProgress } from '../../state/ducks/defaultRooms';
|
||||
import { BlockedNumberController } from '../../util';
|
||||
import { getCompleteUrlFromRoom } from '../utils/OpenGroupUtils';
|
||||
import { parseOpenGroupV2 } from './JoinOpenGroupV2';
|
||||
import { getAllRoomInfos } from './OpenGroupAPIV2';
|
||||
|
@ -100,7 +101,11 @@ export const parseMessages = async (
|
|||
}
|
||||
}
|
||||
|
||||
return _.compact(parsedMessages).sort((a, b) => (a.serverId || 0) - (b.serverId || 0));
|
||||
return _.compact(
|
||||
parsedMessages.map(m =>
|
||||
m && m.sender && !BlockedNumberController.isBlocked(m.sender) ? m : null
|
||||
)
|
||||
).sort((a, b) => (a.serverId || 0) - (b.serverId || 0));
|
||||
};
|
||||
// tslint:disable: no-http-string
|
||||
const defaultServerUrl = 'http://116.203.70.33';
|
||||
|
|
|
@ -44,8 +44,9 @@ export const getSearchResults = createSelector(
|
|||
state.conversations.map(id => {
|
||||
const value = lookup[id];
|
||||
|
||||
// Don't return anything when activeAt is undefined (i.e. no current conversations with this user)
|
||||
if (value.activeAt === undefined) {
|
||||
// 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
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue