Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.

Commit df7281f

Browse files
authored
Merge pull request #4688 from withspectrum/alpha
v2.7.2
2 parents be32d04 + a8646b5 commit df7281f

File tree

36 files changed

+514
-323
lines changed

36 files changed

+514
-323
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ This is the main monorepo codebase of [Spectrum](https://spectrum.chat). Every s
1414

1515
It is difficult to grow, manage and measure the impact of online communities. Community owners need modern, chat-based communities but are running into scaling issues when their community grows beyond a few hundred members. It becomes hard to keep track of who's who, know what conversations are happening, and ensure that the community is staying healthy and productive.
1616

17-
Spectrum aims to be the best platform to build any kind of community online by combining the best of web 2.0 forums and real-time chat apps. With best-in-class moderation tooling, a single platform for all your communities, threaded conversations by default, community health monitoring (and much more to come), we think that we will be able to help more people start and grow the best online communities.
17+
**Spectrum aims to be the best platform to build any kind of community online by combining the best of forums and real-time chat apps.** With best-in-class moderation tooling, a single platform for all your communities, threaded conversations by default, community health monitoring, and much more to come we think that we will be able to help more people start and grow the best online communities.
1818

1919
> "[Spectrum] will take the place that Reddit used to have a long time ago for communities (especially tech) to freely share ideas and interact. Except realtime and trolling-free."
2020
>
2121
> \- [Guillermo Rauch (@rauchg)](https://twitter.com/rauchg/status/930946768841228288)
2222
2323
### Status
2424

25-
Spectrum has been under full-time development since March, 2017. See [the roadmap](https://github.com/withspectrum/spectrum/projects/19) for up-to-date information about our current areas of focus.
25+
Spectrum has been in full-time development since March 2017 and is [part of GitHub since November 2018](https://spectrum.chat/spectrum/general/spectrum-is-joining-github~1d3eb8ee-4c99-46c0-8daf-ca35a96be6ce).
2626

2727
<div align="center">
2828
<img height="50px" src="public/img/cluster-1.svg" />
@@ -94,7 +94,6 @@ Here is a list of all the big technologies we use:
9494
- **Flowtype**: Type-safe JavaScript
9595
- **PassportJS**: Authentication
9696
- **React**: Frontend React app
97-
- **DraftJS**: WYSIWYG writing experience on the web
9897

9998
#### Folder structure
10099

api/mutations/message/editMessage.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ type Args = {
2929
};
3030

3131
export default requireAuth(async (_: any, args: Args, ctx: GraphQLContext) => {
32+
let messageType = args.input.messageType;
3233
const {
33-
input: { id, content, messageType },
34+
input: { id, content },
3435
} = args;
3536
const { user, loaders } = ctx;
3637

@@ -58,9 +59,8 @@ export default requireAuth(async (_: any, args: Args, ctx: GraphQLContext) => {
5859
})
5960
)
6061
);
61-
messageType === 'draftjs';
62+
messageType = 'draftjs';
6263
}
63-
6464
const eventFailed =
6565
message.threadType === 'story'
6666
? events.MESSAGE_EDITED_FAILED
@@ -84,7 +84,7 @@ export default requireAuth(async (_: any, args: Args, ctx: GraphQLContext) => {
8484
'Please provide serialized raw DraftJS content state as content.body'
8585
);
8686
}
87-
if (!validateRawContentState(body)) {
87+
if (!validateRawContentState(parsed)) {
8888
trackQueue.add({
8989
userId: user.id,
9090
event: eventFailed,

api/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"dependencies": {
66
"algoliasearch": "^3.32.0",
77
"apollo-local-query": "^0.3.1",
8-
"apollo-server-express": "^2.4.0",
8+
"apollo-server-express": "^2.4.2",
99
"apollo-upload-client": "^9.1.0",
1010
"aws-sdk": "2.200.0",
1111
"axios": "^0.16.2",
@@ -17,10 +17,10 @@
1717
"babel-preset-env": "^1.7.0",
1818
"backpack-core": "^0.8.3",
1919
"body-parser": "^1.18.3",
20-
"bull": "^3.6.0",
20+
"bull": "^3.7.0",
2121
"casual": "^1.5.12",
2222
"compression": "^1.7.3",
23-
"cookie-parser": "^1.4.3",
23+
"cookie-parser": "^1.4.4",
2424
"cookie-session": "^2.0.0-beta.3",
2525
"cors": "^2.8.5",
2626
"cryptr": "^3.0.0",
@@ -54,7 +54,7 @@
5454
"graphql-date": "^1.0.3",
5555
"graphql-depth-limit": "^1.1.0",
5656
"graphql-log": "^0.1.3",
57-
"graphql-rate-limit": "^1.2.3",
57+
"graphql-rate-limit": "^1.2.4",
5858
"graphql-tools": "^4.0.4",
5959
"helmet": "^3.15.1",
6060
"highlight.js": "^9.14.2",

api/schema.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ const Root = /* GraphQL */ `
7373
window: Int
7474
message: String
7575
identityArgs: [String]
76+
arrayLengthField: String
7677
) on FIELD_DEFINITION
7778
7879
# The dummy queries and mutations are necessary because

api/types/Community.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ const Community = /* GraphQL */ `
311311
importSlackMembers(input: ImportSlackMembersInput!): Boolean
312312
@deprecated(reason: "Importing slack members is deprecated")
313313
sendEmailInvites(input: EmailInvitesInput!): Boolean
314+
@rateLimit(max: 5000, window: "1w", arrayLengthField: "input.contacts")
314315
pinThread(threadId: ID!, communityId: ID!, value: String): Community
315316
upgradeCommunity(input: UpgradeCommunityInput!): Community
316317
@deprecated(

0 commit comments

Comments
 (0)