mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-27 13:40:47 +00:00
Mandatory profile sharing: Don't disable react/reply in GroupV2 groups
This commit is contained in:
@@ -29,7 +29,11 @@ import { ContactNameColors, ContactNameColorType } from '../../types/Colors';
|
||||
import { AvatarDataType } from '../../types/Avatar';
|
||||
import { isInSystemContacts } from '../../util/isInSystemContacts';
|
||||
import { sortByTitle } from '../../util/sortByTitle';
|
||||
import { isGroupV2 } from '../../util/whatTypeOfConversation';
|
||||
import {
|
||||
isDirectConversation,
|
||||
isGroupV1,
|
||||
isGroupV2,
|
||||
} from '../../util/whatTypeOfConversation';
|
||||
|
||||
import {
|
||||
getIntl,
|
||||
@@ -922,8 +926,13 @@ export const getConversationsWithCustomColorSelector = createSelector(
|
||||
export function isMissingRequiredProfileSharing(
|
||||
conversation: ConversationType
|
||||
): boolean {
|
||||
const doesConversationRequireIt =
|
||||
!conversation.left &&
|
||||
(isGroupV1(conversation) || isDirectConversation(conversation));
|
||||
|
||||
return Boolean(
|
||||
!conversation.profileSharing &&
|
||||
doesConversationRequireIt &&
|
||||
!conversation.profileSharing &&
|
||||
window.Signal.RemoteConfig.isEnabled('desktop.mandatoryProfileSharing') &&
|
||||
conversation.messageCount &&
|
||||
conversation.messageCount > 0
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { ConversationAttributesType } from '../model-types.d';
|
||||
import { ConversationType } from '../state/ducks/conversations';
|
||||
import { base64ToArrayBuffer, fromEncodedBinaryToArrayBuffer } from '../Crypto';
|
||||
|
||||
export enum ConversationTypes {
|
||||
@@ -12,9 +13,13 @@ export enum ConversationTypes {
|
||||
}
|
||||
|
||||
export function isDirectConversation(
|
||||
conversationAttrs: Pick<ConversationAttributesType, 'type'>
|
||||
conversationAttrs:
|
||||
| Pick<ConversationAttributesType, 'type'>
|
||||
| Pick<ConversationType, 'type'>
|
||||
): boolean {
|
||||
return conversationAttrs.type === 'private';
|
||||
return (
|
||||
conversationAttrs.type === 'private' || conversationAttrs.type === 'direct'
|
||||
);
|
||||
}
|
||||
|
||||
export function isMe(conversationAttrs: ConversationAttributesType): boolean {
|
||||
|
||||
Reference in New Issue
Block a user