diff --git a/.docker/Dockerfile b/.docker/Dockerfile index beaccef6157..8fe9e14c21b 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,6 +1,6 @@ FROM rocketchat/base:4 -ENV RC_VERSION 0.57.0-develop +ENV RC_VERSION 0.58.0-develop MAINTAINER buildmaster@rocket.chat diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 18487542d65..37465b0ef12 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,6 +1,40 @@ - + + +### Description: + + + +### Server Setup Information: + +* Version of Rocket.Chat Server: +* Operating System: +* Deployment Method(snap/docker/tar/etc): +* Number of Running Instances: +* DB Replicaset Oplog: +* Node Version: + +### Steps to Reproduce: + +1. +2. +3. + +### Expected behavior: + + + +### Actual behavior: + + + +### Relevant logs: + + diff --git a/.meteor/packages b/.meteor/packages index 50de15d3ab6..332bcbcb048 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -4,18 +4,18 @@ # but you can also edit it by hand. rocketchat:cors -accounts-facebook@1.2.0 +accounts-facebook@1.2.1 accounts-github@1.3.0 accounts-google@1.2.0 accounts-meteor-developer@1.3.0 -accounts-password@1.3.6 +accounts-password@1.4.0 accounts-twitter@1.3.0 blaze-html-templates check@1.2.5 ddp-rate-limiter@1.0.7 -ecmascript@0.8.0 +ecmascript@0.8.1 ejson@1.0.13 -email@1.2.1 +email@1.2.3 fastclick@1.0.13 http@1.2.12 jquery@1.11.10 @@ -23,7 +23,7 @@ less@2.7.9 logging@1.1.17 meteor-base@1.1.0 mobile-experience@1.0.4 -mongo@1.1.18 +mongo@1.1.19 random@1.0.10 rate-limit@1.0.8 reactive-dict@1.1.9 @@ -31,9 +31,9 @@ reactive-var@1.0.11 reload@1.1.11 service-configuration@1.0.11 session@1.1.7 -shell-server@0.2.3 +shell-server@0.2.4 spacebars -standard-minifier-js@2.1.0 +standard-minifier-js@2.1.1 tracker@1.1.3 rocketchat:2fa @@ -98,6 +98,7 @@ rocketchat:slackbridge rocketchat:slashcommands-archive rocketchat:slashcommands-asciiarts rocketchat:slashcommands-create +rocketchat:slashcommands-help rocketchat:slashcommands-invite rocketchat:slashcommands-invite-all rocketchat:slashcommands-join @@ -149,7 +150,7 @@ jalik:ufs-gridfs jparker:gravatar kadira:blaze-layout kadira:flow-router -kenton:accounts-sandstorm +#kenton:accounts-sandstorm mizzao:autocomplete mizzao:timesync mrt:reactive-store @@ -171,4 +172,4 @@ yasaricli:slugify yasinuslu:blaze-meta deepwell:bootstrap-datepicker2 rocketchat:postcss -dynamic-import +dynamic-import@0.1.1 diff --git a/.meteor/release b/.meteor/release index 025f64e7073..1e7fc5b564c 100644 --- a/.meteor/release +++ b/.meteor/release @@ -1 +1 @@ -METEOR@1.5 +METEOR@1.5.1 diff --git a/.meteor/versions b/.meteor/versions index f55de24ec9d..a3e31ef5345 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -1,22 +1,22 @@ -accounts-base@1.3.0 -accounts-facebook@1.2.0 +accounts-base@1.3.1 +accounts-facebook@1.2.1 accounts-github@1.3.0 accounts-google@1.2.0 accounts-meteor-developer@1.3.0 accounts-oauth@1.1.15 -accounts-password@1.3.7 +accounts-password@1.4.0 accounts-twitter@1.3.0 aldeed:simple-schema@1.5.3 -allow-deny@1.0.5 +allow-deny@1.0.6 autoupdate@1.3.12 -babel-compiler@6.19.2 +babel-compiler@6.19.4 babel-runtime@1.0.1 base64@1.0.10 binary-heap@1.0.10 blaze@2.3.2 blaze-html-templates@1.1.2 blaze-tools@1.0.10 -boilerplate-generator@1.1.0 +boilerplate-generator@1.1.1 caching-compiler@1.1.9 caching-html-compiler@1.1.2 callback-hook@1.0.10 @@ -24,25 +24,25 @@ cfs:http-methods@0.0.32 check@1.2.5 coffeescript@1.12.6_1 dandv:caret-position@2.1.1 -ddp@1.2.5 -ddp-client@1.3.4 -ddp-common@1.2.8 +ddp@1.3.0 +ddp-client@2.0.0 +ddp-common@1.2.9 ddp-rate-limiter@1.0.7 -ddp-server@1.3.14 +ddp-server@2.0.0 deepwell:bootstrap-datepicker2@1.3.0 deps@1.0.12 diff-sequence@1.0.7 dispatch:run-as-user@1.1.1 dynamic-import@0.1.1 -ecmascript@0.8.0 +ecmascript@0.8.2 ecmascript-runtime@0.4.1 -ecmascript-runtime-client@0.4.2 +ecmascript-runtime-client@0.4.3 ecmascript-runtime-server@0.4.1 edgee:slingshot@0.7.1 ejson@1.0.13 email@1.2.3 -emojione:emojione@3.0.3 -facebook-oauth@1.3.1 +emojione:emojione@2.2.6 +facebook-oauth@1.3.2 fastclick@1.0.13 francocatena:status@1.5.3 geojson-utils@1.0.10 @@ -62,7 +62,6 @@ jparker:gravatar@0.5.1 jquery@1.11.10 kadira:blaze-layout@2.3.0 kadira:flow-router@2.12.1 -kenton:accounts-sandstorm@0.6.0 konecty:change-case@2.3.0 konecty:delayed-task@1.0.0 konecty:mongo-counter@0.0.5_3 @@ -72,26 +71,26 @@ konecty:user-presence@1.2.9 launch-screen@1.1.1 less@2.7.9 livedata@1.0.18 -localstorage@1.1.0 +localstorage@1.1.1 logging@1.1.17 matb33:collection-hooks@0.8.4 mdg:validation-error@0.5.1 -meteor@1.6.1 +meteor@1.7.0 meteor-base@1.1.0 meteor-developer-oauth@1.2.0 meteorhacks:inject-initial@1.0.4 meteorhacks:meteorx@1.4.1 meteorspark:util@0.2.0 minifier-css@1.2.16 -minifier-js@2.1.0 +minifier-js@2.1.1 minimongo@1.2.1 mizzao:autocomplete@0.5.1 mizzao:timesync@0.3.4 mobile-experience@1.0.4 mobile-status-bar@1.0.14 -modules@0.9.1 +modules@0.9.2 modules-runtime@0.8.0 -mongo@1.1.18 +mongo@1.1.19 mongo-id@1.0.6 mongo-livedata@1.0.12 mrt:reactive-store@0.0.1 @@ -106,7 +105,7 @@ oauth2@1.1.11 observe-sequence@1.0.16 ordered-dict@1.0.9 ostrio:cookies@2.2.1 -pauli:accounts-linkedin@2.1.2 +pauli:accounts-linkedin@2.1.3 pauli:linkedin-oauth@1.1.0 percolate:synced-cron@1.3.2 promise@0.8.9 @@ -191,6 +190,7 @@ rocketchat:slackbridge@0.0.1 rocketchat:slashcommands-archive@0.0.1 rocketchat:slashcommands-asciiarts@0.0.1 rocketchat:slashcommands-create@0.0.1 +rocketchat:slashcommands-help@0.0.1 rocketchat:slashcommands-invite@0.0.1 rocketchat:slashcommands-invite-all@0.0.1 rocketchat:slashcommands-join@0.0.1 @@ -227,13 +227,13 @@ routepolicy@1.0.12 service-configuration@1.0.11 session@1.1.7 sha@1.0.9 -shell-server@0.2.3 +shell-server@0.2.4 simple:json-routes@2.1.0 smoral:sweetalert@1.1.1 spacebars@1.0.15 spacebars-compiler@1.1.2 srp@1.0.10 -standard-minifier-js@2.1.0 +standard-minifier-js@2.1.1 steffo:meteor-accounts-saml@0.0.1 tap:i18n@1.8.2 templating@1.3.2 @@ -249,7 +249,7 @@ ui@1.0.13 underscore@1.0.10 underscorestring:underscore.string@3.3.4 url@1.1.0 -webapp@1.3.16 +webapp@1.3.17 webapp-hashing@1.0.9 yasaricli:slugify@0.0.7 yasinuslu:blaze-meta@0.3.3 diff --git a/.sandstorm/sandstorm-pkgdef.capnp b/.sandstorm/sandstorm-pkgdef.capnp index c794307a7de..eb803ec9545 100644 --- a/.sandstorm/sandstorm-pkgdef.capnp +++ b/.sandstorm/sandstorm-pkgdef.capnp @@ -21,7 +21,7 @@ const pkgdef :Spk.PackageDefinition = ( appVersion = 62, # Increment this for every release. - appMarketingVersion = (defaultText = "0.57.0-develop"), + appMarketingVersion = (defaultText = "0.58.0-develop"), # Human-readable representation of appVersion. Should match the way you # identify versions of your app in documentation and marketing. diff --git a/.snapcraft/candidate/snapcraft.yaml b/.snapcraft/candidate/snapcraft.yaml index 567d2e47900..2a4d3c71975 100644 --- a/.snapcraft/candidate/snapcraft.yaml +++ b/.snapcraft/candidate/snapcraft.yaml @@ -39,7 +39,7 @@ apps: parts: node: plugin: nodejs - node-engine: 4.8.1 + node-engine: 4.8.3 node-packages: - promise - fibers diff --git a/.snapcraft/edge/snapcraft.yaml b/.snapcraft/edge/snapcraft.yaml index 2934d80e590..d12d69d8393 100644 --- a/.snapcraft/edge/snapcraft.yaml +++ b/.snapcraft/edge/snapcraft.yaml @@ -39,7 +39,7 @@ apps: parts: node: plugin: nodejs - node-engine: 4.8.1 + node-engine: 4.8.3 node-packages: - promise - fibers diff --git a/.snapcraft/stable/snapcraft.yaml b/.snapcraft/stable/snapcraft.yaml index e548ef967a8..f61321281a2 100644 --- a/.snapcraft/stable/snapcraft.yaml +++ b/.snapcraft/stable/snapcraft.yaml @@ -39,7 +39,7 @@ apps: parts: node: plugin: nodejs - node-engine: 4.8.1 + node-engine: 4.8.3 node-packages: - promise - fibers diff --git a/.travis/snap.sh b/.travis/snap.sh index 8b602fa558c..5bb61d473ec 100755 --- a/.travis/snap.sh +++ b/.travis/snap.sh @@ -17,7 +17,7 @@ elif [[ $TRAVIS_TAG ]]; then RC_VERSION=$TRAVIS_TAG else CHANNEL=edge - RC_VERSION=0.57.0-develop + RC_VERSION=0.58.0-develop fi echo "Preparing to trigger a snap release for $CHANNEL channel" diff --git a/HISTORY.md b/HISTORY.md index 4cb22ca5c63..b0dd35a2e5f 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,10 +1,277 @@ - -# NEXT + +## 0.57.2 (2017-07-14) + + +### Bug Fixes + +- [#7472](https://github.com/RocketChat/Rocket.Chat/pull/7472) Always set LDAP properties on login +- [#7431](https://github.com/RocketChat/Rocket.Chat/pull/7431) Fix Emails in User Admin View +- [#7469](https://github.com/RocketChat/Rocket.Chat/pull/7469) Fix file upload on Slack import +- [#7432](https://github.com/RocketChat/Rocket.Chat/pull/7432) Fix Private Channel List Submit +- [#7403](https://github.com/RocketChat/Rocket.Chat/pull/7403) Fix Unread Bar Disappearing +- [#7443](https://github.com/RocketChat/Rocket.Chat/pull/7443) S3 uploads not working for custom URLs + + + + +## 0.57.1 (2017-07-06) +- :hand: [#7428](https://github.com/RocketChat/Rocket.Chat/pull/7428) Fix migration of avatars from version 0.57.0 + +
+Others + +- [#7428](https://github.com/RocketChat/Rocket.Chat/pull/7428) Run avatar migration on startup +
+ + + + +# 0.57.0 (2017-07-03) ### Breaking Changes -- [#7095](https://github.com/RocketChat/Rocket.Chat/pull/7095) Internal hubot does not load [hubot-scripts](https://github.com/github/hubot-scripts) anymore. +- :hand: [#7095](https://github.com/RocketChat/Rocket.Chat/pull/7095) Internal hubot does not load [hubot-scripts](https://github.com/github/hubot-scripts) anymore. + +### New Features + +- [#7085](https://github.com/RocketChat/Rocket.Chat/pull/7085) API method and REST Endpoint for getting a single message by id +- [#6919](https://github.com/RocketChat/Rocket.Chat/pull/6919) Feature/delete any message permission +- [#6938](https://github.com/RocketChat/Rocket.Chat/pull/6938) Improve CI/Docker build/release +- [#7059](https://github.com/RocketChat/Rocket.Chat/pull/7059) Increase unread message count on [@here](https://github.com/here) mention +- [#6921](https://github.com/RocketChat/Rocket.Chat/pull/6921) LDAP: Use variables in User_Data_FieldMap for name mapping +- [#6857](https://github.com/RocketChat/Rocket.Chat/pull/6857) Make channel/group delete call answer to roomName +- [#7080](https://github.com/RocketChat/Rocket.Chat/pull/7080) Migration to add tags to email header and footer +- [#6788](https://github.com/RocketChat/Rocket.Chat/pull/6788) New avatar storage types +- [#6690](https://github.com/RocketChat/Rocket.Chat/pull/6690) Show full name in mentions if use full name setting enabled +- [#6953](https://github.com/RocketChat/Rocket.Chat/pull/6953) Show info about multiple instances at admin page +- [#6605](https://github.com/RocketChat/Rocket.Chat/pull/6605) Start running unit tests +- [#7311](https://github.com/RocketChat/Rocket.Chat/pull/7311) Force use of MongoDB for spotlight queries + +### Bug Fixes + +- [#7025](https://github.com/RocketChat/Rocket.Chat/pull/7025) Add and to header and footer +- [#7084](https://github.com/RocketChat/Rocket.Chat/pull/7084) Add option to ignore TLS in SMTP server settings +- [#7072](https://github.com/RocketChat/Rocket.Chat/pull/7072) Add support for carriage return in markdown code blocks +- [#6910](https://github.com/RocketChat/Rocket.Chat/pull/6910) Allow image insert from slack through slackbridge +- [#6904](https://github.com/RocketChat/Rocket.Chat/pull/6904) Bugs in `isUserFromParams` helper +- [#6840](https://github.com/RocketChat/Rocket.Chat/pull/6840) Check that username is not in the room when being muted / unmuted +- [#7103](https://github.com/RocketChat/Rocket.Chat/pull/7103) clipboard (permalink, copy, pin, star buttons) +- [#7030](https://github.com/RocketChat/Rocket.Chat/pull/7030) do only store password if LDAP_Login_Fallback is on +- [#7105](https://github.com/RocketChat/Rocket.Chat/pull/7105) edit button on firefox +- [#6935](https://github.com/RocketChat/Rocket.Chat/pull/6935) Error when trying to show preview of undefined filetype +- [#7045](https://github.com/RocketChat/Rocket.Chat/pull/7045) Fix avatar upload via users.setAvatar REST endpoint +- [#6950](https://github.com/RocketChat/Rocket.Chat/pull/6950) Fix badge counter on iOS push notifications +- [#7121](https://github.com/RocketChat/Rocket.Chat/pull/7121) fix bug in preview image +- [#6972](https://github.com/RocketChat/Rocket.Chat/pull/6972) Fix error handling for non-valid avatar URL +- [#6974](https://github.com/RocketChat/Rocket.Chat/pull/6974) Fix login with Meteor saving an object as email address +- [#7104](https://github.com/RocketChat/Rocket.Chat/pull/7104) Fix missing CSS files on production builds +- [#6986](https://github.com/RocketChat/Rocket.Chat/pull/6986) Fix the other tests failing due chimp update +- [#7049](https://github.com/RocketChat/Rocket.Chat/pull/7049) Improve Tests +- [#6968](https://github.com/RocketChat/Rocket.Chat/pull/6968) make channels.create API check for create-c +- [#7044](https://github.com/RocketChat/Rocket.Chat/pull/7044) New screen sharing Chrome extension checking method +- [#6999](https://github.com/RocketChat/Rocket.Chat/pull/6999) overlapping text for users-typing-message +- [#7014](https://github.com/RocketChat/Rocket.Chat/pull/7014) Parse HTML on admin setting's descriptions +- [#6997](https://github.com/RocketChat/Rocket.Chat/pull/6997) Parse markdown links last +- [#7033](https://github.com/RocketChat/Rocket.Chat/pull/7033) Prevent Ctrl key on message field from reloading messages list +- [#6912](https://github.com/RocketChat/Rocket.Chat/pull/6912) Remove room from roomPick setting +- [#6961](https://github.com/RocketChat/Rocket.Chat/pull/6961) SAML: Only set KeyDescriptor when non empty +- [#7023](https://github.com/RocketChat/Rocket.Chat/pull/7023) Sidenav roomlist +- [#6913](https://github.com/RocketChat/Rocket.Chat/pull/6913) Slackbridge text replacements +- [#6903](https://github.com/RocketChat/Rocket.Chat/pull/6903) Updating Incoming Integration Post As Field Not Allowed +- [#6947](https://github.com/RocketChat/Rocket.Chat/pull/6947) Use AWS Signature Version 4 signed URLs for uploads +- [#7012](https://github.com/RocketChat/Rocket.Chat/pull/7012) video message recording dialog is shown in an incorrect position +- [#7157](https://github.com/RocketChat/Rocket.Chat/pull/7157) Fix all reactions having the same username +- [#7215](https://github.com/RocketChat/Rocket.Chat/pull/7215/) Fix the Zapier oAuth return url to the new one +- [#7209](https://github.com/RocketChat/Rocket.Chat/pull/7209) "requirePasswordChange" property not being saved when set to false +- [#7208](https://github.com/RocketChat/Rocket.Chat/pull/7208) Fix oembed previews not being shown +- [#7200](https://github.com/RocketChat/Rocket.Chat/pull/7200) Fix editing others messages +- [#7160](https://github.com/RocketChat/Rocket.Chat/pull/7160) Removing the kadira package install from example build script. +- [#7345](https://github.com/RocketChat/Rocket.Chat/pull/7345) click on image in a message +- [#7207](https://github.com/RocketChat/Rocket.Chat/pull/7207) Fix Block Delete Message After (n) Minutes +- [#7320](https://github.com/RocketChat/Rocket.Chat/pull/7320) Fix jump to unread button +- [#7321](https://github.com/RocketChat/Rocket.Chat/pull/7321) Fix Secret Url +- [#7358](https://github.com/RocketChat/Rocket.Chat/pull/7358) Fix user's customFields not being saved correctly +- [#7352](https://github.com/RocketChat/Rocket.Chat/pull/7352) Improve avatar migration +- [#7304](https://github.com/RocketChat/Rocket.Chat/pull/7304) Proxy upload to correct instance +- [#7379](https://github.com/RocketChat/Rocket.Chat/pull/7379) Message being displayed unescaped + + +
+Others + +- [#7094](https://github.com/RocketChat/Rocket.Chat/pull/7094) [FIX]Fix the failing tests +- [#7092](https://github.com/RocketChat/Rocket.Chat/pull/7092) [FIX]Fixed typo hmtl -> html +- [#7145](https://github.com/RocketChat/Rocket.Chat/pull/7145) Convert file unsubscribe.coffee to js +- [#7146](https://github.com/RocketChat/Rocket.Chat/pull/7146) Convert hipchat importer to js +- [#7022](https://github.com/RocketChat/Rocket.Chat/pull/7022) Convert irc package to js +- [#7096](https://github.com/RocketChat/Rocket.Chat/pull/7096) Convert Livechat from Coffeescript to JavaScript +- [#6936](https://github.com/RocketChat/Rocket.Chat/pull/6936) Convert meteor-autocomplete package to js +- [#7017](https://github.com/RocketChat/Rocket.Chat/pull/7017) Convert oauth2-server-config package to js +- [#6795](https://github.com/RocketChat/Rocket.Chat/pull/6795) Convert Ui Account Package to Js +- [#6911](https://github.com/RocketChat/Rocket.Chat/pull/6911) Convert ui-admin package to js +- [#6775](https://github.com/RocketChat/Rocket.Chat/pull/6775) Convert WebRTC Package to Js +- [#7018](https://github.com/RocketChat/Rocket.Chat/pull/7018) converted rocketchat-importer +- [#6836](https://github.com/RocketChat/Rocket.Chat/pull/6836) converted rocketchat-ui coffee to js part 2 +- [#6976](https://github.com/RocketChat/Rocket.Chat/pull/6976) fix the crashing tests +- [#7055](https://github.com/RocketChat/Rocket.Chat/pull/7055) Ldap: User_Data_FieldMap description +- [#7114](https://github.com/RocketChat/Rocket.Chat/pull/7114) LingoHub based on develop +- [#7005](https://github.com/RocketChat/Rocket.Chat/pull/7005) LingoHub based on develop +- [#6978](https://github.com/RocketChat/Rocket.Chat/pull/6978) LingoHub based on develop +- [#7062](https://github.com/RocketChat/Rocket.Chat/pull/7062) Remove Useless Jasmine Tests +- [#6914](https://github.com/RocketChat/Rocket.Chat/pull/6914) Rocketchat ui message +- [#7006](https://github.com/RocketChat/Rocket.Chat/pull/7006) Rocketchat ui3 +- [#6987](https://github.com/RocketChat/Rocket.Chat/pull/6987) rocketchat-importer-slack coffee to js +- [#6735](https://github.com/RocketChat/Rocket.Chat/pull/6735) rocketchat-lib[4] coffee to js +- [#7154](https://github.com/RocketChat/Rocket.Chat/pull/7154) Remove missing CoffeeScript dependencies +- [#7308](https://github.com/RocketChat/Rocket.Chat/pull/7308) Escape error messages +- [#7102](https://github.com/RocketChat/Rocket.Chat/pull/7102) add server methods getRoomNameById +
+ + +
+Details + +## 0.57.0-rc.3 (2017-06-28) + + +### New Features + +- [#7311](https://github.com/RocketChat/Rocket.Chat/pull/7311) Force use of MongoDB for spotlight queries + + +### Bug Fixes + +- [#7345](https://github.com/RocketChat/Rocket.Chat/pull/7345) click on image in a message +- [#7207](https://github.com/RocketChat/Rocket.Chat/pull/7207) Fix Block Delete Message After (n) Minutes +- [#7320](https://github.com/RocketChat/Rocket.Chat/pull/7320) Fix jump to unread button +- [#7321](https://github.com/RocketChat/Rocket.Chat/pull/7321) Fix Secret Url +- [#7358](https://github.com/RocketChat/Rocket.Chat/pull/7358) Fix user's customFields not being saved correctly +- [#7352](https://github.com/RocketChat/Rocket.Chat/pull/7352) Improve avatar migration +- [#7304](https://github.com/RocketChat/Rocket.Chat/pull/7304) Proxy upload to correct instance + + +
+Others + +- [#7308](https://github.com/RocketChat/Rocket.Chat/pull/7308) Escape error messages +
+ + + +## 0.57.0-rc.2 (2017-06-12) + + +### Bug Fixes + +- [#7215](https://github.com/RocketChat/Rocket.Chat/pull/7215/) Fix the Zapier oAuth return url to the new one +- [#7209](https://github.com/RocketChat/Rocket.Chat/pull/7209) "requirePasswordChange" property not being saved when set to false +- [#7208](https://github.com/RocketChat/Rocket.Chat/pull/7208) Fix oembed previews not being shown +- [#7200](https://github.com/RocketChat/Rocket.Chat/pull/7200) Fix editing others messages +- [#7160](https://github.com/RocketChat/Rocket.Chat/pull/7160) Removing the kadira package install from example build script. + + + +## 0.57.0-rc.1 (2017-06-02) + + +### Bug Fixes + +- [#7157](https://github.com/RocketChat/Rocket.Chat/pull/7157) Fix all reactions having the same username + + +
+Others + +- [#7154](https://github.com/RocketChat/Rocket.Chat/pull/7154) Remove missing CoffeeScript dependencies +
+ + +## 0.57.0-rc.0 (2017-06-01) + + +### New Features + +- [#7085](https://github.com/RocketChat/Rocket.Chat/pull/7085) API method and REST Endpoint for getting a single message by id +- [#6919](https://github.com/RocketChat/Rocket.Chat/pull/6919) Feature/delete any message permission +- [#6938](https://github.com/RocketChat/Rocket.Chat/pull/6938) Improve CI/Docker build/release +- [#7059](https://github.com/RocketChat/Rocket.Chat/pull/7059) Increase unread message count on [@here](https://github.com/here) mention +- [#6921](https://github.com/RocketChat/Rocket.Chat/pull/6921) LDAP: Use variables in User_Data_FieldMap for name mapping +- [#6857](https://github.com/RocketChat/Rocket.Chat/pull/6857) Make channel/group delete call answer to roomName +- [#7080](https://github.com/RocketChat/Rocket.Chat/pull/7080) Migration to add tags to email header and footer +- [#6788](https://github.com/RocketChat/Rocket.Chat/pull/6788) New avatar storage types +- [#6690](https://github.com/RocketChat/Rocket.Chat/pull/6690) Show full name in mentions if use full name setting enabled +- [#6953](https://github.com/RocketChat/Rocket.Chat/pull/6953) Show info about multiple instances at admin page +- [#6605](https://github.com/RocketChat/Rocket.Chat/pull/6605) Start running unit tests + + +### Bug Fixes + +- [#7025](https://github.com/RocketChat/Rocket.Chat/pull/7025) Add and to header and footer +- [#7084](https://github.com/RocketChat/Rocket.Chat/pull/7084) Add option to ignore TLS in SMTP server settings +- [#7072](https://github.com/RocketChat/Rocket.Chat/pull/7072) Add support for carriage return in markdown code blocks +- [#6910](https://github.com/RocketChat/Rocket.Chat/pull/6910) Allow image insert from slack through slackbridge +- [#6904](https://github.com/RocketChat/Rocket.Chat/pull/6904) Bugs in `isUserFromParams` helper +- [#6840](https://github.com/RocketChat/Rocket.Chat/pull/6840) Check that username is not in the room when being muted / unmuted +- [#7103](https://github.com/RocketChat/Rocket.Chat/pull/7103) clipboard (permalink, copy, pin, star buttons) +- [#7030](https://github.com/RocketChat/Rocket.Chat/pull/7030) do only store password if LDAP_Login_Fallback is on +- [#7105](https://github.com/RocketChat/Rocket.Chat/pull/7105) edit button on firefox +- [#6935](https://github.com/RocketChat/Rocket.Chat/pull/6935) Error when trying to show preview of undefined filetype +- [#7045](https://github.com/RocketChat/Rocket.Chat/pull/7045) Fix avatar upload via users.setAvatar REST endpoint +- [#6950](https://github.com/RocketChat/Rocket.Chat/pull/6950) Fix badge counter on iOS push notifications +- [#7121](https://github.com/RocketChat/Rocket.Chat/pull/7121) fix bug in preview image +- [#6972](https://github.com/RocketChat/Rocket.Chat/pull/6972) Fix error handling for non-valid avatar URL +- [#6974](https://github.com/RocketChat/Rocket.Chat/pull/6974) Fix login with Meteor saving an object as email address +- [#7104](https://github.com/RocketChat/Rocket.Chat/pull/7104) Fix missing CSS files on production builds +- [#6986](https://github.com/RocketChat/Rocket.Chat/pull/6986) Fix the other tests failing due chimp update +- [#7049](https://github.com/RocketChat/Rocket.Chat/pull/7049) Improve Tests +- [#6968](https://github.com/RocketChat/Rocket.Chat/pull/6968) make channels.create API check for create-c +- [#7044](https://github.com/RocketChat/Rocket.Chat/pull/7044) New screen sharing Chrome extension checking method +- [#6999](https://github.com/RocketChat/Rocket.Chat/pull/6999) overlapping text for users-typing-message +- [#7014](https://github.com/RocketChat/Rocket.Chat/pull/7014) Parse HTML on admin setting's descriptions +- [#6997](https://github.com/RocketChat/Rocket.Chat/pull/6997) Parse markdown links last +- [#7033](https://github.com/RocketChat/Rocket.Chat/pull/7033) Prevent Ctrl key on message field from reloading messages list +- [#6912](https://github.com/RocketChat/Rocket.Chat/pull/6912) Remove room from roomPick setting +- [#6961](https://github.com/RocketChat/Rocket.Chat/pull/6961) SAML: Only set KeyDescriptor when non empty +- [#7023](https://github.com/RocketChat/Rocket.Chat/pull/7023) Sidenav roomlist +- [#6913](https://github.com/RocketChat/Rocket.Chat/pull/6913) Slackbridge text replacements +- [#6903](https://github.com/RocketChat/Rocket.Chat/pull/6903) Updating Incoming Integration Post As Field Not Allowed +- [#6947](https://github.com/RocketChat/Rocket.Chat/pull/6947) Use AWS Signature Version 4 signed URLs for uploads +- [#7012](https://github.com/RocketChat/Rocket.Chat/pull/7012) video message recording dialog is shown in an incorrect position + + +
+Others + +- [#7094](https://github.com/RocketChat/Rocket.Chat/pull/7094) [FIX]Fix the failing tests +- [#7092](https://github.com/RocketChat/Rocket.Chat/pull/7092) [FIX]Fixed typo hmtl -> html +- [#7145](https://github.com/RocketChat/Rocket.Chat/pull/7145) Convert file unsubscribe.coffee to js +- [#7146](https://github.com/RocketChat/Rocket.Chat/pull/7146) Convert hipchat importer to js +- [#7022](https://github.com/RocketChat/Rocket.Chat/pull/7022) Convert irc package to js +- [#7096](https://github.com/RocketChat/Rocket.Chat/pull/7096) Convert Livechat from Coffeescript to JavaScript +- [#6936](https://github.com/RocketChat/Rocket.Chat/pull/6936) Convert meteor-autocomplete package to js +- [#7017](https://github.com/RocketChat/Rocket.Chat/pull/7017) Convert oauth2-server-config package to js +- [#6795](https://github.com/RocketChat/Rocket.Chat/pull/6795) Convert Ui Account Package to Js +- [#6911](https://github.com/RocketChat/Rocket.Chat/pull/6911) Convert ui-admin package to js +- [#6775](https://github.com/RocketChat/Rocket.Chat/pull/6775) Convert WebRTC Package to Js +- [#7018](https://github.com/RocketChat/Rocket.Chat/pull/7018) converted rocketchat-importer +- [#6836](https://github.com/RocketChat/Rocket.Chat/pull/6836) converted rocketchat-ui coffee to js part 2 +- [#6976](https://github.com/RocketChat/Rocket.Chat/pull/6976) fix the crashing tests +- [#7055](https://github.com/RocketChat/Rocket.Chat/pull/7055) Ldap: User_Data_FieldMap description +- [#7114](https://github.com/RocketChat/Rocket.Chat/pull/7114) LingoHub based on develop +- [#7005](https://github.com/RocketChat/Rocket.Chat/pull/7005) LingoHub based on develop +- [#6978](https://github.com/RocketChat/Rocket.Chat/pull/6978) LingoHub based on develop +- [#7062](https://github.com/RocketChat/Rocket.Chat/pull/7062) Remove Useless Jasmine Tests +- [#6914](https://github.com/RocketChat/Rocket.Chat/pull/6914) Rocketchat ui message +- [#7006](https://github.com/RocketChat/Rocket.Chat/pull/7006) Rocketchat ui3 +- [#6987](https://github.com/RocketChat/Rocket.Chat/pull/6987) rocketchat-importer-slack coffee to js +- [#6735](https://github.com/RocketChat/Rocket.Chat/pull/6735) rocketchat-lib[4] coffee to js +
+ +
+ + + # 0.56.0 (2017-05-15) ### New Features diff --git a/README.md b/README.md index 1ef374f3383..a1de201ca5a 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ * [Ubuntu 16.04](#ubuntu-1604) * [Cloudron.io](#cloudronio) * [Heroku](#heroku) + * [Helm Kubernetes](#helm-kubernetes) * [Scalingo](#scalingo) * [Sloppy.io](#sloppyio) * [Docker](#docker) @@ -137,6 +138,9 @@ Host your own Rocket.Chat server for **FREE** with [One-Click Deploy](https://he [![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy?template=https://github.com/RocketChat/Rocket.Chat/tree/master) +## Helm Kubernetes +Deploy on Kubernetes using the official [helm chart](https://github.com/kubernetes/charts/pull/752). + ## Scalingo Deploy your own Rocket.Chat server instantly on [Scalingo](https://scalingo.com) diff --git a/app.json b/app.json index 1fe42a0e97e..ea31755dbbb 100644 --- a/app.json +++ b/app.json @@ -6,7 +6,6 @@ "keywords": ["meteor", "social", "community", "chat"], "website": "https://rocket.chat", "env": { - "NODE_ENV": "production", "BUILDPACK_URL": "https://github.com/RocketChat/meteor-buildpack-horse.git", "HEROKU_APP_NAME": { "description": "Please re-enter your App Name from the top.", diff --git a/client/lib/handleError.js b/client/lib/handleError.js index 703524a1bfd..821d7e7cb0d 100644 --- a/client/lib/handleError.js +++ b/client/lib/handleError.js @@ -9,8 +9,8 @@ this.handleError = function(error, useToastr = true) { } if (useToastr) { - return toastr.error(TAPi18n.__(error.error, error.details), error.details && error.details.errorTitle ? TAPi18n.__(error.details.errorTitle) : null); + return toastr.error(_.escapeHTML(TAPi18n.__(error.error, error.details)), error.details && error.details.errorTitle ? _.escapeHTML(TAPi18n.__(error.details.errorTitle)) : null); } - return TAPi18n.__(error.error, error.details); + return _.escapeHTML(TAPi18n.__(error.error, error.details)); }; diff --git a/client/methods/deleteMessage.js b/client/methods/deleteMessage.js index 8a86f3affc2..1827726fb85 100644 --- a/client/methods/deleteMessage.js +++ b/client/methods/deleteMessage.js @@ -1,5 +1,4 @@ import moment from 'moment'; -import toastr from 'toastr'; Meteor.methods({ deleteMessage(message) { @@ -22,17 +21,14 @@ Meteor.methods({ return false; } const blockDeleteInMinutes = RocketChat.settings.get('Message_AllowDeleting_BlockDeleteInMinutes'); - if (!(forceDelete) || (_.isNumber(blockDeleteInMinutes) && blockDeleteInMinutes !== 0)) { - if (message.ts) { - const msgTs = moment(message.ts); - if (msgTs) { - const currentTsDiff = moment().diff(msgTs, 'minutes'); - if (currentTsDiff > blockDeleteInMinutes) { - toastr.error(t('error-message-deleting-blocked')); - return false; - } - } + if (!forceDelete && _.isNumber(blockDeleteInMinutes) && blockDeleteInMinutes !== 0) { + const msgTs = moment(message.ts); + const currentTsDiff = moment().diff(msgTs, 'minutes'); + if (currentTsDiff > blockDeleteInMinutes) { + return false; } + + } Tracker.nonreactive(function() { diff --git a/example-build-run.sh b/example-build-run.sh new file mode 100755 index 00000000000..ddd41734de8 --- /dev/null +++ b/example-build-run.sh @@ -0,0 +1,32 @@ +#!/bin/bash +set -x +set -euvo pipefail +IFS=$'\n\t' + +# Requies Node.js version 4.x +# Do not run as root + +DEPLOY_DIR=/var/www/rocket.chat + +### BUILD +meteor npm install + +# on the very first build, meteor build command should fail due to a bug on emojione package (related to phantomjs installation) +# the command below forces the error to happen before build command (not needed on subsequent builds) +set +e +meteor add rocketchat:lib +set -e + +meteor build --server-only --directory $DEPLOY_DIR + +### RUN +cd $DEPLOY_DIR/bundle/programs/server +npm install + +cd $DEPLOY_DIR/bundle +NODE_ENV=production \ +PORT=3000 \ +ROOT_URL=http://localhost:3000 \ +MONGO_URL=mongodb://localhost:27017/rocketchat \ +MONGO_OPLOG_URL=mongodb://localhost:27017/local \ +node main.js diff --git a/example-build.sh b/example-build.sh deleted file mode 100755 index 06ac6246124..00000000000 --- a/example-build.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -set -x -set -euvo pipefail -IFS=$'\n\t' - -# Build -export NODE_ENV=production -meteor add rocketchat:internal-hubot -meteor build --server https://demo.rocket.chat --directory /var/www/rocket.chat - -# Run -export METEOR_SETTINGS=$(cat settings.json) -cd /var/www/rocket.chat/bundle/programs/server -npm install -cd /var/www/rocket.chat/current -pm2 startOrRestart /var/www/rocket.chat/current/pm2.json diff --git a/package.json b/package.json index f7d366b5bab..cf1f1913a86 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "Rocket.Chat", "description": "The Ultimate Open Source WebChat Platform", - "version": "0.57.0-develop", + "version": "0.58.0-develop", "author": { "name": "Rocket.Chat", "url": "https://rocket.chat/" @@ -54,7 +54,7 @@ "start": "meteor npm i && meteor", "lint": "eslint .", "lint-fix": "eslint . --fix", - "stylelint": "stylelint packages/**/*.{less,css}", + "stylelint": "stylelint 'packages/**/*.{less,css}'", "test": "node .scripts/start.js", "deploy": "npm run build && pm2 startOrRestart pm2.json", "chimp-watch": "chimp --ddp=http://localhost:3000 --watch --mocha --path=tests/end-to-end", @@ -79,30 +79,30 @@ "devDependencies": { "babel-mocha-es6-compiler": "^0.1.0", "babel-plugin-array-includes": "^2.0.3", - "chimp": "^0.49.0", - "conventional-changelog-cli": "^1.3.1", - "eslint": "^4.0.0", + "chimp": "^0.49.1", + "conventional-changelog-cli": "^1.3.2", + "eslint": "^4.2.0", "postcss-cssnext": "^2.11.0", - "postcss-smart-import": "^0.7.4", + "postcss-smart-import": "^0.7.5", "simple-git": "^1.73.0", - "stylelint": "^7.11.1", + "stylelint": "^7.13.0", "supertest": "^3.0.0" }, "dependencies": { - "@google-cloud/storage": "^1.1.1", - "aws-sdk": "^2.73.0", + "@google-cloud/storage": "^1.2.0", + "aws-sdk": "^2.86.0", "babel-runtime": "^6.23.0", "bcrypt": "^1.0.2", - "codemirror": "^5.26.0", + "codemirror": "^5.27.4", "file-type": "^5.2.0", "highlight.js": "^9.12.0", "jquery": "^3.2.1", - "mime-db": "^1.28.0", + "mime-db": "^1.29.0", "mime-type": "^3.0.5", "moment": "^2.18.1", "moment-timezone": "^0.5.13", "photoswipe": "^4.1.2", - "prom-client": "^9.1.1", + "prom-client": "^10.0.2", "semver": "^5.3.0", "toastr": "^2.1.2" } diff --git a/packages/rocketchat-2fa/client/accountSecurity.html b/packages/rocketchat-2fa/client/accountSecurity.html index 9ed51e09d06..ad8d6a1f231 100644 --- a/packages/rocketchat-2fa/client/accountSecurity.html +++ b/packages/rocketchat-2fa/client/accountSecurity.html @@ -14,7 +14,7 @@
- WARNING: Once you enable this, you will not be able to login on the native mobile apps (Rocket.Chat+) using your password until they implement the 2FA. + {{_ "Two-factor_authentication_native_mobile_app_warning"}}
{{#if isEnabled}} diff --git a/packages/rocketchat-api/server/v1/channels.js b/packages/rocketchat-api/server/v1/channels.js index 3d2e33387f9..95e10d278eb 100644 --- a/packages/rocketchat-api/server/v1/channels.js +++ b/packages/rocketchat-api/server/v1/channels.js @@ -332,13 +332,22 @@ RocketChat.API.v1.addRoute('channels.leave', { authRequired: true }, { RocketChat.API.v1.addRoute('channels.list', { authRequired: true }, { get: { - //This is like this only to provide an example of how we routes can be defined :X + //This is defined as such only to provide an example of how the routes can be defined :X action() { const { offset, count } = this.getPaginationItems(); const { sort, fields, query } = this.parseJsonQuery(); const ourQuery = Object.assign({}, query, { t: 'c' }); + //Special check for the permissions + if (RocketChat.authz.hasPermission(this.userId, 'view-joined-room')) { + ourQuery.usernames = { + $in: [ this.user.username ] + }; + } else if (!RocketChat.authz.hasPermission(this.userId, 'view-c-room')) { + return RocketChat.API.v1.unauthorized(); + } + const rooms = RocketChat.models.Rooms.find(ourQuery, { sort: sort ? sort : { name: 1 }, skip: offset, diff --git a/packages/rocketchat-api/server/v1/groups.js b/packages/rocketchat-api/server/v1/groups.js index d5c11136d38..f2b38a74761 100644 --- a/packages/rocketchat-api/server/v1/groups.js +++ b/packages/rocketchat-api/server/v1/groups.js @@ -64,6 +64,18 @@ RocketChat.API.v1.addRoute('groups.addOwner', { authRequired: true }, { } }); +RocketChat.API.v1.addRoute('groups.addLeader', { authRequired: true }, { + post() { + const findResult = findPrivateGroupByIdOrName({ params: this.requestParams(), userId: this.userId }); + const user = this.getUserFromParams(); + Meteor.runAsUser(this.userId, () => { + Meteor.call('addRoomLeader', findResult.rid, user._id); + }); + + return RocketChat.API.v1.success(); + } +}); + //Archives a private group only if it wasn't RocketChat.API.v1.addRoute('groups.archive', { authRequired: true }, { post() { @@ -373,6 +385,20 @@ RocketChat.API.v1.addRoute('groups.removeOwner', { authRequired: true }, { } }); +RocketChat.API.v1.addRoute('groups.removeLeader', { authRequired: true }, { + post() { + const findResult = findPrivateGroupByIdOrName({ params: this.requestParams(), userId: this.userId }); + + const user = this.getUserFromParams(); + + Meteor.runAsUser(this.userId, () => { + Meteor.call('removeRoomLeader', findResult.rid, user._id); + }); + + return RocketChat.API.v1.success(); + } +}); + RocketChat.API.v1.addRoute('groups.rename', { authRequired: true }, { post() { if (!this.bodyParams.name || !this.bodyParams.name.trim()) { diff --git a/packages/rocketchat-api/server/v1/users.js b/packages/rocketchat-api/server/v1/users.js index 2a9651c3098..924eca1b570 100644 --- a/packages/rocketchat-api/server/v1/users.js +++ b/packages/rocketchat-api/server/v1/users.js @@ -19,12 +19,17 @@ RocketChat.API.v1.addRoute('users.create', { authRequired: true }, { this.bodyParams.joinDefaultChannels = true; } + if (this.bodyParams.customFields) { + RocketChat.validateCustomFields(this.bodyParams.customFields); + } + const newUserId = RocketChat.saveUser(this.userId, this.bodyParams); if (this.bodyParams.customFields) { - RocketChat.saveCustomFields(newUserId, this.bodyParams.customFields); + RocketChat.saveCustomFieldsWithoutValidation(newUserId, this.bodyParams.customFields); } + if (typeof this.bodyParams.active !== 'undefined') { Meteor.runAsUser(this.userId, () => { Meteor.call('setUserActiveStatus', newUserId, this.bodyParams.active); @@ -105,6 +110,10 @@ RocketChat.API.v1.addRoute('users.info', { authRequired: true }, { RocketChat.API.v1.addRoute('users.list', { authRequired: true }, { get() { + if (!RocketChat.authz.hasPermission(this.userId, 'view-d-room')) { + return RocketChat.API.v1.unauthorized(); + } + const { offset, count } = this.getPaginationItems(); const { sort, fields, query } = this.parseJsonQuery(); diff --git a/packages/rocketchat-authorization/client/stylesheets/permissions.less b/packages/rocketchat-authorization/client/stylesheets/permissions.less index c970dbf8d1f..f82ebed1bb6 100644 --- a/packages/rocketchat-authorization/client/stylesheets/permissions.less +++ b/packages/rocketchat-authorization/client/stylesheets/permissions.less @@ -28,6 +28,10 @@ left: 50%; transform: translateX(-50%); } + + .permission-name { + cursor: default; + } } .empty-role { diff --git a/packages/rocketchat-authorization/client/views/permissions.html b/packages/rocketchat-authorization/client/views/permissions.html index 3d53eb803e4..e0e47d6b426 100644 --- a/packages/rocketchat-authorization/client/views/permissions.html +++ b/packages/rocketchat-authorization/client/views/permissions.html @@ -19,7 +19,7 @@ {{#each permission}} - {{_id}} + {{_ permissionName}}
[{{_id}}] {{#each role}} diff --git a/packages/rocketchat-authorization/client/views/permissions.js b/packages/rocketchat-authorization/client/views/permissions.js index 90f11510414..6205927af5a 100644 --- a/packages/rocketchat-authorization/client/views/permissions.js +++ b/packages/rocketchat-authorization/client/views/permissions.js @@ -21,6 +21,14 @@ Template.permissions.helpers({ } }, + permissionName() { + return `${ this._id }`; + }, + + permissionDescription() { + return `${ this._id }_description`; + }, + hasPermission() { return RocketChat.authz.hasAllPermission('access-permissions'); } diff --git a/packages/rocketchat-authorization/server/startup.js b/packages/rocketchat-authorization/server/startup.js index 3fe7771125d..d372b117ba0 100644 --- a/packages/rocketchat-authorization/server/startup.js +++ b/packages/rocketchat-authorization/server/startup.js @@ -46,6 +46,8 @@ Meteor.startup(function() { { _id: 'run-migration', roles : ['admin'] }, { _id: 'set-moderator', roles : ['admin', 'owner'] }, { _id: 'set-owner', roles : ['admin', 'owner'] }, + { _id: 'send-many-messages', roles : ['admin', 'bot'] }, + { _id: 'set-leader', roles : ['admin', 'owner'] }, { _id: 'unarchive-room', roles : ['admin'] }, { _id: 'view-c-room', roles : ['admin', 'user', 'bot', 'anonymous'] }, { _id: 'user-generate-access-token', roles : ['admin'] }, @@ -73,6 +75,7 @@ Meteor.startup(function() { const defaultRoles = [ { name: 'admin', scope: 'Users', description: 'Admin' }, { name: 'moderator', scope: 'Subscriptions', description: 'Moderator' }, + { name: 'leader', scope: 'Subscriptions', description: 'Leader' }, { name: 'owner', scope: 'Subscriptions', description: 'Owner' }, { name: 'user', scope: 'Users', description: '' }, { name: 'bot', scope: 'Users', description: '' }, diff --git a/packages/rocketchat-cas/cas_client.js b/packages/rocketchat-cas/cas_client.js index b8d2cc8b0ae..b0521fdba38 100644 --- a/packages/rocketchat-cas/cas_client.js +++ b/packages/rocketchat-cas/cas_client.js @@ -33,7 +33,9 @@ Meteor.loginWithCas = function(options, callback) { } const appUrl = Meteor.absoluteUrl().replace(/\/$/, '') + __meteor_runtime_config__.ROOT_URL_PATH_PREFIX; - const loginUrl = `${ login_url }?service=${ appUrl }/_cas/${ credentialToken }`; + // check if the provided CAS URL already has some parameters + const delim = (login_url.split('?').length > 1) ? '&' : '?'; + const loginUrl = `${ login_url }${ delim }service=${ appUrl }/_cas/${ credentialToken }`; const popup = openCenteredPopup( loginUrl, diff --git a/packages/rocketchat-cas/cas_server.js b/packages/rocketchat-cas/cas_server.js index d25e257daa7..deeebb39806 100644 --- a/packages/rocketchat-cas/cas_server.js +++ b/packages/rocketchat-cas/cas_server.js @@ -249,7 +249,9 @@ Accounts.registerLoginHandler(function(options) { ts: new Date(), open: true, alert: true, - unread: 1 + unread: 1, + userMentions: 1, + groupMentions: 0 }); } }); diff --git a/packages/rocketchat-channel-settings/client/lib/ChannelSettings.js b/packages/rocketchat-channel-settings/client/lib/ChannelSettings.js index 341a5b4c656..5aaed532ae7 100644 --- a/packages/rocketchat-channel-settings/client/lib/ChannelSettings.js +++ b/packages/rocketchat-channel-settings/client/lib/ChannelSettings.js @@ -21,12 +21,13 @@ RocketChat.ChannelSettings = new class { }); } - getOptions(currentData, group) { + getOptions(currentData = {}, group) { const allOptions = _.toArray(this.options.get()); const allowedOptions = _.compact(_.map(allOptions, function(option) { + const ret = {...option}; if (option.validation == null || option.validation()) { - option.data = Object.assign({}, typeof option.data === 'function' ? option.data() : option.data, currentData); - return option; + ret.data = Object.assign({}, typeof option.data === 'function' ? option.data() : option.data, currentData); + return ret; } })).filter(function(option) { return !group || !option.group || option.group.includes(group); diff --git a/packages/rocketchat-channel-settings/client/views/channelSettings.html b/packages/rocketchat-channel-settings/client/views/channelSettings.html index f4475a56244..e8b3271be88 100644 --- a/packages/rocketchat-channel-settings/client/views/channelSettings.html +++ b/packages/rocketchat-channel-settings/client/views/channelSettings.html @@ -1,106 +1,104 @@ diff --git a/packages/rocketchat-cors/cors.js b/packages/rocketchat-cors/cors.js index 9b07501d8d3..6af8bc10034 100644 --- a/packages/rocketchat-cors/cors.js +++ b/packages/rocketchat-cors/cors.js @@ -2,7 +2,7 @@ import url from 'url'; -WebApp.rawConnectHandlers.use(function(req, res, next) { +WebApp.rawConnectHandlers.use(Meteor.bindEnvironment(function(req, res, next) { if (req._body) { return next(); } @@ -12,7 +12,7 @@ WebApp.rawConnectHandlers.use(function(req, res, next) { if (req.headers['content-type'] !== '' && req.headers['content-type'] !== undefined) { return next(); } - if (req.url.indexOf('/ufs/') === 0) { + if (req.url.indexOf(`${ __meteor_runtime_config__.ROOT_URL_PATH_PREFIX }/ufs/`) === 0) { return next(); } @@ -36,7 +36,7 @@ WebApp.rawConnectHandlers.use(function(req, res, next) { return next(); }); -}); +})); WebApp.rawConnectHandlers.use(function(req, res, next) { if (/^\/(api|_timesync|sockjs|tap-i18n|__cordova)(\/|$)/.test(req.url)) { diff --git a/packages/rocketchat-custom-sounds/admin/soundEdit.html b/packages/rocketchat-custom-sounds/admin/soundEdit.html index 4de2d2f8519..3c25ca522b0 100644 --- a/packages/rocketchat-custom-sounds/admin/soundEdit.html +++ b/packages/rocketchat-custom-sounds/admin/soundEdit.html @@ -13,7 +13,7 @@
- +