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

Commit c45ca1d

Browse files
authored
Merge pull request #3586 from withspectrum/2.4.18
2.4.18
2 parents f0655ae + 8a1c308 commit c45ca1d

File tree

170 files changed

+5402
-4737
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+5402
-4737
lines changed

analytics/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"amplitude": "^3.5.0",
99
"bull": "3.3.10",
1010
"node-env-file": "^0.1.8",
11-
"now-env": "^3.0.1",
12-
"raven": "^2.1.1",
11+
"now-env": "^3.1.0",
12+
"raven": "^2.6.3",
1313
"rethinkdbdash": "^2.3.29",
1414
"sha1": "^1.1.1",
1515
"source-map-support": "^0.5.6",

analytics/yarn.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,9 @@ node-env-file@^0.1.8:
286286
version "0.1.8"
287287
resolved "https://registry.yarnpkg.com/node-env-file/-/node-env-file-0.1.8.tgz#fccb7b050f735b5a33da9eb937cf6f1ab457fb69"
288288

289-
now-env@^3.0.1:
290-
version "3.0.4"
291-
resolved "https://registry.yarnpkg.com/now-env/-/now-env-3.0.4.tgz#f9ed88884bff8d208ad3eaf39cc3437dd1a591ad"
289+
now-env@^3.1.0:
290+
version "3.1.0"
291+
resolved "https://registry.yarnpkg.com/now-env/-/now-env-3.1.0.tgz#e0198b67279d387229cfd4b25de4c2fc7156943f"
292292

293293
object-keys@^1.0.8:
294294
version "1.0.11"
@@ -302,9 +302,9 @@ qs@^6.5.1:
302302
version "6.5.2"
303303
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
304304

305-
raven@^2.1.1:
306-
version "2.6.0"
307-
resolved "https://registry.yarnpkg.com/raven/-/raven-2.6.0.tgz#3806a82c9ee8cd3e75c3b7ea7bb1935aad092d0c"
305+
raven@^2.6.3:
306+
version "2.6.3"
307+
resolved "https://registry.yarnpkg.com/raven/-/raven-2.6.3.tgz#207475a12809277ef54eaceafe2597ff65262ab4"
308308
dependencies:
309309
cookie "0.3.1"
310310
md5 "^2.2.1"

api/migrations/config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const path = require('path');
22
const fs = require('fs');
3+
const debug = require('debug')('migrations');
34

