diff --git a/ts/components/conversation/GroupNotification.tsx b/ts/components/conversation/GroupNotification.tsx index 31e588076c..4219dfa99b 100644 --- a/ts/components/conversation/GroupNotification.tsx +++ b/ts/components/conversation/GroupNotification.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { compact, flatten } from 'lodash'; import { ContactName } from './ContactName'; -import { FullJSXType, Intl } from '../Intl'; +import { Intl } from '../Intl'; import { LocalizerType } from '../../types/Util'; import { missingCaseError } from '../../util/missingCaseError'; @@ -36,7 +36,7 @@ export class GroupNotification extends React.Component { const { contacts, type, newName } = change; const { i18n } = this.props; - const otherPeople = compact( + const otherPeople: Array = compact( (contacts || []).map(contact => { if (contact.isMe) { return null; @@ -56,7 +56,7 @@ export class GroupNotification extends React.Component { ); }) ); - const otherPeopleWithCommas: FullJSXType = compact( + const otherPeopleWithCommas: Array = compact( flatten( otherPeople.map((person, index) => [index > 0 ? ', ' : null, person]) ) @@ -89,11 +89,14 @@ export class GroupNotification extends React.Component { } } + const joinedKey = + contacts.length > 1 ? 'multipleJoinedTheGroup' : 'joinedTheGroup'; + return ( <> {contactsIncludesMe ? (