Mandatory profile sharing: Don't disable react/reply in GroupV2 groups
This commit is contained in:
parent
0793aa6b43
commit
1dda705c52
2 changed files with 18 additions and 4 deletions
|
@ -29,7 +29,11 @@ import { ContactNameColors, ContactNameColorType } from '../../types/Colors';
|
||||||
import { AvatarDataType } from '../../types/Avatar';
|
import { AvatarDataType } from '../../types/Avatar';
|
||||||
import { isInSystemContacts } from '../../util/isInSystemContacts';
|
import { isInSystemContacts } from '../../util/isInSystemContacts';
|
||||||
import { sortByTitle } from '../../util/sortByTitle';
|
import { sortByTitle } from '../../util/sortByTitle';
|
||||||
import { isGroupV2 } from '../../util/whatTypeOfConversation';
|
import {
|
||||||
|
isDirectConversation,
|
||||||
|
isGroupV1,
|
||||||
|
isGroupV2,
|
||||||
|
} from '../../util/whatTypeOfConversation';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getIntl,
|
getIntl,
|
||||||
|
@ -922,8 +926,13 @@ export const getConversationsWithCustomColorSelector = createSelector(
|
||||||
export function isMissingRequiredProfileSharing(
|
export function isMissingRequiredProfileSharing(
|
||||||
conversation: ConversationType
|
conversation: ConversationType
|
||||||
): boolean {
|
): boolean {
|
||||||
|
const doesConversationRequireIt =
|
||||||
|
!conversation.left &&
|
||||||
|
(isGroupV1(conversation) || isDirectConversation(conversation));
|
||||||
|
|
||||||
return Boolean(
|
return Boolean(
|
||||||
!conversation.profileSharing &&
|
doesConversationRequireIt &&
|
||||||
|
!conversation.profileSharing &&
|
||||||
window.Signal.RemoteConfig.isEnabled('desktop.mandatoryProfileSharing') &&
|
window.Signal.RemoteConfig.isEnabled('desktop.mandatoryProfileSharing') &&
|
||||||
conversation.messageCount &&
|
conversation.messageCount &&
|
||||||
conversation.messageCount > 0
|
conversation.messageCount > 0
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
import { ConversationAttributesType } from '../model-types.d';
|
import { ConversationAttributesType } from '../model-types.d';
|
||||||
|
import { ConversationType } from '../state/ducks/conversations';
|
||||||
import { base64ToArrayBuffer, fromEncodedBinaryToArrayBuffer } from '../Crypto';
|
import { base64ToArrayBuffer, fromEncodedBinaryToArrayBuffer } from '../Crypto';
|
||||||
|
|
||||||
export enum ConversationTypes {
|
export enum ConversationTypes {
|
||||||
|
@ -12,9 +13,13 @@ export enum ConversationTypes {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isDirectConversation(
|
export function isDirectConversation(
|
||||||
conversationAttrs: Pick<ConversationAttributesType, 'type'>
|
conversationAttrs:
|
||||||
|
| Pick<ConversationAttributesType, 'type'>
|
||||||
|
| Pick<ConversationType, 'type'>
|
||||||
): boolean {
|
): boolean {
|
||||||
return conversationAttrs.type === 'private';
|
return (
|
||||||
|
conversationAttrs.type === 'private' || conversationAttrs.type === 'direct'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isMe(conversationAttrs: ConversationAttributesType): boolean {
|
export function isMe(conversationAttrs: ConversationAttributesType): boolean {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue