pull/869/head
Audric Ackermann 5 years ago
parent 99133437d6
commit 1f411df0ce
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -74,7 +74,10 @@
newMembers.length + existingMembers.length > newMembers.length + existingMembers.length >
window.CONSTANTS.SMALL_GROUP_SIZE_LIMIT window.CONSTANTS.SMALL_GROUP_SIZE_LIMIT
) { ) {
const msg = window.i18n('maxGroupMembersError', window.CONSTANTS.SMALL_GROUP_SIZE_LIMIT); const msg = window.i18n(
'maxGroupMembersError',
window.CONSTANTS.SMALL_GROUP_SIZE_LIMIT
);
window.pushToast({ window.pushToast({
title: msg, title: msg,

@ -399,10 +399,15 @@ export class LeftPaneChannelSection extends React.Component<Props, State> {
groupMembers: Array<ContactType> groupMembers: Array<ContactType>
) { ) {
// Validate groupName and groupMembers length // Validate groupName and groupMembers length
if (groupName.length === 0 || if (
groupName.length > window.CONSTANTS.MAX_GROUP_NAME_LENGTH) { groupName.length === 0 ||
groupName.length > window.CONSTANTS.MAX_GROUP_NAME_LENGTH
) {
window.pushToast({ window.pushToast({
title: window.i18n('invalidGroupName', window.CONSTANTS.MAX_GROUP_NAME_LENGTH), title: window.i18n(
'invalidGroupName',
window.CONSTANTS.MAX_GROUP_NAME_LENGTH
),
type: 'error', type: 'error',
id: 'invalidGroupName', id: 'invalidGroupName',
}); });
@ -416,7 +421,10 @@ export class LeftPaneChannelSection extends React.Component<Props, State> {
groupMembers.length >= window.CONSTANTS.SMALL_GROUP_SIZE_LIMIT groupMembers.length >= window.CONSTANTS.SMALL_GROUP_SIZE_LIMIT
) { ) {
window.pushToast({ window.pushToast({
title: window.i18n('invalidGroupSize', window.CONSTANTS.SMALL_GROUP_SIZE_LIMIT), title: window.i18n(
'invalidGroupSize',
window.CONSTANTS.SMALL_GROUP_SIZE_LIMIT
),
type: 'error', type: 'error',
id: 'invalidGroupSize', id: 'invalidGroupSize',
}); });

Loading…
Cancel
Save