Implemented ability to quickly add a user to a group
This commit is contained in:
parent
190cd9408b
commit
22bf3ebcc0
30 changed files with 855 additions and 70 deletions
|
@ -2,7 +2,7 @@
|
|||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import memoizee from 'memoizee';
|
||||
import { isNumber } from 'lodash';
|
||||
import { isNumber, pick } from 'lodash';
|
||||
import { createSelector } from 'reselect';
|
||||
|
||||
import type { StateType } from '../reducer';
|
||||
|
@ -477,6 +477,18 @@ export const getAllComposableConversations = createSelector(
|
|||
)
|
||||
);
|
||||
|
||||
export const getAllGroupsWithInviteAccess = createSelector(
|
||||
getConversationLookup,
|
||||
(conversationLookup: ConversationLookupType): Array<ConversationType> =>
|
||||
Object.values(conversationLookup).filter(conversation => {
|
||||
return (
|
||||
conversation.type === 'group' &&
|
||||
conversation.title &&
|
||||
conversation.canAddNewMembers
|
||||
);
|
||||
})
|
||||
);
|
||||
|
||||
/**
|
||||
* getComposableContacts/getCandidateContactsForNewGroup both return contacts for the
|
||||
* composer and group members, a different list from your primary system contacts.
|
||||
|
@ -1010,6 +1022,14 @@ export const getGroupAdminsSelector = createSelector(
|
|||
}
|
||||
);
|
||||
|
||||
export const getContactSelector = createSelector(
|
||||
getConversationSelector,
|
||||
conversationSelector => {
|
||||
return (contactId: string) =>
|
||||
pick(conversationSelector(contactId), 'id', 'title', 'uuid');
|
||||
}
|
||||
);
|
||||
|
||||
const getConversationVerificationData = createSelector(
|
||||
getConversations,
|
||||
(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue