Hide nicknames and notes on note to self

This commit is contained in:
Jamie Kyle 2024-03-28 15:28:50 -07:00 committed by GitHub
parent c14f5c4712
commit fc65917fc3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 22 additions and 6 deletions

View file

@ -2,7 +2,20 @@
// SPDX-License-Identifier: AGPL-3.0-only
import * as RemoteConfig from '../RemoteConfig';
import type { ConversationType } from '../state/ducks/conversations';
import { isSignalConnection } from './getSignalConnections';
export function areNicknamesEnabled(): boolean {
return RemoteConfig.getValue('desktop.nicknames') === 'TRUE';
}
export function canHaveNicknameAndNote(
conversation: ConversationType
): boolean {
return (
areNicknamesEnabled() &&
conversation.type === 'group' &&
!isSignalConnection(conversation) &&
!conversation.isMe
);
}