45
const DEFAULT_CONFIG = {
56
driver: 'rethinkdbdash',
@@ -13,10 +14,9 @@ const RUN_IN_PROD = !!process.env.AWS_RETHINKDB_PASSWORD;
1314

1415
if (RUN_IN_PROD && process.argv[4] === 'down') {
1516
throw new Error('Do not drop the production database!!!!!');
16-
process.exit(1);
1717
}
1818

19-
if (RUN_IN_PROD) console.log('Running migration in production...');
19+
if (RUN_IN_PROD) debug('Running migration in production...');
2020

2121
module.exports = !RUN_IN_PROD
2222
? DEFAULT_CONFIG

api/migrations/seed/default/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const defaultUsersCommunities = require('./usersCommunities');
1111
const defaultUsersChannels = require('./usersChannels');
1212
const defaultUsersSettings = require('./usersSettings')();
1313
const defaultMessages = require('./messages');
14+
const defaultReactions = require('./reactions');
1415

1516
module.exports = {
1617
constants,
@@ -28,4 +29,5 @@ module.exports = {
2829
defaultNotifications: [],
2930
defaultCommunitySettings: [],
3031
defaultChannelSettings: [],
32+
defaultReactions,
3133
};
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// @flow
2+
const constants = require('./constants');
3+
const { DATE, MAX_ID } = constants;
4+
5+
module.exports = [
6+
{
7+
id: '1',
8+
messageId: '4',
9+
type: 'like',
10+
senderId: MAX_ID,
11+
timestamp: new Date(DATE + 4),
12+
},
13+
];

api/mutations/message/addMessage.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,11 @@ export default requireAuth(async (_: any, args: Input, ctx: GraphQLContext) => {
107107
}
108108
if (
109109
body.blocks.some(
110-
({ type }) => !type || (type !== 'unstyled' && type !== 'code-block')
110+
({ type }) =>
111+
!type ||
112+
(type !== 'unstyled' &&
113+
type !== 'code-block' &&
114+
type !== 'blockquote')
111115
)
112116
) {
113117
trackQueue.add({

api/mutations/thread/editThread.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export default requireAuth(async (_: any, args: Input, ctx: GraphQLContext) => {
132132
const body =
133133
editedThread.content.body && JSON.parse(editedThread.content.body);
134134
const imageKeys = Object.keys(body.entityMap).filter(
135-
key => body.entityMap[key].type === 'image'
135+
key => body.entityMap[key].type.toLowerCase() === 'image'
136136
);
137137
urls.forEach((url, index) => {
138138
if (!body.entityMap[imageKeys[index]]) return;

api/mutations/thread/publishThread.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -438,13 +438,11 @@ export default requireAuth(
438438
// Replace the local image srcs with the remote image src
439439
const body = dbThread.content.body && JSON.parse(dbThread.content.body);
440440

441-
// $FlowFixMe
441+
if (!body) return dbThread;
442442
const imageKeys = Object.keys(body.entityMap).filter(
443-
// $FlowFixMe
444-
key => body.entityMap[key].type === 'image'
443+
key => body.entityMap[key].type.toLowerCase() === 'image'
445444
);
446445
urls.forEach((url, index) => {
447-
// $FlowFixMe
448446
if (!body.entityMap[imageKeys[index]]) return;
449447
body.entityMap[imageKeys[index]].data.src = url;
450448
});

api/package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
"babel-plugin-transform-object-rest-spread": "^6.23.0",
1414
"babel-preset-env": "^1.5.2",
1515
"backpack-core": "^0.4.1",
16-
"body-parser": "^1.17.1",
16+
"body-parser": "^1.18.3",
1717
"bull": "3.3.10",
1818
"casual": "^1.5.12",
19-
"compression": "^1.7.1",
19+
"compression": "^1.7.3",
2020
"cookie-parser": "^1.4.3",
2121
"cookie-session": "^2.0.0-beta.3",
2222
"cors": "^2.8.3",
@@ -36,7 +36,7 @@
3636
"draft-js-prism-plugin": "0.1.1",
3737
"draftjs-to-markdown": "^0.4.2",
3838
"emoji-regex": "^6.1.1",
39-
"express": "^4.15.2",
39+
"express": "^4.16.3",
4040
"express-session": "^1.15.2",
4141
"faker": "^4.1.0",
4242
"find-with-regex": "^1.0.2",
@@ -49,13 +49,13 @@
4949
"graphql-server-express": "1.3.0",
5050
"graphql-subscriptions": "0.4.x",
5151
"graphql-tools": "3.0.0",
52-
"helmet": "^3.12.0",
52+
"helmet": "^3.12.1",
5353
"highlight.js": "^9.10.0",
5454
"history": "^4.6.1",
5555
"hoist-non-react-statics": "^2.3.1",
5656
"hpp": "^0.2.2",
5757
"imgix-core-js": "^1.0.6",
58-
"immutability-helper": "^2.2.0",
58+
"immutability-helper": "^2.7.1",
5959
"isomorphic-fetch": "^2.2.1",
6060
"iterall": "^1.2.2",
6161
"jest": "^21.2.1",
@@ -64,15 +64,15 @@
6464
"keygrip": "^1.0.2",
6565
"linkify-it": "^2.0.3",
6666
"localstorage-memory": "^1.0.2",
67-
"lodash": "^4.17.4",
67+
"lodash": "^4.17.10",
6868
"lodash.intersection": "^4.4.0",
6969
"longjohn": "^0.2.12",
7070
"markdown-draft-js": "^0.6.3",
7171
"moment": "^2.18.1",
7272
"node-env-file": "^0.1.8",
73-
"node-localstorage": "^1.3.0",
73+
"node-localstorage": "^1.3.1",
7474
"now-env": "^3.0.1",
75-
"offline-plugin": "^4.8.4",
75+
"offline-plugin": "^4.9.1",
7676
"optics-agent": "^1.1.2",
7777
"passport": "^0.3.2",
7878
"passport-facebook": "^2.1.1",
@@ -82,18 +82,18 @@
8282
"postmark": "^1.4.1",
8383
"pre-commit": "^1.2.2",
8484
"prismjs": "^1.8.1",
85-
"query-string": "^5.0.0",
85+
"query-string": "5.1.1",
8686
"raven": "^2.0.2",
8787
"raven-js": "^3.18.1",
8888
"react": "^15.4.1",
89-
"react-app-rewire-styled-components": "^3.0.0",
89+
"react-app-rewire-styled-components": "^3.0.2",
9090
"react-app-rewired": "^1.0.5",
9191
"react-dom": "^15.4.1",
9292
"react-helmet": "5.x",
9393
"react-infinite-scroller-with-scroll-element": "^1.0.4",
9494
"react-loadable": "5.2.2",
9595
"react-modal": "^1.6.5",
96-
"react-redux": "^5.0.2",
96+
"react-redux": "^5.0.7",
9797
"react-remarkable": "^1.1.1",
9898
"react-router": "^4.0.0-beta.7",
9999
"react-router-dom": "^4.0.0-beta.7",
@@ -112,7 +112,7 @@
112112
"sanitize-filename": "^1.6.1",
113113
"serialize-javascript": "^1.4.0",
114114
"session-rethinkdb": "^2.0.0",
115-
"shortid": "^2.2.8",
115+
"shortid": "^2.2.12",
116116
"slate": "^0.20.1",
117117
"slate-markdown": "0.1.0",
118118
"slugg": "^1.1.0",

api/queries/search/searchCommunityMembers.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export default (args: Args, { loaders, user }: GraphQLContext) => {
3333
if (searchFilter && !searchFilter.communityId) return [];
3434
const userIds = content.hits.map(o => o.objectID);
3535
const input = userIds.map(userId => {
36+
/*eslint array-callback-return: "off"*/
3637
if (!searchFilter || !searchFilter.communityId) return;
3738
return [userId, searchFilter.communityId];
3839
});

0 commit comments

Comments
 (0)