Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
0ba0bd0
Bump version to 3.5.0-develop
sampaiodiego Jun 30, 2020
986d2a7
Merge pull request #18083 from RocketChat/develop-sync
sampaiodiego Jun 30, 2020
92d6a40
[FIX] Corrects Typo in Analytics section of the admin page (#17984)
darigovresearch Jun 30, 2020
98a935d
[FIX] Geolocation permission being asked on load (#18030)
gabriellsh Jun 30, 2020
f148fa4
[FIX] Misleading labels in Prune Messages (#18006)
gabriellsh Jun 30, 2020
2fa1746
[IMPROVE] Sort/Group list dropdown (#18081)
MartinSchoeler Jun 30, 2020
c575e48
[FIX] Not possible to read encrypted messages after disable E2E on ch…
rodrigok Jul 1, 2020
17bae05
Handle callback returning promise. (#18102)
renatobecker Jul 1, 2020
3fdbd94
[FIX] Avatar ETag missing from User (#18109)
gabriellsh Jul 1, 2020
e989e2b
[FIX] The livechat agent activity monitor wasn't being initialised be…
paulobernardoaf Jul 1, 2020
b7e7ebe
[FIX] Email notifications were still being sent for online users (#18…
Densik Jul 1, 2020
e5b85b6
[FIX] Jitsi opening twice (#18111)
ggazzo Jul 2, 2020
f96c9a1
[FIX] "Add reaction" icon missing when the viewport size is smaller t…
dudizilla Jul 2, 2020
53effb3
[FIX] Clipboard not working when permalinking a pinned message (#18047)
MartinSchoeler Jul 2, 2020
ff7c781
[FIX] App details returns to apps table, instead of previous page (#1…
gabriellsh Jul 3, 2020
96dd97d
[FIX] Cannot open admin when server uses ROOT_URL with subpath (#1810…
omarchehab98 Jul 4, 2020
a3e0e6e
[FIX] Old Data Migrations breaking upgrades (#18185)
pierre-lehnen-rc Jul 7, 2020
fd3ffe0
Update Apps-Engine version (#18212)
d-gubert Jul 8, 2020
af8c879
[FIX] Application not loading due to reverse proxy decoding API calls…
rodrigok Jul 9, 2020
2e2c4cc
[FIX] SAML login crashing when receiving an array of roles (#18224)
pierre-lehnen-rc Jul 9, 2020
d025656
[FIX] CAS login not merging users with local accounts (#18238)
pierre-lehnen-rc Jul 10, 2020
e4e3c3a
Update the API of React Hooks using Meteor's reactive system (#18226)
tassoevan Jul 11, 2020
8427e69
[FIX]Update link URL at AppsWhatIsIt (#18240)
tassoevan Jul 11, 2020
b711b12
Regression: Remove calls to Console API in useForm hook (#18244)
tassoevan Jul 11, 2020
c492c61
Rewrite Contextual Bar Discussion List in React (#18127)
ggazzo Jul 11, 2020
793e15d
[IMPROVE] Message action styles (#18190)
ggazzo Jul 13, 2020
6429353
[NEW] Sign in with apple (iOS client only) (#18258)
djorkaeffalexandre Jul 14, 2020
10ea922
[NEW] Added profile field to inform Nickname for users in order to be…
rodrigok Jul 15, 2020
a77d5b0
Regression: Message actions under "unread messages" warning (#18273)
gabriellsh Jul 15, 2020
20483a8
[NEW] External MP3 encoder worker for audio recording (#18277)
tassoevan Jul 17, 2020
12f5ce7
[FIX] Apps page loading indefinitely if no Markeplace data (#18274)
gabriellsh Jul 17, 2020
1bed297
[NEW] "My Account" rewritten (#18106)
ggazzo Jul 17, 2020
be55979
[FIX] Few adjustments to accept fuselage theme (#18009)
ggazzo Jul 17, 2020
4babbfe
Regression - Profile page crashing for users without password (#18287)
pierre-lehnen-rc Jul 17, 2020
1b31cb6
Regression: Account Sidebar not rendering properly (#18288)
gabriellsh Jul 17, 2020
02d69d0
[FIX] Fix sticky notifications not working (#18285)
ggazzo Jul 17, 2020
317cb2c
[FIX] View close uikit event sending wrong payload (#18289)
d-gubert Jul 17, 2020
fc2bff5
LingoHub based on develop (#18176)
engelgabriel Jul 17, 2020
bf5eb20
Rewrite: My Account > Integrations rewritten (#18290)
gabriellsh Jul 18, 2020
4b1b44a
[NEW] Update Apps-Engine version (#18271)
d-gubert Jul 18, 2020
42d41ba
[NEW] User profile and User card (#18194)
ggazzo Jul 18, 2020
874db4f
Update Apps-Engine to Beta version (#18294)
d-gubert Jul 20, 2020
01cb7f0
LingoHub based on develop (#18307)
engelgabriel Jul 20, 2020
d463e5f
[FIX] Closing the admin does not return to last opened room (#18308)
ggazzo Jul 20, 2020
6674257
[FIX] Don't show agent info in the transcript if the setting is disab…
antkaz Jul 20, 2020
dab320a
[FIX] Delete user warning message undefined (#18310)
gabriellsh Jul 20, 2020
ae7b9a1
[FIX][ENTERPRISE] Canned Responses not available to agents after they…
renatobecker Jul 20, 2020
dae7b70
[NEW][ENTERPRISE] Add support to license tags (#18093)
sampaiodiego Jul 21, 2020
b6a564f
[FIX] Merge user custom fields on LDAP sync (#17339)
tobiasge Jul 21, 2020
eb1272b
[FIX] "Join" button on thread when room is read only (#18314)
gabriellsh Jul 21, 2020
217c70e
[FIX] Error when fetching a nonexistent business hour from the server…
renatobecker Jul 21, 2020
f283aee
[IMPROVE] Mention autocomplete UI and performance improvements (#18309)
rodrigok Jul 21, 2020
163293e
[FIX] Local Account login error when both LDAP and Email 2FA are enab…
pierre-lehnen-rc Jul 21, 2020
13636d8
[FIX] SAML login saves invalid username when receiving multiple value…
pierre-lehnen-rc Jul 21, 2020
c4f2dd8
[NEW][ENTERPRISE] Push Notification Data Privacy (#18254)
pierre-lehnen-rc Jul 21, 2020
30acaef
[IMPROVE] Improve performance and remove agents when the department i…
Jul 21, 2020
022df82
Move the development guidelines to our handbook (#18026)
rodrigok Jul 21, 2020
47d1438
[FIX] Bug on entering token in connectivity services (#18317)
geekgonecrazy Jul 21, 2020
523e754
[IMPROVE] Change setting that blocks unauthenticated access to avatar…
djorkaeffalexandre Jul 21, 2020
9ef9163
[FIX] SlackBridge error (#18320)
sampaiodiego Jul 21, 2020
ba74996
Regression: Close UserCard if action opens a new page (#18319)
ggazzo Jul 21, 2020
73ffa29
Bump version to 3.5.0-rc.0
sampaiodiego Jul 21, 2020
2b63e4f
Regression: User Status selector (#18343)
gabriellsh Jul 21, 2020
dcb16db
Regression: Preferences crashing when User has no preferences set. (#…
gabriellsh Jul 21, 2020
83a13ad
Regression: Admin User password (#18350)
MartinSchoeler Jul 22, 2020
fd12ff2
[FIX] Update check not able to be disabled (#18339)
graywolf336 Jul 22, 2020
0a773ad
Merge remote-tracking branch 'origin/develop' into release-candidate
sampaiodiego Jul 23, 2020
b947cc5
Bump version to 3.5.0-rc.1
sampaiodiego Jul 23, 2020
4278642
Regression: Notification with id-only isn't showed by iOS devices (#1…
djorkaeffalexandre Jul 23, 2020
def02e9
Regression: Userinfo center avatar image (#18354)
MartinSchoeler Jul 23, 2020
59ca315
Regression: Thread Title not being escaped (#18356)
ggazzo Jul 23, 2020
467fb75
Regression: nickname field in user profile. (#18359)
gabriellsh Jul 24, 2020
a218915
Fix broken link on readme (#18358)
MartinSchoeler Jul 24, 2020
0b83fab
Regression: Fix defaultFields for null values (#18360)
sampaiodiego Jul 24, 2020
b5898c4
Merge remote-tracking branch 'origin/develop' into release-candidate
sampaiodiego Jul 24, 2020
e7d5bee
Bump version to 3.5.0-rc.2
sampaiodiego Jul 24, 2020
7886fa5
Regression: useStorage (#18370)
ggazzo Jul 24, 2020
944342d
Regression: MP3 worker (#18371)
ggazzo Jul 24, 2020
b8381ee
Regression: Wrong background in disabled inputs (#18372)
gabriellsh Jul 24, 2020
4e176de
Regression: Edit messages after opening thread (#18375)
gabriellsh Jul 24, 2020
1945555
Regression: Mentions in thread title (#18369)
ggazzo Jul 24, 2020
cf05327
Regression: Provide a fallback text when push notification is idOnly …
djorkaeffalexandre Jul 25, 2020
c8701e0
Merge remote-tracking branch 'origin/develop' into release-candidate
sampaiodiego Jul 25, 2020
70d1476
Bump version to 3.5.0-rc.3
sampaiodiego Jul 25, 2020
dfeebb8
[FIX] Push gateway and cloud integration (#18377)
sampaiodiego Jul 27, 2020
7152ffa
[FIX] File uploads for unknown file types but nothing is blocked (#18…
20051231 Jul 27, 2020
ecdae36
Regression: Fix useUserSubscription usage (#18378)
ggazzo Jul 27, 2020
6b3036e
Regression: useUserContext (#18385)
ggazzo Jul 27, 2020
b9e47ac
Regression: Return original message on push API (#18386)
sampaiodiego Jul 27, 2020
e1f0dc7
[FIX] Missing Privacy Terms Cloud Register warning (#18383)
gabriellsh Jul 27, 2020
ccc323f
Update Apps Engine to final (#18389)
sampaiodiego Jul 27, 2020
393b3ef
Merge remote-tracking branch 'origin/develop' into release-candidate
sampaiodiego Jul 27, 2020
c28599f
Bump version to 3.5.0-rc.4
sampaiodiego Jul 27, 2020
feff171
Merge remote-tracking branch 'origin/release-candidate' into release-…
sampaiodiego Jul 28, 2020
871dde2
Bump version to 3.5.0
sampaiodiego Jul 28, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .docker/Dockerfile.rhel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM registry.access.redhat.com/rhscl/nodejs-8-rhel7

ENV RC_VERSION 3.4.2
ENV RC_VERSION 3.5.0

MAINTAINER [email protected]

Expand Down
3 changes: 1 addition & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ packages/rocketchat-livechat/assets/rocketchat-livechat.min.js
packages/rocketchat-livechat/assets/rocket-livechat.js
app/theme/client/vendor/
app/ui/client/lib/Modernizr.js
public/mp3-realtime-worker.js
public/lame.min.js
public/packages/rocketchat_videobridge/client/public/external_api.js
packages/tap-i18n/lib/tap_i18next/tap_i18next-1.7.3.js
private/moment-locales/
public/livechat/
!.scripts
public/pdf.worker.min.js
public/workers/**/*
imports/client/
!/.storybook/
18 changes: 17 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
"error",
"prefer-single"
],
"indent": "off",
"no-extra-parens": "off",
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react/jsx-no-undef": "error",
Expand All @@ -87,7 +89,21 @@
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/indent": [
"error",
"tab"
"tab",
{
"SwitchCase": 1
}
],
"@typescript-eslint/no-extra-parens": [
"error",
"all",
{
"conditionalAssign": true,
"nestedBinaryExpressions": false,
"returnAssign": true,
"ignoreJSX": "all",
"enforceForArrowConditionals": false
}
],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/interface-name-prefix": [
Expand Down
230 changes: 2 additions & 228 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,235 +16,9 @@ The following is a set of guidelines for contributing to Rocket.Chat, which are

__Note:__ If there's a feature you'd like, there's a bug you'd like to fix, or you'd just like to get involved please raise an issue and start a conversation. We'll help as much as we can so you can get contributing - although we may not always be able to respond right away :)

## Setup
## Development Guidelines

Your development workstation needs to have at least 8GB RAM or more to be able to build the Rocket.Chat's source code.

Rocket.Chat runs on top of [Meteor](https://www.meteor.com/). To run it on development mode you need to [install Meteor](https://www.meteor.com/install) and clone/download the Rocket.Chat's code, then just open the code folder and run:
```shell
meteor npm install && meteor
```
It should build and run the application and database for you, now you can access the UI on (http://localhost:3000)

It's not necessary to install Nodejs or NPM, every time you need to use them you can run `meteor node` or `meteor npm`.

It's important to always run the NPM commands using `meteor npm` to ensure that you are installing the modules using the right Nodejs version.

## Coding

We provide a [.editorconfig](../.editorconfig) file that will help you to keep some standards in place.

### ECMAScript vs TypeScript

We are currently adopting TypeScript as the default language on our projects, the current codebase will be migrated incrementally from JavaScript to TypeScript.

While we still have a lot of JavaScript files you should not create new ones. As much as possible new code contributions should be in **TypeScript**.

### Blaze vs React

We are currently adopting React over Blaze as our UI engine, the current codebase is under migration and will continue. You will still find Blaze templates in our code. Code changes or contributions may need to be made in Blaze while we continue to evolve our components library.

[Fuselage](https://github.com/RocketChat/Rocket.Chat.Fuselage) is our component library based on React, check it out when contributing to the Rocket.Chat UI and feel free to contribute new components or fixes.

### Standards

Most of the coding standards are covered by ESLint configured at [.eslintrc](../.eslintrc), and most of them came from our own [ESLint Config Package](https://github.com/RocketChat/eslint-config-rocketchat).

Things not covered by `eslint`:

* Prefer longer/descriptive variable names, e.g. `error` vs `err`, unless dealing with common record properties already shortened, e.g. `rid` and `uid`
* Use return early pattern. [See more](https://blog.timoxley.com/post/47041269194/avoid-else-return-early)
* Prefer `Promise` over `callbacks`
* Prefer `await` over `then/catch`
* Don't create queries outside models, the query description should be inside the model class.
* Don't hardcode fields inside models. Same method can be used for different purposes, using different fields.
* Prefer create REST endpoints over Meteor methods
* Prefer call REST endpoints over Meteor methods when both are available
* v1 REST endpoints should follow the following pattern: `/api/v1/dashed-namespace.camelCaseAction`
* Prefer TypeScript over JavaScript. Check [ECMAScript vs TypeScript](#ecmascript-vs-typescript)

#### Blaze
* Import the HTML file from it's sibling JS/TS file

### Syntax check

Before submitting a PR you should get no errors on `eslint`.

To check your files run:

```shell
meteor npm run lint
```

## Tests

There are 2 types of tests we run on Rocket.Chat, **Unit** tests and **End to End** tests. The major difference is that End to End tests require a Rocket.Chat instance running to execute the API and UI checks.

### End to End Tests

First you need to run a Rocket.Chat server on **Test Mode** and on a **Empty Database**:
```shell
# Running with a local mongodb database
MONGO_URL=mongodb://localhost/empty MONGO_OPLOG_URL=mongodb://localhost/local TEST_MODE=true meteor
```
```shell
# Running with a local mongodb database but cleaning it before
mongo --eval "db.dropDatabase()" empty && MONGO_URL=mongodb://localhost/empty MONGO_OPLOG_URL=mongodb://localhost/local TEST_MODE=true meteor
```

Now you can run the tests:
```shell
meteor npm test
```

### Unit Tests

Unit tests are simpler to setup and run. They do not require a working Rocket.Chat instance.
```shell
meteor npm run testunit
```

It's possible to run on watch mode as well:
```shell
meteor npm run testunit-watch
```

<!-- ### Storybook -->

## Before Push your code

It's important to run the lint and tests before push your code or submit a Pull Request, otherwise your contribution may fail quickly on the CI. Reviewers are forced to demand fixes and the review of your contribution will be further delayed.

Rocket.Chat uses [husky](https://www.npmjs.com/package/husky) to run the **lint** and **unit tests** before proceed to the code push process, so you may notice a delay when pushing your code to your repository.

## Choosing a good PR title

It is very important to note that we use PR titles when creating our change log. Keep this in mind when you title your PR. Make sure the title makes sense to a person reading a releases' change log!

Keep your PR's title as short and concise as possible, use PR's description section, which you can find in the PR's template, to provide more details into the changelog.

Good titles require thinking from a user's point of view. Don't get technical and talk code or architecture. What is the actual user-facing feature or the bug fixed? For example:

```
[NEW] Allow search permissions and settings by name instead of only ID
```

Even it's being something new in the code the users already expect the filter to filter by what they see (translations), a better one would be:

```
[FIX] Permissions' search doesn't filter base on presented translation, only on internal ids
```

## Choosing the right PR tag

You can use several tags do describe your PR, i.e.: `[FIX]`, `[NEW]`, etc. You can use the descriptions below to better understand the meaning of each one, and decide which one you should use:

### `[NEW]`

#### When
- When adding a new feature that is important to the end user

#### How

Do not start repeating the section (`Add ...` or `New ...`)
Always describe what's being fixed, improved or added and not *how* it was fixed, improved or added.

Exemple of **bad** PR titles:

```
[NEW] Add ability to set tags in the Omnichannel room closing dialog
[NEW] Adds ability for Rocket.Chat Apps to create discussions
[NEW] Add MMS support to Voxtelesys
[NEW] Add Color variable to left sidebar
```

Exemple of **good** PR titles:

```
[NEW] Ability to set tags in the Omnichannel room closing dialog
[NEW] Ability for Rocket.Chat Apps to create discussions
[NEW] MMS support to Voxtelesys
[NEW] Color variable to left sidebar
```

### `[FIX]`

#### When
- When fixing something not working or behaving wrong from the end user perspective

#### How

Always describe what's being fixed and not *how* it was fixed.

Exemple of a **bad** PR title:

```
[FIX] Add Content-Type for public files with JWT
```

Exemple of a **good** PR title:

```
[FIX] Missing Content-Type header for public files with JWT
```

### `[IMPROVE]`

#### When
- When a change enhances a not buggy behavior. When in doubt if it's a Improve or Fix prefer to use as fix.

#### How
Always describe what's being improved and not *how* it was improved.

Exemple of **good** PR title:

```
[IMPROVE] Displays Nothing found on admin sidebar when search returns nothing
```

### `[BREAK]`

#### When
- When the changes affect a working feature

##### Back-End
- When the API contract (data structure and endpoints) are limited, expanded as required or removed
- When the business logic (permissions and roles) are limited, expanded (without migration) or removed

##### Front-End
- When the change limits (format, size, etc) or removes the ability of read or change the data (when the limitation was not caused by the back-end)

### Second tag e.g. `[NEW][ENTERPRISE]`

Use a second tag to group entries on the change log, we currently use it only for the Enterprise items but we are going to expand it's usage soon, please do not use it until we create a patter for it.

### Minor Changes

For those PRs that aren't important for the end user, we are working on a better pattern, but for now please use the same tags, use them without the brackets and in camel case:

```
Fix: Missing Content-Type header for public files with JWT
```

All those PRs will be grouped under the `Minor changes` section which is collapsed, so users can expand it to check for those minor things but they are not visible directly on changelog.

## Security Best Practices

- Never expose unnecessary data to the APIs' responses
- Always check for permissions or create new ones when you must expose sensitive data
- Never provide new APIs without rate limiters
- Always escape the user's input when rendering data
- Always limit the user's input size on server side
- Always execute the validations on the server side even when executing on the client side as well

## Performance Best Practices

- Prefer inform the fields you want, and only the necessary ones, when querying data from database over query the full documents
- Limit the number of returned records to a reasonable value
- Check if the query is using indexes, if it's not create new indexes
- Prefer queues over long executions
- Create new metrics to mesure things whenever possible
- Cache data and returns whenever possible
Check out our Handbook for the [Development Guidelines](https://handbook.rocket.chat/product/development/development-guidelines) on how to setup your enviroment, do code, test and push your code. There you find our patterns on how to compose your Pull Requests' titles to have your contribution accepted.

## Contributor License Agreement

Expand Down
Loading