signal-desktop/ts/util/nicknames.ts

16 lines
424 B
TypeScript
Raw Normal View History

2024-03-26 19:48:33 +00:00
// Copyright 2024 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import type { ConversationType } from '../state/ducks/conversations';
2024-04-01 21:35:03 +00:00
import { isSignalConversation } from './isSignalConversation';
2024-03-26 19:48:33 +00:00
export function canHaveNicknameAndNote(
conversation: ConversationType
): boolean {
return (
2024-04-01 21:35:03 +00:00
conversation.type !== 'group' &&
!isSignalConversation(conversation) &&
!conversation.isMe
);
}