Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"graphql-date": "^1.0.3",
"graphql-depth-limit": "^1.1.0",
"graphql-log": "^0.1.3",
"graphql-rate-limit": "^1.2.3",
"graphql-rate-limit": "^1.2.4",
"graphql-tools": "^4.0.4",
"helmet": "^3.15.1",
"highlight.js": "^9.14.2",
Expand Down
1 change: 1 addition & 0 deletions api/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ const Root = /* GraphQL */ `
window: Int
message: String
identityArgs: [String]
arrayLengthField: String
) on FIELD_DEFINITION

# The dummy queries and mutations are necessary because
Expand Down
1 change: 1 addition & 0 deletions api/types/Community.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ const Community = /* GraphQL */ `
importSlackMembers(input: ImportSlackMembersInput!): Boolean
@deprecated(reason: "Importing slack members is deprecated")
sendEmailInvites(input: EmailInvitesInput!): Boolean
@rateLimit(max: 5000, window: "1w", arrayLengthField: "input.contacts")
pinThread(threadId: ID!, communityId: ID!, value: String): Community
upgradeCommunity(input: UpgradeCommunityInput!): Community
@deprecated(
Expand Down
8 changes: 4 additions & 4 deletions api/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4631,10 +4631,10 @@ graphql-log@^0.1.3:
deep-for-each "^1.0.6"
is-function "^1.0.1"

graphql-rate-limit@^1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/graphql-rate-limit/-/graphql-rate-limit-1.2.3.tgz#33a98062bc251ba78eb5e74a8b7b08b1aac596c7"
integrity sha512-nhVYmEC/r1uhmCaSdjgOTNuBBbNcgYvdFRqTwWZ/+55tY/gTpEYTwH9ypayoERoqXleXwYsEROGQ9EEumA/uKA==
graphql-rate-limit@^1.2.4:
version "1.2.4"
resolved "https://registry.yarnpkg.com/graphql-rate-limit/-/graphql-rate-limit-1.2.4.tgz#8d28e475f77351f11cd09cc3f539adaba8dd208d"
integrity sha512-hddZL3aXPcpRpH57UFErrLzc0Wdjka570yRJSG5leG+iPXarHDf85Tl5oyj00PW0jVfml2X2K7ucOInsE8xYbw==
dependencies:
"@types/redis-mock" "^0.17.0"
graphql-tools "^4.0.3"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"graphql-date": "^1.0.3",
"graphql-depth-limit": "^1.1.0",
"graphql-log": "0.1.3",
"graphql-rate-limit": "^1.2.2",
"graphql-rate-limit": "^1.2.4",
"graphql-tag": "^2.10.0",
"graphql-tools": "^4.0.3",
"helmet": "^3.14.0",
Expand Down
9 changes: 8 additions & 1 deletion src/components/emailInvitationForm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,13 @@ class EmailInvitationForm extends React.Component<Props, State> {
})
.filter(Boolean);

if (validated.length > 5000) {
this.setState({
importError: 'Cannot invite more than 5,000 emails.',
});
return;
}

const consolidated = [
...this.state.contacts.filter(
contact =>
Expand Down Expand Up @@ -377,7 +384,7 @@ class EmailInvitationForm extends React.Component<Props, State> {
<Icon size={20} glyph="upload" /> Import emails
</ActionAsLabel>
<ActionHelpText>
Upload a .json file with an array of email addresses.
Upload a .json file with an array of up to 5,000 email addresses.
</ActionHelpText>

<Action onClick={this.toggleCustomMessage}>
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7197,10 +7197,10 @@ graphql-log@0.1.3:
deep-for-each "^1.0.6"
is-function "^1.0.1"

graphql-rate-limit@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/graphql-rate-limit/-/graphql-rate-limit-1.2.2.tgz#4c97e7bcb5b8c8ca1ee67aaf194d22b88bba6f53"
integrity sha512-Osns7iZkKLAANZokorAKKIehQ3Wm03nXts2aBBy15r/QhKTNPxVwc71sXTn3IPJ7SzAfoARvPN1Jm3bmblHtiQ==
graphql-rate-limit@^1.2.4:
version "1.2.4"
resolved "https://registry.yarnpkg.com/graphql-rate-limit/-/graphql-rate-limit-1.2.4.tgz#8d28e475f77351f11cd09cc3f539adaba8dd208d"
integrity sha512-hddZL3aXPcpRpH57UFErrLzc0Wdjka570yRJSG5leG+iPXarHDf85Tl5oyj00PW0jVfml2X2K7ucOInsE8xYbw==
dependencies:
"@types/redis-mock" "^0.17.0"
graphql-tools "^4.0.3"
Expand Down