Move getUntrustedContacts out of conversation_view

This commit is contained in:
Josh Perez 2022-08-16 19:59:11 -04:00 committed by GitHub
parent 96c4cc4bcf
commit 936ce91b2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 410 additions and 414 deletions

View file

@ -28,11 +28,9 @@ import {
getContactNameColorSelector,
getConversationByIdSelector,
getConversationUuidsStoppingSend,
getConversationIdsStoppedForVerification,
getConversationsByTitleSelector,
getConversationSelector,
getConversationsStoppingSend,
getConversationsStoppedForVerification,
getFilteredCandidateContactsForNewGroup,
getFilteredComposeContacts,
getFilteredComposeGroups,
@ -333,49 +331,6 @@ describe('both/state/selectors/conversations', () => {
});
});
describe('#getConversationStoppedForVerification', () => {
it('returns an empty array if there are no conversations stopping send', () => {
const state = getEmptyRootState();
assert.isEmpty(getConversationsStoppingSend(state));
});
it('returns all conversations stopping send', () => {
const convoA = makeConversation('convo a');
const convoB = makeConversation('convo b');
const state: StateType = {
...getEmptyRootState(),
conversations: {
...getEmptyState(),
conversationLookup: {
'convo a': convoA,
'convo b': convoB,
},
verificationDataByConversation: {
'convo a': {
type: ConversationVerificationState.PendingVerification as const,
uuidsNeedingVerification: ['abc'],
},
'convo b': {
type: ConversationVerificationState.PendingVerification as const,
uuidsNeedingVerification: ['def', 'abc'],
},
},
},
};
assert.sameDeepMembers(getConversationIdsStoppedForVerification(state), [
'convo a',
'convo b',
]);
assert.sameDeepMembers(getConversationsStoppedForVerification(state), [
convoA,
convoB,
]);
});
});
describe('#getInvitedContactsForNewlyCreatedGroup', () => {
it('returns an empty array if there are no invited contacts', () => {
const state = getEmptyRootState();