mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Implemented ability to quickly add a user to a group
This commit is contained in:
@@ -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,
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user