Skip to content

Commit

Permalink
Merge remote-tracking branch 'rocket.chat/develop' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
SeRoNet Concourse committed Jul 1, 2021
2 parents fd79be1 + a7932bf commit 1b503d8
Show file tree
Hide file tree
Showing 222 changed files with 9,407 additions and 10,203 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public/livechat/
!.scripts
public/pdf.worker.min.js
public/workers/**/*
imports/client/
imports/client/**/*
!/.storybook/
ee/server/services/dist/**
!/.mocharc.js
Expand Down
2 changes: 2 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"prefer-single"
],
"indent": "off",
"no-dupe-class-members": "off",
"no-extra-parens": "off",
"no-spaced-func": "off",
"no-unused-vars": "off",
Expand Down Expand Up @@ -116,6 +117,7 @@
"enforceForArrowConditionals": false
}
],
"@typescript-eslint/no-dupe-class-members": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": ["error", {
"argsIgnorePattern": "^_",
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
path: |
./node_modules
./ee/server/services/node_modules
key: ${{ runner.OS }}-node_modules-2-${{ hashFiles('**/package-lock.json', '.github/workflows/build_and_test.yml') }}
key: ${{ runner.OS }}-node_modules-4-${{ hashFiles('**/package-lock.json', '.github/workflows/build_and_test.yml') }}

- name: Cache cypress
id: cache-cypress
Expand Down Expand Up @@ -249,7 +249,7 @@ jobs:
path: |
./node_modules
./ee/server/services/node_modules
key: ${{ runner.OS }}-node_modules-2-${{ hashFiles('**/package-lock.json', '.github/workflows/build_and_test.yml') }}
key: ${{ runner.OS }}-node_modules-4-${{ hashFiles('**/package-lock.json', '.github/workflows/build_and_test.yml') }}

- name: Cache cypress
id: cache-cypress
Expand Down Expand Up @@ -320,7 +320,7 @@ jobs:
path: |
./node_modules
./ee/server/services/node_modules
key: ${{ runner.OS }}-node_modules-2-${{ hashFiles('**/package-lock.json', '.github/workflows/build_and_test.yml') }}
key: ${{ runner.OS }}-node_modules-4-${{ hashFiles('**/package-lock.json', '.github/workflows/build_and_test.yml') }}

- name: Cache meteor local
uses: actions/cache@v2
Expand Down
14 changes: 7 additions & 7 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ [email protected]
[email protected]
[email protected]
[email protected]
[email protected].0
typescript@4.1.2
[email protected].1
typescript@4.2.2
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
mongo@1.10.1
mongo@1.11.0
[email protected]
[email protected]
[email protected]
Expand Down Expand Up @@ -62,16 +62,16 @@ pauli:accounts-linkedin
raix:handlebar-helpers
raix:ui-dropped-event

rocketchat:tap-i18n
rocketchat:tap-i18n@1.10.1
[email protected]
littledata:synced-cron

edgee:slingshot
jalik:[email protected]
accounts-base@1.8.0
accounts-base@1.9.0
[email protected]
[email protected]
[email protected].0
[email protected].1
[email protected]
htmljs
less
Expand All @@ -82,7 +82,7 @@ [email protected]
[email protected]
[email protected]
templating
[email protected].0
[email protected].1
[email protected]
rocketchat:oauth2-server
rocketchat:i18n
Expand Down
2 changes: 1 addition & 1 deletion .meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
METEOR@2.1.1
METEOR@2.2
78 changes: 39 additions & 39 deletions .meteor/versions
Original file line number Diff line number Diff line change
@@ -1,70 +1,70 @@
accounts-base@1.8.0
accounts-base@1.9.0
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected].0
[email protected].1
[email protected]
aldeed:[email protected]
[email protected]
[email protected]
[email protected].0
[email protected].1
[email protected]
[email protected]
[email protected]
blaze@2.3.4
blaze-html-templates@1.1.2
blaze-tools@1.0.10
blaze@2.5.0
blaze-html-templates@1.2.1
blaze-tools@1.1.2
[email protected]
[email protected]
caching-html-compiler@1.1.3
caching-html-compiler@1.2.0
[email protected]
cfs:[email protected]
[email protected]
[email protected]
dandv:[email protected]
[email protected]
[email protected].0
[email protected].1
[email protected]
[email protected]
[email protected].2
[email protected].3
[email protected]
[email protected]
dispatch:[email protected]
[email protected]
[email protected].0
[email protected].1
[email protected]
[email protected].0
[email protected].0
[email protected].1
[email protected].1
edgee:[email protected]
[email protected]
[email protected]
[email protected]
facebook-oauth@1.7.4
facebook-oauth@1.8.0
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
html-tools@1.0.11
htmljs@1.0.11
[email protected].3
[email protected].0
html-tools@1.1.2
htmljs@1.1.1
[email protected].4
[email protected].1
[email protected]
jalik:[email protected]
jalik:[email protected]
jalik:[email protected]
jparker:[email protected]
jparker:[email protected]
jparker:[email protected]
jquery@1.11.11
jquery@3.0.0
kadira:[email protected]
konecty:[email protected]
konecty:[email protected]
[email protected].0
[email protected].1
[email protected]
littledata:[email protected]
[email protected]
Expand All @@ -75,37 +75,37 @@ mdg:[email protected]
[email protected]
[email protected]
[email protected]
meteorhacks:[email protected].4
meteorhacks:[email protected].5
meteorspark:[email protected]
[email protected].3
[email protected].4
[email protected]
[email protected].1
[email protected].2
mizzao:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
mongo@1.10.1
mongo@1.11.1
[email protected]
[email protected]
[email protected].7
[email protected].8
mrt:[email protected]
mystor:[email protected]
nimble:[email protected]
nooitaf:[email protected]_1
[email protected].3
npm-mongo@3.8.1
[email protected].4
npm-mongo@3.9.0
[email protected]
[email protected]
[email protected]
[email protected].16
[email protected].18
[email protected]
ostrio:[email protected]
pauli:[email protected]
pauli:[email protected]
[email protected]
raix:eventemitter@0.1.3
raix:eventemitter@1.0.0
raix:[email protected]
raix:[email protected]
[email protected]
Expand All @@ -122,28 +122,28 @@ rocketchat:[email protected]
rocketchat:[email protected]
rocketchat:[email protected]
rocketchat:[email protected]
rocketchat:tap-i18n@1.9.1
rocketchat:tap-i18n@1.10.1
rocketchat:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
simple:[email protected]
[email protected].1
spacebars@1.0.15
spacebars-compiler@1.1.3
[email protected].3
spacebars@1.2.0
spacebars-compiler@1.2.1
[email protected]
[email protected]
templating@1.3.2
templating-compiler@1.3.3
templating-runtime@1.3.2
templating-tools@1.1.2
templating@1.4.1
templating-compiler@1.4.1
templating-runtime@1.5.0
templating-tools@1.2.0
[email protected]
[email protected]
typescript@4.1.2
typescript@4.2.2
[email protected]
[email protected]
[email protected].1
[email protected].0
[email protected].2
[email protected].1
[email protected]
1 change: 0 additions & 1 deletion .postcssrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"preserve": true
},
"postcss-media-minmax": {},
"postcss-selector-not": {},
"postcss-nested": {},
"autoprefixer": {}
},
Expand Down
1 change: 0 additions & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ module.exports = {
plugins: [
require('postcss-custom-properties')({ preserve: true }),
require('postcss-media-minmax')(),
require('postcss-selector-not')(),
require('postcss-nested')(),
require('autoprefixer')(),
require('postcss-url')({ url: ({ absolutePath, relativePath, url }) => {
Expand Down
2 changes: 1 addition & 1 deletion app/2fa/server/functions/resetTOTP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Users } from '../../../models/server/raw/index';
import { IUser } from '../../../../definition/IUser';

const sendResetNotification = async function(uid: string): Promise<void> {
const user: IUser = await Users.findOneById(uid, { projection: { language: 1, emails: 1 } });
const user = await Users.findOneById<Pick<IUser, 'language' | 'emails'>>(uid, { projection: { language: 1, emails: 1 } });
if (!user) {
throw new Meteor.Error('invalid-user');
}
Expand Down
37 changes: 22 additions & 15 deletions app/api/server/v1/rooms.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,30 +150,37 @@ API.v1.addRoute('rooms.cleanHistory', { authRequired: true }, {
post() {
const findResult = findRoomByIdOrName({ params: this.bodyParams });

if (!this.bodyParams.latest) {
const {
latest,
oldest,
inclusive = false,
limit,
excludePinned,
filesOnly,
ignoreThreads,
ignoreDiscussion,
users,
} = this.bodyParams;

if (!latest) {
return API.v1.failure('Body parameter "latest" is required.');
}

if (!this.bodyParams.oldest) {
if (!oldest) {
return API.v1.failure('Body parameter "oldest" is required.');
}

const latest = new Date(this.bodyParams.latest);
const oldest = new Date(this.bodyParams.oldest);

const inclusive = this.bodyParams.inclusive || false;

const count = Meteor.runAsUser(this.userId, () => Meteor.call('cleanRoomHistory', {
roomId: findResult._id,
latest,
oldest,
latest: new Date(latest),
oldest: new Date(oldest),
inclusive,
limit: this.bodyParams.limit,
excludePinned: [true, 'true', 1, '1'].includes(this.bodyParams.excludePinned),
filesOnly: [true, 'true', 1, '1'].includes(this.bodyParams.filesOnly),
ignoreThreads: [true, 'true', 1, '1'].includes(this.bodyParams.ignoreThreads),
ignoreDiscussion: [true, 'true', 1, '1'].includes(this.bodyParams.ignoreDiscussion),
fromUsers: this.bodyParams.users,
limit,
excludePinned: [true, 'true', 1, '1'].includes(excludePinned),
filesOnly: [true, 'true', 1, '1'].includes(filesOnly),
ignoreThreads: [true, 'true', 1, '1'].includes(ignoreThreads),
ignoreDiscussion: [true, 'true', 1, '1'].includes(ignoreDiscussion),
fromUsers: users,
}));

return API.v1.success({ count });
Expand Down
2 changes: 2 additions & 0 deletions app/authorization/server/startup.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ Meteor.startup(function() {
{ _id: 'remove-team-channel', roles: ['admin', 'owner', 'moderator'] },
{ _id: 'view-all-team-channels', roles: ['admin', 'owner'] },
{ _id: 'view-all-teams', roles: ['admin'] },
{ _id: 'remove-closed-livechat-room', roles: ['livechat-manager', 'admin'] },
{ _id: 'remove-livechat-department', roles: ['livechat-manager', 'admin'] },
];

for (const permission of permissions) {
Expand Down
4 changes: 4 additions & 0 deletions app/lib/server/startup/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,10 @@ settings.addGroup('General', function() {
],
public: true,
});
this.add('ECDH_Enabled', false, {
type: 'boolean',
alert: 'This_feature_is_currently_in_alpha',
});
this.section('UTF8', function() {
this.add('UTF8_Names_Validation', '[0-9a-zA-Z-_.]+', {
type: 'string',
Expand Down
Loading

0 comments on commit 1b503d8

Please sign in to comment.