From eac8f68be7fc4c9dfd4a8c122b33874415295260 Mon Sep 17 00:00:00 2001 From: Chris Pitman Date: Thu, 5 Oct 2017 12:58:31 -0400 Subject: [PATCH 01/70] Store int history as string in mongo Http Results can include keps which are vaild JSON but invalid mongo keys. Store them as a string, then check when formatting them for dispkay if they are json that needs to be stringifies or already a string. --- .../client/views/integrationsOutgoingHistory.html | 2 +- .../client/views/integrationsOutgoingHistory.js | 12 ++++-------- .../server/lib/triggerHandler.js | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/packages/rocketchat-integrations/client/views/integrationsOutgoingHistory.html b/packages/rocketchat-integrations/client/views/integrationsOutgoingHistory.html index eb57c122e3ad..e58d746a2d08 100644 --- a/packages/rocketchat-integrations/client/views/integrationsOutgoingHistory.html +++ b/packages/rocketchat-integrations/client/views/integrationsOutgoingHistory.html @@ -121,7 +121,7 @@

-
{{{ hljsStack history.errorStack }}}
+
{{{ jsonStringify history.errorStack }}}
{{/if}} diff --git a/packages/rocketchat-integrations/client/views/integrationsOutgoingHistory.js b/packages/rocketchat-integrations/client/views/integrationsOutgoingHistory.js index 383b5d1ba9bd..9a110dffd58f 100644 --- a/packages/rocketchat-integrations/client/views/integrationsOutgoingHistory.js +++ b/packages/rocketchat-integrations/client/views/integrationsOutgoingHistory.js @@ -94,16 +94,12 @@ Template.integrationsOutgoingHistory.helpers({ }, jsonStringify(data) { - return data ? hljs.highlight('json', JSON.stringify(data, null, 2)).value : ''; - }, - - hljsStack(errorStack) { - if (!errorStack) { + if (!data) { return ''; - } else if (typeof errorStack === 'object') { - return hljs.highlight('json', JSON.stringify(errorStack, null, 2)).value; + } else if (typeof data === 'object') { + return hljs.highlight('json', JSON.stringify(data, null, 2)).value; } else { - return hljs.highlight('json', errorStack).value; + return hljs.highlight('json', data).value; } }, diff --git a/packages/rocketchat-integrations/server/lib/triggerHandler.js b/packages/rocketchat-integrations/server/lib/triggerHandler.js index 5012c42e6436..000a1d5af854 100644 --- a/packages/rocketchat-integrations/server/lib/triggerHandler.js +++ b/packages/rocketchat-integrations/server/lib/triggerHandler.js @@ -130,7 +130,7 @@ RocketChat.integrations.triggerHandler = new class RocketChatIntegrationHandler } if (typeof httpResult !== 'undefined') { - history.httpResult = httpResult; + history.httpResult = JSON.stringify(httpResult, null, 2); } if (typeof error !== 'undefined') { From aabc541927df2ded07465344c7421e6be3998b8f Mon Sep 17 00:00:00 2001 From: Karl Prieb Date: Tue, 28 Nov 2017 21:03:10 -0200 Subject: [PATCH 02/70] [FIX] Channel settings buttons (#8753) * Fix channel settings buttons * fix member view on flex-tab * try to fix test * add scroll to add users flex-tab --- .../client/stylesheets/channel-settings.css | 1 - .../rocketchat-livechat/app/package-lock.json | 7 +++++++ .../client/imports/general/base_old.css | 20 +++++++------------ packages/rocketchat-theme/server/colors.less | 4 ---- tests/pageobjects/flex-tab.page.js | 6 +++--- 5 files changed, 17 insertions(+), 21 deletions(-) diff --git a/packages/rocketchat-channel-settings/client/stylesheets/channel-settings.css b/packages/rocketchat-channel-settings/client/stylesheets/channel-settings.css index 3c353185e19e..612da29d654f 100644 --- a/packages/rocketchat-channel-settings/client/stylesheets/channel-settings.css +++ b/packages/rocketchat-channel-settings/client/stylesheets/channel-settings.css @@ -50,7 +50,6 @@ html.rtl .flex-tab { } & .editing { - margin: -2px 0 -1px -9px; padding-right: 80px; font-size: 14px; } diff --git a/packages/rocketchat-livechat/app/package-lock.json b/packages/rocketchat-livechat/app/package-lock.json index c760d61a3560..d5cb0fc15cbb 100644 --- a/packages/rocketchat-livechat/app/package-lock.json +++ b/packages/rocketchat-livechat/app/package-lock.json @@ -649,6 +649,13 @@ "strip-ansi": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz" } }, + "string_decoder": { + "version": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=", + "requires": { + "safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz" + } + }, "stringstream": { "version": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" diff --git a/packages/rocketchat-theme/client/imports/general/base_old.css b/packages/rocketchat-theme/client/imports/general/base_old.css index 59c9a35863c5..824861da1266 100644 --- a/packages/rocketchat-theme/client/imports/general/base_old.css +++ b/packages/rocketchat-theme/client/imports/general/base_old.css @@ -3429,7 +3429,6 @@ body:not(.is-cordova) { overflow-x: visible; width: var(--flex-tab-width); - height: calc(100vh - 61px); & .control { & .header { @@ -3516,23 +3515,14 @@ body:not(.is-cordova) { } & .content { - position: absolute; - top: auto; - left: 0; - - overflow-x: hidden; - overflow-y: auto; - - width: 100%; - height: 100%; - -webkit-overflow-scrolling: touch; - & > div { + overflow-y: auto; + transition: transform 0.45s cubic-bezier(0.5, 0, 0, 1), opacity 0.125s ease-out 0.1s; } & > .animated-hidden { - transform: translateX(100%); + transform: translateX(calc(100% + 40px)); opacity: 0; } @@ -3568,6 +3558,10 @@ body:not(.is-cordova) { } } + & .channel-settings .button { + visibility: initial; + } + & footer { position: absolute; z-index: 100; diff --git a/packages/rocketchat-theme/server/colors.less b/packages/rocketchat-theme/server/colors.less index 627cea3d8e3f..631d1d143331 100755 --- a/packages/rocketchat-theme/server/colors.less +++ b/packages/rocketchat-theme/server/colors.less @@ -714,10 +714,6 @@ input:-webkit-autofill { } } - .button { - .buttonColors(lighten(@primary-font-color, 25%), @secondary-background-color); - } - .input.checkbox.toggle { input:checked + label::before { background-color: @primary-background-color; diff --git a/tests/pageobjects/flex-tab.page.js b/tests/pageobjects/flex-tab.page.js index 383b45dc068c..0c0104148a12 100644 --- a/tests/pageobjects/flex-tab.page.js +++ b/tests/pageobjects/flex-tab.page.js @@ -79,9 +79,9 @@ class FlexTab extends Page { get usersSendInvitationTab() { return browser.element('.tab-button:not(.hidden) .tab-button-icon--send'); } get usersAddUserTab() { return browser.element('.tab-button:not(.hidden) .tab-button-icon--plus'); } get usersSendInvitationTextArea() { return browser.element('#inviteEmails'); } - get usersButtonCancel() { return browser.element('button.cancel'); } - get usersSendInvitationSend() { return browser.element('button.send'); } - get usersButtonSave() { return browser.element('button.save'); } + get usersButtonCancel() { return browser.element('.button.cancel'); } + get usersSendInvitationSend() { return browser.element('.button.send'); } + get usersButtonSave() { return browser.element('.button.save'); } get usersAddUserName() { return browser.element('#name'); } get usersAddUserUsername() { return browser.element('#username'); } get usersAddUserEmail() { return browser.element('#email'); } From 812bb639e8ba30cf3ac51b840ac0eb009836ba8f Mon Sep 17 00:00:00 2001 From: Aaron Ogle Date: Tue, 28 Nov 2017 17:28:57 -0600 Subject: [PATCH 03/70] Bump version to 0.59.4 --- .docker/Dockerfile | 2 +- .sandstorm/sandstorm-pkgdef.capnp | 2 +- .travis/snap.sh | 2 +- HISTORY.md | 5 +++++ package.json | 2 +- packages/rocketchat-lib/rocketchat.info | 2 +- 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 1e3ae0e864d7..1f0b11da5978 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,6 +1,6 @@ FROM rocketchat/base:4 -ENV RC_VERSION 0.59.3 +ENV RC_VERSION 0.59.4 MAINTAINER buildmaster@rocket.chat diff --git a/.sandstorm/sandstorm-pkgdef.capnp b/.sandstorm/sandstorm-pkgdef.capnp index 65091cf26aff..d8c29b159518 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.59.3"), + appMarketingVersion = (defaultText = "0.59.4"), # Human-readable representation of appVersion. Should match the way you # identify versions of your app in documentation and marketing. diff --git a/.travis/snap.sh b/.travis/snap.sh index 18f64517bd06..b2ef7f1eccfe 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.59.3 + RC_VERSION=0.59.4 fi echo "Preparing to trigger a snap release for $CHANNEL channel" diff --git a/HISTORY.md b/HISTORY.md index dbdf81d32775..c869dcfd075c 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,8 @@ + +## 0.59.4 (2017-11-28) + + + ## 0.59.3 (2017-10-29) diff --git a/package.json b/package.json index a24bd267011a..fabeb0d0369f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "Rocket.Chat", "description": "The Ultimate Open Source WebChat Platform", - "version": "0.59.3", + "version": "0.59.4", "author": { "name": "Rocket.Chat", "url": "https://rocket.chat/" diff --git a/packages/rocketchat-lib/rocketchat.info b/packages/rocketchat-lib/rocketchat.info index ebaf46b0c235..c767cf7cf3cc 100644 --- a/packages/rocketchat-lib/rocketchat.info +++ b/packages/rocketchat-lib/rocketchat.info @@ -1,3 +1,3 @@ { - "version": "0.59.3" + "version": "0.59.4" } From 67ce5838e15eb843fcd20264e9396667b16cbd75 Mon Sep 17 00:00:00 2001 From: Aaron Ogle Date: Tue, 28 Nov 2017 17:33:03 -0600 Subject: [PATCH 04/70] Fix history --- HISTORY.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/HISTORY.md b/HISTORY.md index c869dcfd075c..7a361a4d93c1 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,6 +1,11 @@ ## 0.59.4 (2017-11-28) +### Bug Fixes + +- [#8413](https://github.com/RocketChat/Rocket.Chat/pull/8413) Store Outgoing Integration Result as String in Mongo +- [#8753](https://github.com/RocketChat/Rocket.Chat/pull/8753) Fix Channel settings buttons + From d1e8503e51efa9682bae0c4595629585b8ee1ee8 Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento Date: Fri, 3 Nov 2017 20:03:17 -0200 Subject: [PATCH 05/70] Add CircleCI (#8685) --- .circleci/config.yml | 289 +++++++++++++++++++++++ .circleci/docker.sh | 13 + .circleci/namefiles.sh | 8 + .circleci/setartname.sh | 23 ++ .circleci/setdeploydir.sh | 2 + .circleci/setupsig.sh | 8 + .circleci/sign.key.gpg | Bin 0 -> 5117 bytes .circleci/snap.sh | 37 +++ .circleci/update-releases.sh | 17 ++ .scripts/set-version.js | 2 + .scripts/start.js | 2 +- tests/chimp-config.js | 2 +- tests/pageobjects/administration.page.js | 6 +- 13 files changed, 406 insertions(+), 3 deletions(-) create mode 100644 .circleci/config.yml create mode 100644 .circleci/docker.sh create mode 100644 .circleci/namefiles.sh create mode 100644 .circleci/setartname.sh create mode 100644 .circleci/setdeploydir.sh create mode 100644 .circleci/setupsig.sh create mode 100644 .circleci/sign.key.gpg create mode 100644 .circleci/snap.sh create mode 100644 .circleci/update-releases.sh diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000000..9fb2a7f6017e --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,289 @@ +defaults: &defaults + working_directory: ~/repo + +version: 2 +jobs: + build: + <<: *defaults + docker: + - image: circleci/node:4.8 + + steps: + - checkout + + - restore_cache: + keys: + - node-modules-cache-{{ checksum ".circleci/config.yml" }}-{{ checksum "package.json" }} + + - restore_cache: + keys: + - meteor-{{ checksum ".circleci/config.yml" }}-{{ checksum ".meteor/release" }} + + - run: + name: Install Meteor + command: | + # Restore bin from cache + set +e + METEOR_SYMLINK_TARGET=$(readlink ~/.meteor/meteor) + METEOR_TOOL_DIRECTORY=$(dirname "$METEOR_SYMLINK_TARGET") + set -e + LAUNCHER=$HOME/.meteor/$METEOR_TOOL_DIRECTORY/scripts/admin/launch-meteor + if [ -e $LAUNCHER ] + then + echo "Cached Meteor bin found, restoring it" + sudo cp "$LAUNCHER" "/usr/local/bin/meteor" + else + echo "No cached Meteor bin found." + fi + + # only install meteor if bin isn't found + command -v meteor >/dev/null 2>&1 || curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh + + - run: + name: Versions + command: | + npm --versions + node -v + meteor --version + meteor npm --versions + meteor node -v + git version + + - run: + name: Meteor npm install + command: | + # rm -rf node_modules + # rm -f package-lock.json + meteor npm install + + - run: + name: Lint + command: | + meteor npm run lint + meteor npm run stylelint + + - run: + name: Unit Test + command: | + meteor npm run testunit + + - restore_cache: + keys: + - meteor-cache-{{ checksum ".circleci/config.yml" }}-{{ checksum ".meteor/versions" }} + + - restore_cache: + keys: + - livechat-meteor-cache-{{ checksum ".circleci/config.yml" }}-{{ checksum "packages/rocketchat-livechat/app/.meteor/versions" }} + + - restore_cache: + keys: + - livechat-node-modules-cache-{{ checksum ".circleci/config.yml" }}-{{ checksum "packages/rocketchat-livechat/app/package.json" }} + + - run: + name: Build Rocket.Chat + command: | + if [[ $CIRCLE_TAG ]]; then meteor reset; fi + set +e + meteor add rocketchat:lib + set -e + meteor build --server-only --directory /tmp/build-test + + - run: + name: Prepare build + command: | + mkdir /tmp/build/ + cd /tmp/build-test + tar czf /tmp/build/Rocket.Chat.tar.gz bundle + cd /tmp/build-test/bundle/programs/server + npm install + + - save_cache: + key: node-modules-cache-{{ checksum ".circleci/config.yml" }}-{{ checksum "package.json" }} + paths: + - ./node_modules + + - save_cache: + key: meteor-cache-{{ checksum ".circleci/config.yml" }}-{{ checksum ".meteor/versions" }} + paths: + - ./.meteor/local + + - save_cache: + key: livechat-node-modules-cache-{{ checksum ".circleci/config.yml" }}-{{ checksum "packages/rocketchat-livechat/app/package.json" }} + paths: + - ./packages/rocketchat-livechat/app/node_modules + + - save_cache: + key: livechat-meteor-cache-{{ checksum ".circleci/config.yml" }}-{{ checksum "packages/rocketchat-livechat/app/.meteor/versions" }} + paths: + - ./packages/rocketchat-livechat/app/.meteor/local + + - save_cache: + key: meteor-{{ checksum ".circleci/config.yml" }}-{{ checksum ".meteor/release" }} + paths: + - ~/.meteor + + - persist_to_workspace: + root: /tmp/ + paths: + - build-test + - build + + - store_artifacts: + path: /tmp/build + + test-with-oplog: + <<: *defaults + docker: + - image: circleci/node:4.8-browsers + - image: mongo:3.4 + command: [mongod, --nojournal, --noprealloc, --smallfiles, --replSet=rs0] + + environment: + TEST_MODE: "true" + MONGO_URL: mongodb://localhost:27017/testwithoplog + MONGO_OPLOG_URL: mongodb://localhost:27017/local + + steps: + - attach_workspace: + at: /tmp + + - checkout + + - run: + name: Install dependencies + command: | + sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6 + echo "deb [ arch=amd64 ] http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list + sudo apt-get update + sudo apt-get install -y mongodb-org-shell + + - run: + name: Configure Replica Set + command: | + mongo --eval 'rs.initiate({_id:"rs0", members: [{"_id":1, "host":"localhost:27017"}]})' + mongo --eval 'rs.status()' + + - run: + name: Update NPM + command: | + sudo npm install -g npm + + - run: + name: NPM install + command: | + npm install + + - run: + name: Run Tests + command: | + for i in $(seq 1 5); do npm test && s=0 && break || s=$? && sleep 1; done; (exit $s) + + - store_artifacts: + path: ~/repo/.screenshots + + test-without-oplog: + <<: *defaults + docker: + - image: circleci/node:4.8-browsers + - image: circleci/mongo:3.4 + + environment: + TEST_MODE: "true" + MONGO_URL: mongodb://localhost:27017/testwithoplog + + steps: + - attach_workspace: + at: /tmp + + - checkout + + - run: + name: Update NPM + command: | + sudo npm install -g npm + + - run: + name: NPM install + command: | + npm install + + - run: + name: Run Tests + command: | + for i in $(seq 1 5); do npm test && s=0 && break || s=$? && sleep 1; done; (exit $s) + + # - run: + # name: Build Failed + # when: on_fail + # command: | + # cp -R .screenshots /tmp/screenshots + + # - store_artifacts: + # path: ~/repo/.screenshots + + deploy: + <<: *defaults + docker: + - image: circleci/node:4.8 + + steps: + - attach_workspace: + at: /tmp + + - checkout + + - run: + name: Install AWS cli + command: | + if [[ $CIRCLE_PULL_REQUESTS ]]; then exit 0; fi; + + sudo apt-get -y -qq update + sudo apt-get -y -qq install python3.4-dev + curl -O https://bootstrap.pypa.io/get-pip.py + python3.4 get-pip.py --user + export PATH=~/.local/bin:$PATH + pip install awscli --upgrade --user + + - run: + name: Publish assets + command: | + if [[ $CIRCLE_PULL_REQUESTS ]]; then exit 0; fi; + + export PATH=~/.local/bin:$PATH + export CIRCLE_TAG=${CIRCLE_TAG:=} + + source .circleci/setartname.sh + source .circleci/setdeploydir.sh + bash .circleci/setupsig.sh + bash .circleci/namefiles.sh + # echo ".circleci/sandstorm.sh" + + aws s3 cp $ROCKET_DEPLOY_DIR/ s3://download.rocket.chat/build/ --recursive + + bash .circleci/update-releases.sh + bash .circleci/docker.sh + bash .circleci/snap.sh + +workflows: + version: 2 + build-and-test: + jobs: + - build + - test-with-oplog: + requires: + - build + - test-without-oplog: + requires: + - build + - deploy: + requires: + - test-with-oplog + - test-without-oplog + filters: + branches: + only: + - develop + - circle-ci + tags: + only: + - "/^\\d+\\.\\d+\\.\\d+(-rc\\.\\d+)?$/" diff --git a/.circleci/docker.sh b/.circleci/docker.sh new file mode 100644 index 000000000000..4edf27c21775 --- /dev/null +++ b/.circleci/docker.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -euvo pipefail +IFS=$'\n\t' + +CURL_URL="https://registry.hub.docker.com/u/rocketchat/rocket.chat/trigger/$DOCKER_TRIGGER_TOKEN/" + +if [[ $CIRCLE_TAG ]]; then + CURL_DATA='{"source_type":"Tag","source_name":"'"$CIRCLE_TAG"'"}'; +else + CURL_DATA='{"source_type":"Branch","source_name":"'"$CIRCLE_BRANCH"'"}'; +fi + +curl -H "Content-Type: application/json" --data "$CURL_DATA" -X POST "$CURL_URL" diff --git a/.circleci/namefiles.sh b/.circleci/namefiles.sh new file mode 100644 index 000000000000..f2fd572105f3 --- /dev/null +++ b/.circleci/namefiles.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set -euvo pipefail +IFS=$'\n\t' + +FILENAME="$ROCKET_DEPLOY_DIR/rocket.chat-$ARTIFACT_NAME.tgz"; + +ln -s /tmp/build/Rocket.Chat.tar.gz "$FILENAME" +gpg --armor --detach-sign "$FILENAME" diff --git a/.circleci/setartname.sh b/.circleci/setartname.sh new file mode 100644 index 000000000000..d1fa44fbab94 --- /dev/null +++ b/.circleci/setartname.sh @@ -0,0 +1,23 @@ +if [[ $CIRCLE_TAG ]]; then + export ARTIFACT_NAME="$(npm run version --silent)" +else + export ARTIFACT_NAME="$(npm run version --silent).circleci-$CIRCLE_BUILD_NUM" +fi + +if [[ $CIRCLE_TAG =~ ^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+ ]]; then + SNAP_CHANNEL=candidate + RC_RELEASE=candidate + RC_VERSION=$CIRCLE_TAG +elif [[ $CIRCLE_TAG =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + SNAP_CHANNEL=stable + RC_RELEASE=stable + RC_VERSION=$CIRCLE_TAG +else + SNAP_CHANNEL=edge + RC_RELEASE=develop + RC_VERSION=0.59.0-develop +fi + +export SNAP_CHANNEL +export RC_RELEASE +export RC_VERSION diff --git a/.circleci/setdeploydir.sh b/.circleci/setdeploydir.sh new file mode 100644 index 000000000000..2c49e4a7027a --- /dev/null +++ b/.circleci/setdeploydir.sh @@ -0,0 +1,2 @@ +export ROCKET_DEPLOY_DIR="/tmp/deploy" +mkdir -p $ROCKET_DEPLOY_DIR diff --git a/.circleci/setupsig.sh b/.circleci/setupsig.sh new file mode 100644 index 000000000000..7b8f3820d745 --- /dev/null +++ b/.circleci/setupsig.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set -euvo pipefail +IFS=$'\n\t' + +cp .circleci/sign.key.gpg /tmp +gpg --yes --batch --passphrase=$GPG_PASSWORD /tmp/sign.key.gpg +gpg --allow-secret-key-import --import /tmp/sign.key +rm /tmp/sign.key diff --git a/.circleci/sign.key.gpg b/.circleci/sign.key.gpg new file mode 100644 index 0000000000000000000000000000000000000000..488e275998d505474fd6a93c263b4931885d7d00 GIT binary patch literal 5117 zcmVn>(*BrtSEM&sK?(j_8)%Q}kOP!Q#a*ys4&dDr+%)U1{~(%kAlO289lN-4-EE*!EVEY7;(4My9XcSTvuwYo zy0S@~xo(NJSD7oYnJBg|F@8lIi(8KnEyRy2FU^k*Yop9`DEKZ{4Na3{ElPJ~`)+tX zGKak59}L;U%meaDMf9t@cp$NzSX^d?$+n=lS&&4FD3!w)WMdq({#Rw|ZFnMh;#ff% zF^GS+dif10i}(^`C@;sl`EgwH*2|m~;E10O$(M@aKKO;keJyy$ksfNTZ!L2hIQcGCt4lH z>&(TTlR+?~H2BMXhxl(Q#MU&^2OUDkh~!<<9SM>*7%ktXCjOCa*!Jv?((rOc))!$4 zl+-t)N%*pPY4Hw-e)10g9Q%6Ci*TR%=eh^!GdhrNfI=-iU4ps~Mf%o8?VefCjI&md zi$hSld}BA%^MPY3`)=2ezR|Kt%b2XI_r0oZ4yJ#ojG*NV+i`>-AAY@H#y76>{CaI` zEy`jmOlxodZX9)Wxe6~ti+@{_?C5+8L8v#ehlX3lVwVR)<>WNZc%z5*dcsc}GP~p7xkY$q+e2JU zi#vUo)m$vADS33%8@}5Oh_^D`?eHARGw}mIoRPvB@!jZC{BZRmT;v)yr_*f_5~ zD~_PY>F9s6mmS()h_EeX!6n7ywb1>ZV$k;5 z8P>!22~6)}BiarcrkHT@*0`3ew*2tTr$RhaAm>xz003(IfhfPjH^5ATaiTCpfL&f{ z4C}33=BKlPD+;BQe=9toR&V4Bxh5;CAAw*aRU&D`(zVl#5GF#KFt z(O7(1#*izPxw#p|0$TwdyiZJHJ6eSY*Z)&34X-J=>+wL5(*7g)X%`E*#&h&U@(4?0 zz0eW)?7EW^uS@PE7*I6Ymb51LQ6sz9WLc5Ma)Fgu>B&>HmKTV;(DzB73$6p!M~4-z zN<|^(Wum5k5xsJn@HI`iiQ*jO5%(yt>!Eh?i_uY^nqBPJSm|?X2p9i@@m>70MMW8$ z#y5orvThPrfUT((VtTO14zdKpPI}uL+rd{7i7ZVpv@)WPOdRP5AvaR%L+kDospgkv zE6A>!PVBzYB!;AQ!CPzYDZM#rf87HUTI7Eebn@H^)<-Pqs4`W5*I$uxj&uxwbwg3l z^VwhbbJ;5+K8C+r90cf{69|h>H6qc_iwFwjgq$L?YQMm?Kj1dVR%yc7__f4GR!a&y z(awZi>m99QRwUE};^7ELK$i-+8yjXB|8S1+h2L_H?F%B%M{hEY2ky?BQE`S|GHG7J zCE!c=sHnzUf7ewd2#oLOoE-w0&-M0EDj8@e;5KRtL^n6RyET9?Z(yTAe+o|x9C60rrX z8BB~r(!p%V70a@1u%FAI8$UllPPQ%6Sbg7_89&w|w)y)W?O|4aVK3Lmoo;6iK|R0$ z!;A2BW}xu5*uL%na+YEs=ZIpPoP6ri-$n1AOTye-sVMPZ)rIG9L$?!DXT)t0;JO32 zh!o>0F+XjTgng6D8)<^DnhZ0@&Wl9Dr=$b=BHNm@YHfwUj0}riS|R|u!5%j){VC=Uf=yThms(;Q;7AYw)SuK)UeJrqRwDwP0lxS zTNsr!OuhPhPEzic@v^cDdhrUl;N{iK)J=Z}E zBtjW>)phSW56T>+$jw1+@(+^g8?`9I4J!Hn0?*7n4hWFL7`5zXTw5cj5PpoVibe6^ z*P6;aUKN5KnUmFkZ$-B!{la*v_z)7nm;4~&r<+`?Hp~~jrw1~c#+~3`(A%OE^o$D> z7jv4v$2u&k{4+Takv$(ZQ5bBayq5;~@0^wgEt2S{&s&H~$Si2;j=+cm=2gkd=A%W< zG}5|7i|$5QoWC&?u{XBLiaeRZVQYZbrm}0DPYbO{&IF@>;8+-32VJd}X<2cH^OYxW~*(#qqlP3u%}Z-+SH6 zK&9W&a-x&cpBp8ObaNxfy5dfZVlO?nNI~sCy+JUyE^kq*Bn6x!vf(E+s{N*H?sJ-W z2T1dcbg@tKkG~TJF%0Gk%~0S(=i{Taey%8k;=O+1BLenez#^t5L(D1WOFn^K5d4Zg z66QFR%x0{?ZqQv{(00bY!)>HDr-zvnevGv!^4FT`!%2m#2a#qI-yz%S2SSl<|J8X7 z;XI>hxF9&oG^p@JH;jD0U`{GJD^$@AzA=T4k6yE8qX)a*7f}`2m{6aD}iG zl125dY^flk!ezSC4n)!1EuIn3$?W_Tc8DN&JfQhw7ObDU@)D1b=lbqXoB5pe-Nc=! zSBrg`HOQ7ZHdZphAyw2~cQ~g}pNRjkd)z=x9@HH!!?>o7*WEE1M5h{wFVMoHKJpiX z`*IG=QTjVVxn<1>bg=2L6KhT}THx7ZA`>n+8s{K(0Ap}2-csN{Q{!&Ct_KZM_dwZU zued#B|H^gVWayJ(*eS zlOqJV%U^*kjCW=ke;>ESzD*T=d<;9sUM8(E13$Hntu|C>hxR?|3AKlL>kuHBN3gkS zE~#*d2geSXk3fzePUdYa_=3656eHXo7gFWQ-{lWafz2RjFRUJ=w58Gr6KO9?6$Ze7 zvQ||80`(|Aapc7o(6Nd#za~lwQt9|*xJvQmorK1{iR^n~uU)hggi&QFp}c3Rm|9Ld z+@p#+0p0R~hd?cUgiNSxUSC}aS=eClEPnn68egm@*BqIa?HR^&>5~`((*Rj)1#WqoztTPB2@=co= z!*-@%k>VGm$~OaJ=B@H(ueyT)`nIe1$=(sh!uJqz)-R?n*_gs%TlcK3V@VBkWjFfv zg5!MS!8f9<*MM|G@Y%7M!&lnysv906>h1)VwP5Rp(Kz0F7ZvEQht-1*e8-oa%wAt0 z4{+Z3g@t4mJM-$LF+e!MCjw#+JRS&^2X#EgFFT8UZ|e0Dzo;M3Q$VyT1p!#&6c#2{ z0<68OIfZkO@bz3ymOyg#O!$H@1WhKDt=&(|GA)ld&b4fvanbg?7|Qf+p?uvA{1>() zgnGf)h8OiT`2P|3pmu)>bImJc(fB>uX*C z-*M&O0AfQn-mgC-goDE>)BtO@hux4pn3hmD2wQ#zn6Y?CI3D2qjupo7B}7l*o!Rj) zau$!BdZP9^Jx8U>*e*7jy3>#r?)!CYe`9fYgV-dapg_W@{VRMac`FjjhYSlVBCX%S zoKg8M6Fx$4D{oUte>m$}Uc4;X=R-Zf-;tnKp{Hzwu8ETGvqPQ(uXl)J@&ptW1V!4u zB&GZ;GaMV#j7TYJTHQAK_vd((7G~_>r z6-?tN1L;}$ST79QK?GNS-E*HVI2yWURL5Uo=rkHBIT(7L@V4BMR#qae?C+6U2$^ZX z-RFpjufs=H2galGmc0zsC-ZOeeVUFolH1K;fo>yZ3!Xh%d>`LoJG@GLE8@iIpiNTr zxT3I~%qs(Sx-zf$mQ!~eRu8?xFbBz_gh_H=xH8Os=~({V+mjt5VXnHZ?rPm#^X_|Q z9g(#zCMj0y_&-H3joV=+vqQ`0n*iKP-VlXI`uYILaz@g6z!%b!P1<{bFv9wdPEWV} zAF9xF`!@7Cxtw34>COxZ5L~X!T0l{MFq%&Jg#(y&lPn7%pFvH$q}!M04J0)7VZaE*#By-+I?xn^E>=SF2z92wjpN7g zW!VQ#{-_O&JedEQf8PdZ76G`xmW||-O@cpHbliBXL_TgYP&lPet7pk5f*bb*Uy!pLH5rmI9crecD`e|I_gt>q;>FuYvc z&`x#7h=MX-p*>crH|R}b&d7pk#$y)B%nGX}6q7DZ+xD>5AIR7hnIgZ=b7xIF>P?3@ z>fKj1=$2p49`^8UkLCn_0-cCn(qb4l?Wr^Cd6BJ|+>ArNf~V`fgnpv?Q``sswVC$+mn|rsW+Du#m7o{u|*5Yb$ay8 z-ETg9M8PRZWZayNZ3<5s^}n{LQX)!Tf*osV1qf;UhBiwO*X!=4`Nj+>yDCZw(O+^F zij8QF#>y@f(ph!cfE0l>*MzAtsC=u~^sNgeUOA^iB2)9Sm*sfvzUlG`VvzX-w60qU z4G<@)fD^P1lTM%WwJWD{aU$atM=fvpR>=8A0|CX*#oG`Z`7uIEaOrGWnmU_~8IrsF zlvzFtV_DwA5qdtw2@C1R20hY)MKnW4V?c%eP&Tzc-9YTR{Ni$f1v|3-zad=gtz`)9 zA_*c$Ru3&|i1L<5sftyu+m_BDVy~fDA@9V*Z_`6Xl(EZ=K!K?r*IzvT_GLu*UV7(} zBqIr4lS0^!prXu#C1HKm>ZIfI1jQkPgJn zc+{>xeAEMWbji1oco!`gGdXqNB)ApPN3TVDP#99n!Z^6Z9KrJ+npAk;D0LOTjXL~R z)Y}qui8+8Yc3?A^szY0|W}2&4u1EtGC}}FgF5dIGx#hYhV>{&4Sk_kvSK%w*zIkYe z(i)Gd*pslHxSn_UL1C-%n<#H>Tg_kfpdI0DAbQh&8SQ_myL ~/.ssh/known_hosts + +echo "Preparing to trigger a snap release for $SNAP_CHANNEL channel" + +cd $PWD/.snapcraft + +# We need some meta data so it'll actually commit. This could be useful to have for debugging later. +echo -e "Tag: $CIRCLE_TAG\r\nBranch: $CIRCLE_BRANCH\r\nBuild: $CIRCLE_BUILD_NUM\r\nCommit: $CIRCLE_SHA1" > buildinfo + +# Clone launchpad repo for the channel down. +git clone -b $SNAP_CHANNEL git+ssh://rocket.chat.buildmaster@git.launchpad.net/rocket.chat launchpad + +# Rarely will change, but just incase we copy it all +cp -r resources buildinfo launchpad/ +sed s/#{RC_VERSION}/$RC_VERSION/ snapcraft.yaml > launchpad/snapcraft.yaml + +cd launchpad +git add resources snapcraft.yaml buildinfo + +# Set commit author details +git config user.email "buildmaster@rocket.chat" +git config user.name "CircleCI" + +# Another place where basic meta data will live for at a glance info +git commit -m "CircleCI Build: $CIRCLE_BUILD_NUM CircleCI Commit: $CIRCLE_SHA1" + +# Push up up to the branch of choice. +git push origin $SNAP_CHANNEL + +# Clean up +cd .. +rm -rf launchpad diff --git a/.circleci/update-releases.sh b/.circleci/update-releases.sh new file mode 100644 index 000000000000..57e01ceb3570 --- /dev/null +++ b/.circleci/update-releases.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -euvo pipefail +IFS=$'\n\t' + +if [[ $RC_RELEASE = "develop" ]]; then + aws s3api put-object \ + --acl public-read \ + --website-redirect-location "https://download.rocket.chat/build/$ARTIFACT_NAME" \ + --bucket download.rocket.chat \ + --key "build/rocket.chat-$RC_VERSION.tgz" +fi + +aws s3api put-object \ +--acl public-read \ +--website-redirect-location "https://download.rocket.chat/build/$ARTIFACT_NAME" \ +--bucket download.rocket.chat \ +--key "$RC_RELEASE" diff --git a/.scripts/set-version.js b/.scripts/set-version.js index 1c5037c92cd3..74a1024168fc 100644 --- a/.scripts/set-version.js +++ b/.scripts/set-version.js @@ -22,6 +22,8 @@ const files = [ './package.json', './.sandstorm/sandstorm-pkgdef.capnp', './.travis/snap.sh', + './.circleci/snap.sh', + './.circleci/update-releases.sh', './.docker/Dockerfile', './packages/rocketchat-lib/rocketchat.info' ]; diff --git a/.scripts/start.js b/.scripts/start.js index fee3f78b90e8..eb506f6c225b 100644 --- a/.scripts/start.js +++ b/.scripts/start.js @@ -67,7 +67,7 @@ function startApp(callback) { function startChimp() { startProcess({ name: 'Chimp', - command: 'meteor npm run chimp-test', + command: 'npm run chimp-test', options: { env: Object.assign({}, process.env, { NODE_PATH: process.env.NODE_PATH + diff --git a/tests/chimp-config.js b/tests/chimp-config.js index d03dcfc8273a..5e01594a635f 100644 --- a/tests/chimp-config.js +++ b/tests/chimp-config.js @@ -27,7 +27,7 @@ module.exports = { // chai: false, screenshotsOnError: true, screenshotsPath: '.screenshots', - captureAllStepScreenshots: false, + captureAllStepScreenshots: true, saveScreenshotsToDisk: true, // // Note: With a large viewport size and captureAllStepScreenshots enabled, // // you may run out of memory. Use browser.setViewportSize to make the diff --git a/tests/pageobjects/administration.page.js b/tests/pageobjects/administration.page.js index eeaeb6204166..518ad11bdbdb 100644 --- a/tests/pageobjects/administration.page.js +++ b/tests/pageobjects/administration.page.js @@ -124,7 +124,11 @@ class Administration extends Page { element.waitForVisible(5000); browser.pause(500); const result = element.isVisible(); - return result[0]; + if (Array.isArray(result)) { + return result[0]; + } + + return result; } getUserFromList(user) { From b1db1e945873e380643723c20c2044f8f1499587 Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Tue, 14 Nov 2017 17:46:57 -0200 Subject: [PATCH 06/70] Fix docker build --- .circleci/config.yml | 1 - .circleci/update-releases.sh | 16 +++------------- .docker/Dockerfile | 4 ++-- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9fb2a7f6017e..d8b516b1cdb8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -283,7 +283,6 @@ workflows: branches: only: - develop - - circle-ci tags: only: - "/^\\d+\\.\\d+\\.\\d+(-rc\\.\\d+)?$/" diff --git a/.circleci/update-releases.sh b/.circleci/update-releases.sh index 57e01ceb3570..4e133c304fed 100644 --- a/.circleci/update-releases.sh +++ b/.circleci/update-releases.sh @@ -2,16 +2,6 @@ set -euvo pipefail IFS=$'\n\t' -if [[ $RC_RELEASE = "develop" ]]; then - aws s3api put-object \ - --acl public-read \ - --website-redirect-location "https://download.rocket.chat/build/$ARTIFACT_NAME" \ - --bucket download.rocket.chat \ - --key "build/rocket.chat-$RC_VERSION.tgz" -fi - -aws s3api put-object \ ---acl public-read \ ---website-redirect-location "https://download.rocket.chat/build/$ARTIFACT_NAME" \ ---bucket download.rocket.chat \ ---key "$RC_RELEASE" +curl -X POST \ +-H "X-Update-Token: ${UPDATE_TOKEN}" \ +https://releases.rocket.chat/update diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 1f0b11da5978..4a22e55b7f1a 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -5,8 +5,8 @@ ENV RC_VERSION 0.59.4 MAINTAINER buildmaster@rocket.chat RUN set -x \ - && curl -SLf "https://download.rocket.chat/build/rocket.chat-${RC_VERSION}.tgz" -o rocket.chat.tgz \ - && curl -SLf "https://download.rocket.chat/build/rocket.chat-${RC_VERSION}.tgz.asc" -o rocket.chat.tgz.asc \ + && curl -SLf "https://releases.rocket.chat/${RC_VERSION}/download/" -o rocket.chat.tgz \ + && curl -SLf "https://releases.rocket.chat/${RC_VERSION}/asc" -o rocket.chat.tgz.asc \ && gpg --verify rocket.chat.tgz.asc \ && mkdir -p /app \ && tar -zxf rocket.chat.tgz -C /app \ From 8c7ce0c284746ca7ae44d0db555f118acda62d20 Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Thu, 9 Nov 2017 10:34:12 -0200 Subject: [PATCH 07/70] Fix link to .asc file on S3 --- .circleci/setartname.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/setartname.sh b/.circleci/setartname.sh index d1fa44fbab94..c49f6a919685 100644 --- a/.circleci/setartname.sh +++ b/.circleci/setartname.sh @@ -1,7 +1,7 @@ if [[ $CIRCLE_TAG ]]; then export ARTIFACT_NAME="$(npm run version --silent)" else - export ARTIFACT_NAME="$(npm run version --silent).circleci-$CIRCLE_BUILD_NUM" + export ARTIFACT_NAME="$(npm run version --silent).$CIRCLE_BUILD_NUM" fi if [[ $CIRCLE_TAG =~ ^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+ ]]; then From 3d98b0a70ae2cc687f93394dd4492e625354efa3 Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Wed, 29 Nov 2017 09:00:22 -0200 Subject: [PATCH 08/70] Use specific webdriverio package version --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index d8b516b1cdb8..a118414f98e1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -172,6 +172,7 @@ jobs: name: NPM install command: | npm install + npm install webdriverio@4.8.0 - run: name: Run Tests @@ -206,6 +207,7 @@ jobs: name: NPM install command: | npm install + npm install webdriverio@4.8.0 - run: name: Run Tests From 25f82b388e96ee71b474d1be0fd8ed49e9d3c63d Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Wed, 29 Nov 2017 09:30:19 -0200 Subject: [PATCH 09/70] Use same NPM version as Meteor --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a118414f98e1..4dfc8af1c2b5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -166,7 +166,7 @@ jobs: - run: name: Update NPM command: | - sudo npm install -g npm + sudo npm install -g npm@4.6.1 - run: name: NPM install @@ -201,7 +201,7 @@ jobs: - run: name: Update NPM command: | - sudo npm install -g npm + sudo npm install -g npm@4.6.1 - run: name: NPM install From cc33d0a5d71df9eb1bfc5b21cdbc3a693a7802be Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Wed, 29 Nov 2017 10:32:53 -0200 Subject: [PATCH 10/70] Fix CircleCI deploy filter --- .circleci/config.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4dfc8af1c2b5..c5abf8975c7f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -283,8 +283,7 @@ workflows: - test-without-oplog filters: branches: - only: - - develop + only: develop tags: - only: - - "/^\\d+\\.\\d+\\.\\d+(-rc\\.\\d+)?$/" + only: /^[0-9]+\.[0-9]+\.[0-9]+(-rc\.[0-9]+)?$/ + From cac14a0bcbbc9466f18ffbbde74ed9de199cd51d Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Wed, 29 Nov 2017 10:49:07 -0200 Subject: [PATCH 11/70] Fix tag build --- .circleci/config.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c5abf8975c7f..dc0dd20eb0aa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -270,13 +270,22 @@ workflows: version: 2 build-and-test: jobs: - - build + - build: + filters: + tags: + only: /^[0-9]+\.[0-9]+\.[0-9]+(-rc\.[0-9]+)?$/ - test-with-oplog: requires: - build + filters: + tags: + only: /^[0-9]+\.[0-9]+\.[0-9]+(-rc\.[0-9]+)?$/ - test-without-oplog: requires: - build + filters: + tags: + only: /^[0-9]+\.[0-9]+\.[0-9]+(-rc\.[0-9]+)?$/ - deploy: requires: - test-with-oplog From da248213d9ebf7cd596887678a9eb37d32a6b42d Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento Date: Tue, 12 Dec 2017 11:31:05 -0200 Subject: [PATCH 12/70] Bump version to 0.60.0-rc.0 --- .docker/Dockerfile | 2 +- .sandstorm/sandstorm-pkgdef.capnp | 2 +- .travis/snap.sh | 2 +- HISTORY.md | 261 ++++++++++++++++++++++++ package.json | 2 +- packages/rocketchat-lib/rocketchat.info | 2 +- 6 files changed, 266 insertions(+), 5 deletions(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 091c369ba432..9f5364064bed 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,6 +1,6 @@ FROM rocketchat/base:8 -ENV RC_VERSION 0.60.0-develop +ENV RC_VERSION 0.60.0-rc.0 MAINTAINER buildmaster@rocket.chat diff --git a/.sandstorm/sandstorm-pkgdef.capnp b/.sandstorm/sandstorm-pkgdef.capnp index cee5416212dd..ff4eaabd9393 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.60.0-develop"), + appMarketingVersion = (defaultText = "0.60.0-rc.0"), # Human-readable representation of appVersion. Should match the way you # identify versions of your app in documentation and marketing. diff --git a/.travis/snap.sh b/.travis/snap.sh index 05e376a3f4a1..a86f672ab180 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.60.0-develop + RC_VERSION=0.60.0-rc.0 fi echo "Preparing to trigger a snap release for $CHANNEL channel" diff --git a/HISTORY.md b/HISTORY.md index 7a361a4d93c1..07d28e2e6dd5 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,264 @@ + +# 0.60.0-rc.0 (2017-12-12) + + +### New Features + +- [#8915](https://github.com/RocketChat/Rocket.Chat/pull/8915) Add "Favorites" and "Mark as read" options to the room list +- [#8739](https://github.com/RocketChat/Rocket.Chat/pull/8739) Add "real name change" setting +- [#8626](https://github.com/RocketChat/Rocket.Chat/pull/8626) Add icon art in Tokenpass channel title +- [#8947](https://github.com/RocketChat/Rocket.Chat/pull/8947) Add new API endpoints +- [#8304](https://github.com/RocketChat/Rocket.Chat/pull/8304) Add RD Station integration to livechat +- [#8066](https://github.com/RocketChat/Rocket.Chat/pull/8066) Add settings for allow user direct messages to yourself +- [#8108](https://github.com/RocketChat/Rocket.Chat/pull/8108) Add sweet alert to video call tab +- [#8037](https://github.com/RocketChat/Rocket.Chat/pull/8037) Add yunohost.org installation method to Readme.md +- [#8902](https://github.com/RocketChat/Rocket.Chat/pull/8902) Added support for Dataporten's userid-feide scope +- [#7641](https://github.com/RocketChat/Rocket.Chat/pull/7641) Adds admin option to globally set mobile devices to always be notified regardless of presence status. +- [#7285](https://github.com/RocketChat/Rocket.Chat/pull/7285) Allow user's default preferences configuration +- [#8857](https://github.com/RocketChat/Rocket.Chat/pull/8857) code to get the updated messages +- [#8924](https://github.com/RocketChat/Rocket.Chat/pull/8924) Describe file uploads when notifying by email +- [#8143](https://github.com/RocketChat/Rocket.Chat/pull/8143) Displays QR code for manually entering when enabling 2fa +- [#8260](https://github.com/RocketChat/Rocket.Chat/pull/8260) Enable read only channel creation +- [#8807](https://github.com/RocketChat/Rocket.Chat/pull/8807) Facebook livechat integration +- [#8149](https://github.com/RocketChat/Rocket.Chat/pull/8149) Feature/livechat hide email +- [#9009](https://github.com/RocketChat/Rocket.Chat/pull/9009) Improve room types API and usages +- [#8882](https://github.com/RocketChat/Rocket.Chat/pull/8882) New Modal component +- [#8029](https://github.com/RocketChat/Rocket.Chat/pull/8029) Option to enable/disable auto away and configure timer +- [#8866](https://github.com/RocketChat/Rocket.Chat/pull/8866) Room counter sidebar preference +- [#8979](https://github.com/RocketChat/Rocket.Chat/pull/8979) Save room's last message +- [#8905](https://github.com/RocketChat/Rocket.Chat/pull/8905) Send category and title fields to iOS push notification +- [#7999](https://github.com/RocketChat/Rocket.Chat/pull/7999) Sender's name in email notifications. +- [#8459](https://github.com/RocketChat/Rocket.Chat/pull/8459) Setting to disable MarkDown and enable AutoLinker +- [#8362](https://github.com/RocketChat/Rocket.Chat/pull/8362) Sidebar item width to 100% +- [#8360](https://github.com/RocketChat/Rocket.Chat/pull/8360) Smaller accountBox +- [#8060](https://github.com/RocketChat/Rocket.Chat/pull/8060) Token Controlled Access channels +- [#8361](https://github.com/RocketChat/Rocket.Chat/pull/8361) Unify unread and mentions badge +- [#8715](https://github.com/RocketChat/Rocket.Chat/pull/8715) Upgrade Meteor to 1.6 +- [#8073](https://github.com/RocketChat/Rocket.Chat/pull/8073) Upgrade to meteor 1.5.2 +- [#8433](https://github.com/RocketChat/Rocket.Chat/pull/8433) Use enter separator rather than comma in highlight preferences + Auto refresh after change highlighted words + + +### Bug Fixes + +- [#8147](https://github.com/RocketChat/Rocket.Chat/pull/8147) "*.members" rest api being useless and only returning usernames +- [#8278](https://github.com/RocketChat/Rocket.Chat/pull/8278) "Cancel button" on modal in RTL in Firefox 55 +- [#8266](https://github.com/RocketChat/Rocket.Chat/pull/8266) "Channel Setting" buttons alignment in RTL +- [#8270](https://github.com/RocketChat/Rocket.Chat/pull/8270) [i18n] My Profile & README.md links +- [#8094](https://github.com/RocketChat/Rocket.Chat/pull/8094) Add admin audio preferences translations +- [#8708](https://github.com/RocketChat/Rocket.Chat/pull/8708) Add historic chats icon in Livechat +- [#8389](https://github.com/RocketChat/Rocket.Chat/pull/8389) Add needed dependency for snaps +- [#7971](https://github.com/RocketChat/Rocket.Chat/pull/7971) Add padding on messages to allow space to the action buttons +- [#9022](https://github.com/RocketChat/Rocket.Chat/pull/9022) Added afterUserCreated trigger after first CAS login +- [#8314](https://github.com/RocketChat/Rocket.Chat/pull/8314) After deleting the room, cache is not synchronizing +- [#8172](https://github.com/RocketChat/Rocket.Chat/pull/8172) Allow unknown file types if no allowed whitelist has been set ([#7074](https://github.com/RocketChat/Rocket.Chat/issues/7074)) +- [#8593](https://github.com/RocketChat/Rocket.Chat/pull/8593) AmazonS3: Quote file.name for ContentDisposition for files with commas +- [#8635](https://github.com/RocketChat/Rocket.Chat/pull/8635) API channel/group.members not sorting +- [#8241](https://github.com/RocketChat/Rocket.Chat/pull/8241) Api groups.files is always returning empty +- [#8271](https://github.com/RocketChat/Rocket.Chat/pull/8271) Attachment icons alignment in LTR and RTL +- [#8648](https://github.com/RocketChat/Rocket.Chat/pull/8648) Audio message icon +- [#8107](https://github.com/RocketChat/Rocket.Chat/pull/8107) Autoupdate of CSS does not work when using a prefix +- [#7944](https://github.com/RocketChat/Rocket.Chat/pull/7944) Broken embedded view layout +- [#7943](https://github.com/RocketChat/Rocket.Chat/pull/7943) Broken emoji picker on firefox +- [#8307](https://github.com/RocketChat/Rocket.Chat/pull/8307) Call buttons with wrong margin on RTL +- [#8925](https://github.com/RocketChat/Rocket.Chat/pull/8925) Can't react on Read Only rooms even when enabled +- [#9044](https://github.com/RocketChat/Rocket.Chat/pull/9044) Can't use OAuth login against a Rocket.Chat OAuth server +- [#8889](https://github.com/RocketChat/Rocket.Chat/pull/8889) Cannot edit or delete custom sounds +- [#8654](https://github.com/RocketChat/Rocket.Chat/pull/8654) CAS does not share secrets when operating multiple server instances +- [#8216](https://github.com/RocketChat/Rocket.Chat/pull/8216) Case insensitive SAML email check +- [#8928](https://github.com/RocketChat/Rocket.Chat/pull/8928) Change old 'rocketbot' username to 'InternalHubot_Username' setting +- [#8883](https://github.com/RocketChat/Rocket.Chat/pull/8883) Change the unread messages style +- [#9012](https://github.com/RocketChat/Rocket.Chat/pull/9012) Changed oembedUrlWidget to prefer og:image and twitter:image over msapplication-TileImage +- [#7984](https://github.com/RocketChat/Rocket.Chat/pull/7984) Chat box no longer auto-focuses when typing +- [#8295](https://github.com/RocketChat/Rocket.Chat/pull/8295) Check attachments is defined before accessing first element +- [#8259](https://github.com/RocketChat/Rocket.Chat/pull/8259) clipboard and permalink on new popover +- [#8543](https://github.com/RocketChat/Rocket.Chat/pull/8543) Color reset when default value editor is different +- [#8656](https://github.com/RocketChat/Rocket.Chat/pull/8656) Contextual errors for this and RegExp declarations in IRC module +- [#8039](https://github.com/RocketChat/Rocket.Chat/pull/8039) copy to clipboard and update clipboard.js library +- [#7942](https://github.com/RocketChat/Rocket.Chat/pull/7942) Create channel button on Firefox +- [#9034](https://github.com/RocketChat/Rocket.Chat/pull/9034) Custom OAuth: Not able to set different token place for routes +- [#8386](https://github.com/RocketChat/Rocket.Chat/pull/8386) disabled katex tooltip on messageBox +- [#8917](https://github.com/RocketChat/Rocket.Chat/pull/8917) DM email notifications always being sent regardless of account setting +- [#8527](https://github.com/RocketChat/Rocket.Chat/pull/8527) Do not send joinCode field to clients +- [#7948](https://github.com/RocketChat/Rocket.Chat/pull/7948) Document README.md. Drupal repo out of date +- [#8812](https://github.com/RocketChat/Rocket.Chat/pull/8812) Don't strip trailing slash on autolinker urls +- [#7927](https://github.com/RocketChat/Rocket.Chat/pull/7927) Double scroll on 'keyboard shortcuts' menu in sidepanel +- [#8408](https://github.com/RocketChat/Rocket.Chat/pull/8408) Duplicate code in rest api letting in a few bugs with the rest api +- [#8101](https://github.com/RocketChat/Rocket.Chat/pull/8101) Dynamic popover +- [#8317](https://github.com/RocketChat/Rocket.Chat/pull/8317) Email Subjects not being sent +- [#7923](https://github.com/RocketChat/Rocket.Chat/pull/7923) Email verification indicator added +- [#8300](https://github.com/RocketChat/Rocket.Chat/pull/8300) Emoji Picker hidden for reactions in RTL +- [#8671](https://github.com/RocketChat/Rocket.Chat/pull/8671) Enable CORS for Restivus +- [#8551](https://github.com/RocketChat/Rocket.Chat/pull/8551) encode filename in url to prevent links breaking +- [#9023](https://github.com/RocketChat/Rocket.Chat/pull/9023) Error when saving integration with symbol as only trigger +- [#8001](https://github.com/RocketChat/Rocket.Chat/pull/8001) Error when translating message +- [#8310](https://github.com/RocketChat/Rocket.Chat/pull/8310) Execute meteor reset on TRAVIS_TAG builds +- [#8645](https://github.com/RocketChat/Rocket.Chat/pull/8645) Fix e-mail message forward +- [#7754](https://github.com/RocketChat/Rocket.Chat/pull/7754) Fix email on mention +- [#7912](https://github.com/RocketChat/Rocket.Chat/pull/7912) Fix google play logo on repo README +- [#8577](https://github.com/RocketChat/Rocket.Chat/pull/8577) Fix guest pool inquiry taking +- [#8146](https://github.com/RocketChat/Rocket.Chat/pull/8146) Fix iframe login API response (issue [#8145](https://github.com/RocketChat/Rocket.Chat/issues/8145)) +- [#7904](https://github.com/RocketChat/Rocket.Chat/pull/7904) Fix livechat toggle UI issue +- [#8144](https://github.com/RocketChat/Rocket.Chat/pull/8144) Fix new room sound being played too much +- [#7945](https://github.com/RocketChat/Rocket.Chat/pull/7945) Fix placeholders in account profile +- [#8099](https://github.com/RocketChat/Rocket.Chat/pull/8099) Fix setting user avatar on LDAP login +- [#7963](https://github.com/RocketChat/Rocket.Chat/pull/7963) Fix the status on the members list +- [#8679](https://github.com/RocketChat/Rocket.Chat/pull/8679) Fix typos +- [#8787](https://github.com/RocketChat/Rocket.Chat/pull/8787) Fixed some typos in DE translations +- [#8014](https://github.com/RocketChat/Rocket.Chat/pull/8014) Hide scrollbar on login page if not necessary +- [#8431](https://github.com/RocketChat/Rocket.Chat/pull/8431) Highlighted color height issue +- [#8721](https://github.com/RocketChat/Rocket.Chat/pull/8721) i18n'd Resend_verification_mail, username_initials, upload avatar +- [#9000](https://github.com/RocketChat/Rocket.Chat/pull/9000) if ogImage exists use it over image in oembedUrlWidget +- [#8966](https://github.com/RocketChat/Rocket.Chat/pull/8966) Importers failing when usernames exists but cases don't match and improve the importer framework's performance +- [#8795](https://github.com/RocketChat/Rocket.Chat/pull/8795) Improved grammar and made it clearer to the user +- [#8211](https://github.com/RocketChat/Rocket.Chat/pull/8211) Incorrect URL for login terms when using prefix +- [#8491](https://github.com/RocketChat/Rocket.Chat/pull/8491) Invalid Code message for password protected channel +- [#8048](https://github.com/RocketChat/Rocket.Chat/pull/8048) Invisible leader bar on hover +- [#8167](https://github.com/RocketChat/Rocket.Chat/pull/8167) Issue [#8166](https://github.com/RocketChat/Rocket.Chat/issues/8166) where empty analytics setting breaks to load Piwik script +- [#8948](https://github.com/RocketChat/Rocket.Chat/pull/8948) Katex markdown link changed +- [#8541](https://github.com/RocketChat/Rocket.Chat/pull/8541) LDAP login error regression at 0.59.0 +- [#8457](https://github.com/RocketChat/Rocket.Chat/pull/8457) LDAP memory issues when pagination is not available +- [#8613](https://github.com/RocketChat/Rocket.Chat/pull/8613) LDAP not merging existent users && Wrong id link generation +- [#8691](https://github.com/RocketChat/Rocket.Chat/pull/8691) LDAP not respecting UTF8 characters & Sync Interval not working +- [#8213](https://github.com/RocketChat/Rocket.Chat/pull/8213) Leave and hide buttons was removed +- [#8985](https://github.com/RocketChat/Rocket.Chat/pull/8985) Link for channels are not rendering correctly +- [#8868](https://github.com/RocketChat/Rocket.Chat/pull/8868) long filename overlaps cancel button in progress bar +- [#8907](https://github.com/RocketChat/Rocket.Chat/pull/8907) Long room announcement cut off +- [#8262](https://github.com/RocketChat/Rocket.Chat/pull/8262) make sidebar item animation fast +- [#7965](https://github.com/RocketChat/Rocket.Chat/pull/7965) Markdown being rendered in code tags +- [#8316](https://github.com/RocketChat/Rocket.Chat/pull/8316) Mention unread indicator was removed +- [#7885](https://github.com/RocketChat/Rocket.Chat/pull/7885) message actions over unread bar +- [#8634](https://github.com/RocketChat/Rocket.Chat/pull/8634) Message popup menu on mobile/cordova +- [#8019](https://github.com/RocketChat/Rocket.Chat/pull/8019) message-box autogrow +- [#8932](https://github.com/RocketChat/Rocket.Chat/pull/8932) Message-box autogrow flick +- [#8544](https://github.com/RocketChat/Rocket.Chat/pull/8544) Migration 103 wrong converting primrary colors +- [#8357](https://github.com/RocketChat/Rocket.Chat/pull/8357) Missing i18n translations +- [#8286](https://github.com/RocketChat/Rocket.Chat/pull/8286) Missing placeholder translations +- [#8637](https://github.com/RocketChat/Rocket.Chat/pull/8637) Missing scroll at create channel page +- [#8884](https://github.com/RocketChat/Rocket.Chat/pull/8884) Missing sidebar footer padding +- [#8059](https://github.com/RocketChat/Rocket.Chat/pull/8059) Not sending email to mentioned users with unchanged preference +- [#8828](https://github.com/RocketChat/Rocket.Chat/pull/8828) Notification is not sent when a video conference start +- [#9042](https://github.com/RocketChat/Rocket.Chat/pull/9042) Notification sound is not disabling when busy +- [#7954](https://github.com/RocketChat/Rocket.Chat/pull/7954) OTR buttons padding +- [#7883](https://github.com/RocketChat/Rocket.Chat/pull/7883) popover position on mobile +- [#8046](https://github.com/RocketChat/Rocket.Chat/pull/8046) Prevent autotranslate tokens race condition +- [#8315](https://github.com/RocketChat/Rocket.Chat/pull/8315) Put delete action on another popover group +- [#8441](https://github.com/RocketChat/Rocket.Chat/pull/8441) Range Slider Value label has bug in RTL +- [#7998](https://github.com/RocketChat/Rocket.Chat/pull/7998) Recent emojis not updated when adding via text +- [#8358](https://github.com/RocketChat/Rocket.Chat/pull/8358) remove accountBox from admin menu +- [#7895](https://github.com/RocketChat/Rocket.Chat/pull/7895) Remove break change in Realtime API +- [#8334](https://github.com/RocketChat/Rocket.Chat/pull/8334) Remove sidebar header on admin embedded version +- [#8237](https://github.com/RocketChat/Rocket.Chat/pull/8237) Removing pipe and commas from custom emojis ([#8168](https://github.com/RocketChat/Rocket.Chat/issues/8168)) +- [#8017](https://github.com/RocketChat/Rocket.Chat/pull/8017) room icon on header +- [#8112](https://github.com/RocketChat/Rocket.Chat/pull/8112) RTL +- [#8261](https://github.com/RocketChat/Rocket.Chat/pull/8261) RTL on reply +- [#8047](https://github.com/RocketChat/Rocket.Chat/pull/8047) Scroll on messagebox +- [#8190](https://github.com/RocketChat/Rocket.Chat/pull/8190) Scrollbar not using new style +- [#8018](https://github.com/RocketChat/Rocket.Chat/pull/8018) search results height +- [#7881](https://github.com/RocketChat/Rocket.Chat/pull/7881) search results position on sidebar +- [#8830](https://github.com/RocketChat/Rocket.Chat/pull/8830) Set correct Twitter link +- [#8122](https://github.com/RocketChat/Rocket.Chat/pull/8122) Settings description not showing +- [#7712](https://github.com/RocketChat/Rocket.Chat/pull/7712) Show leader on first load +- [#8718](https://github.com/RocketChat/Rocket.Chat/pull/8718) Show real name of current user at top of side nav if setting enabled +- [#8154](https://github.com/RocketChat/Rocket.Chat/pull/8154) Sidebar and RTL alignments +- [#8397](https://github.com/RocketChat/Rocket.Chat/pull/8397) Sidebar item menu position in RTL +- [#7880](https://github.com/RocketChat/Rocket.Chat/pull/7880) sidebar paddings +- [#8257](https://github.com/RocketChat/Rocket.Chat/pull/8257) sidenav colors, hide and leave, create channel on safari +- [#8252](https://github.com/RocketChat/Rocket.Chat/pull/8252) sidenav mentions on hover +- [#8390](https://github.com/RocketChat/Rocket.Chat/pull/8390) Slack import failing and not being able to be restarted +- [#7970](https://github.com/RocketChat/Rocket.Chat/pull/7970) Small alignment fixes +- [#9029](https://github.com/RocketChat/Rocket.Chat/pull/9029) snap install by setting grpc package used by google/vision to 1.6.6 +- [#8937](https://github.com/RocketChat/Rocket.Chat/pull/8937) Snippetted messages not working +- [#8269](https://github.com/RocketChat/Rocket.Chat/pull/8269) some placeholder and phrase traslation fix +- [#8717](https://github.com/RocketChat/Rocket.Chat/pull/8717) Sort direct messages by full name if show real names setting enabled +- [#7960](https://github.com/RocketChat/Rocket.Chat/pull/7960) status and active room colors on sidebar +- [#8413](https://github.com/RocketChat/Rocket.Chat/pull/8413) Store Outgoing Integration Result as String in Mongo +- [#8006](https://github.com/RocketChat/Rocket.Chat/pull/8006) Sync of non existent field throws exception +- [#7985](https://github.com/RocketChat/Rocket.Chat/pull/7985) Text area buttons and layout on mobile +- [#8159](https://github.com/RocketChat/Rocket.Chat/pull/8159) Text area lost text when page reloads +- [#7986](https://github.com/RocketChat/Rocket.Chat/pull/7986) Textarea on firefox +- [#8298](https://github.com/RocketChat/Rocket.Chat/pull/8298) TypeError: Cannot read property 't' of undefined +- [#8938](https://github.com/RocketChat/Rocket.Chat/pull/8938) Typo Fix +- [#8514](https://github.com/RocketChat/Rocket.Chat/pull/8514) Uncessary route reload break some routes +- [#9046](https://github.com/RocketChat/Rocket.Chat/pull/9046) Update insecure moment.js dependency +- [#8655](https://github.com/RocketChat/Rocket.Chat/pull/8655) Update pt-BR translation +- [#9024](https://github.com/RocketChat/Rocket.Chat/pull/9024) Use encodeURI in AmazonS3 contentDisposition file.name to prevent fail +- [#8210](https://github.com/RocketChat/Rocket.Chat/pull/8210) User avatar in DM list. +- [#8810](https://github.com/RocketChat/Rocket.Chat/pull/8810) User email settings on DM +- [#8716](https://github.com/RocketChat/Rocket.Chat/pull/8716) Username clipping on firefox +- [#7953](https://github.com/RocketChat/Rocket.Chat/pull/7953) username ellipsis on firefox +- [#8372](https://github.com/RocketChat/Rocket.Chat/pull/8372) Various LDAP issues & Missing pagination +- [#7988](https://github.com/RocketChat/Rocket.Chat/pull/7988) Vertical menu on flex-tab +- [#7893](https://github.com/RocketChat/Rocket.Chat/pull/7893) Window exception when parsing Markdown on server +- [#8547](https://github.com/RocketChat/Rocket.Chat/pull/8547) Wrong colors after migration 103 +- [#8296](https://github.com/RocketChat/Rocket.Chat/pull/8296) Wrong file name when upload to AWS S3 +- [#8489](https://github.com/RocketChat/Rocket.Chat/pull/8489) Wrong message when reseting password and 2FA is enabled +- [#9013](https://github.com/RocketChat/Rocket.Chat/pull/9013) Wrong room counter name +- [#8968](https://github.com/RocketChat/Rocket.Chat/pull/8968) Xenforo [BD]API for 'user.user_id; instead of 'id' + + +
+Others + +- [#8299](https://github.com/RocketChat/Rocket.Chat/pull/8299) [FIX] Amin menu not showing all items & File list breaking line +- [#8331](https://github.com/RocketChat/Rocket.Chat/pull/8331) [FIX-RC] Mobile file upload not working +- [#8906](https://github.com/RocketChat/Rocket.Chat/pull/8906) Add a few dots in readme.md +- [#8394](https://github.com/RocketChat/Rocket.Chat/pull/8394) Add i18n Title to snippet messages +- [#6606](https://github.com/RocketChat/Rocket.Chat/pull/6606) Added RocketChatLauncher (SaaS) +- [#8036](https://github.com/RocketChat/Rocket.Chat/pull/8036) Adding: How to Install in WeDeploy +- [#8820](https://github.com/RocketChat/Rocket.Chat/pull/8820) Bump version to 0.60.0-develop +- [#8515](https://github.com/RocketChat/Rocket.Chat/pull/8515) Change artifact path +- [#8872](https://github.com/RocketChat/Rocket.Chat/pull/8872) Changed wording for "Maximum Allowed Message Size" +- [#8463](https://github.com/RocketChat/Rocket.Chat/pull/8463) Color variables migration +- [#8273](https://github.com/RocketChat/Rocket.Chat/pull/8273) Deps update +- [#7866](https://github.com/RocketChat/Rocket.Chat/pull/7866) Develop sync +- [#8244](https://github.com/RocketChat/Rocket.Chat/pull/8244) Disable perfect scrollbar +- [#8490](https://github.com/RocketChat/Rocket.Chat/pull/8490) Enable AutoLinker back +- [#8243](https://github.com/RocketChat/Rocket.Chat/pull/8243) Fix `leave and hide` click, color and position +- [#9049](https://github.com/RocketChat/Rocket.Chat/pull/9049) Fix api regression (exception when deleting user) +- [#8282](https://github.com/RocketChat/Rocket.Chat/pull/8282) fix color on unread messages +- [#8862](https://github.com/RocketChat/Rocket.Chat/pull/8862) Fix Docker image build +- [#8520](https://github.com/RocketChat/Rocket.Chat/pull/8520) Fix high CPU load when sending messages on large rooms (regression) +- [#8829](https://github.com/RocketChat/Rocket.Chat/pull/8829) Fix link to .asc file on S3 +- [#8194](https://github.com/RocketChat/Rocket.Chat/pull/8194) Fix more rtl issues +- [#9084](https://github.com/RocketChat/Rocket.Chat/pull/9084) Fix tag build +- [#8750](https://github.com/RocketChat/Rocket.Chat/pull/8750) Fix Travis CI build +- [#8705](https://github.com/RocketChat/Rocket.Chat/pull/8705) Fix typo +- [#8416](https://github.com/RocketChat/Rocket.Chat/pull/8416) Fix: Account menu position on RTL +- [#8516](https://github.com/RocketChat/Rocket.Chat/pull/8516) Fix: Change password not working in new UI +- [#8417](https://github.com/RocketChat/Rocket.Chat/pull/8417) Fix: Missing LDAP option to show internal logs +- [#8414](https://github.com/RocketChat/Rocket.Chat/pull/8414) Fix: Missing LDAP reconnect setting +- [#8398](https://github.com/RocketChat/Rocket.Chat/pull/8398) Fix: Missing settings to configure LDAP size and page limits +- [#1](https://github.com/RocketChat/Rocket.Chat/pull/1) h +- [#7894](https://github.com/RocketChat/Rocket.Chat/pull/7894) Hide flex-tab close button +- [#8451](https://github.com/RocketChat/Rocket.Chat/pull/8451) Improve markdown parser code +- [#8529](https://github.com/RocketChat/Rocket.Chat/pull/8529) Improve room sync speed +- [#8653](https://github.com/RocketChat/Rocket.Chat/pull/8653) install grpc package manually to fix snap armhf build +- [#8831](https://github.com/RocketChat/Rocket.Chat/pull/8831) LingoHub based on develop +- [#8375](https://github.com/RocketChat/Rocket.Chat/pull/8375) LingoHub based on develop +- [#9085](https://github.com/RocketChat/Rocket.Chat/pull/9085) Meteor update to 1.6.0.1 +- [#7969](https://github.com/RocketChat/Rocket.Chat/pull/7969) npm deps update +- [#8197](https://github.com/RocketChat/Rocket.Chat/pull/8197) npm deps update +- [#8253](https://github.com/RocketChat/Rocket.Chat/pull/8253) readme-file: fix broken link +- [#8742](https://github.com/RocketChat/Rocket.Chat/pull/8742) Remove chatops package +- [#8345](https://github.com/RocketChat/Rocket.Chat/pull/8345) Remove field `lastActivity` from subscription data +- [#8054](https://github.com/RocketChat/Rocket.Chat/pull/8054) Remove unnecessary returns in cors common +- [#8743](https://github.com/RocketChat/Rocket.Chat/pull/8743) Removed tmeasday:crypto-md5 +- [#8434](https://github.com/RocketChat/Rocket.Chat/pull/8434) removing a duplicate line +- [#7983](https://github.com/RocketChat/Rocket.Chat/pull/7983) Revert "npm deps update" +- [#9088](https://github.com/RocketChat/Rocket.Chat/pull/9088) Sync develop with master +- [#8363](https://github.com/RocketChat/Rocket.Chat/pull/8363) Sync translations from LingoHub +- [#9068](https://github.com/RocketChat/Rocket.Chat/pull/9068) Turn off prettyJson if the node environment isn't development +- [#8793](https://github.com/RocketChat/Rocket.Chat/pull/8793) Update DEMO to OPEN links +- [#8802](https://github.com/RocketChat/Rocket.Chat/pull/8802) Update meteor package to 1.8.1 +- [#8364](https://github.com/RocketChat/Rocket.Chat/pull/8364) Update Meteor to 1.5.2.2 +- [#8355](https://github.com/RocketChat/Rocket.Chat/pull/8355) Update meteor to 1.5.2.2-rc.0 +- [#9018](https://github.com/RocketChat/Rocket.Chat/pull/9018) Update multiple-instance-status package +- [#8719](https://github.com/RocketChat/Rocket.Chat/pull/8719) Updated comments. +- [#7922](https://github.com/RocketChat/Rocket.Chat/pull/7922) Use real names for user and room in emails +
+ + + ## 0.59.4 (2017-11-28) diff --git a/package.json b/package.json index eaabe38705d8..f5445d91ecf3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "Rocket.Chat", "description": "The Ultimate Open Source WebChat Platform", - "version": "0.60.0-develop", + "version": "0.60.0-rc.0", "author": { "name": "Rocket.Chat", "url": "https://rocket.chat/" diff --git a/packages/rocketchat-lib/rocketchat.info b/packages/rocketchat-lib/rocketchat.info index 6bf0194dea8c..0e973b155782 100644 --- a/packages/rocketchat-lib/rocketchat.info +++ b/packages/rocketchat-lib/rocketchat.info @@ -1,3 +1,3 @@ { - "version": "0.60.0-develop" + "version": "0.60.0-rc.0" } From 32bde8febd08840deff9544f2aefd329fccc18a4 Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento Date: Wed, 13 Dec 2017 18:16:50 -0200 Subject: [PATCH 13/70] Bump version to 0.60.0-rc.1 --- .docker/Dockerfile | 2 +- .sandstorm/sandstorm-pkgdef.capnp | 2 +- .travis/snap.sh | 2 +- HISTORY.md | 26 +++++++++++++++++++++++++ package.json | 2 +- packages/rocketchat-lib/rocketchat.info | 2 +- 6 files changed, 31 insertions(+), 5 deletions(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 9f5364064bed..d08d0d33e30e 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,6 +1,6 @@ FROM rocketchat/base:8 -ENV RC_VERSION 0.60.0-rc.0 +ENV RC_VERSION 0.60.0-rc.1 MAINTAINER buildmaster@rocket.chat diff --git a/.sandstorm/sandstorm-pkgdef.capnp b/.sandstorm/sandstorm-pkgdef.capnp index ff4eaabd9393..d360080543b1 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.60.0-rc.0"), + appMarketingVersion = (defaultText = "0.60.0-rc.1"), # Human-readable representation of appVersion. Should match the way you # identify versions of your app in documentation and marketing. diff --git a/.travis/snap.sh b/.travis/snap.sh index a86f672ab180..63eb75f4e96f 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.60.0-rc.0 + RC_VERSION=0.60.0-rc.1 fi echo "Preparing to trigger a snap release for $CHANNEL channel" diff --git a/HISTORY.md b/HISTORY.md index 07d28e2e6dd5..8b7db9bd3c22 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,29 @@ + +# 0.60.0-rc.1 (2017-12-13) + + +### New Features + +- [#9092](https://github.com/RocketChat/Rocket.Chat/pull/9092) Modal + + +### Bug Fixes + +- [#9109](https://github.com/RocketChat/Rocket.Chat/pull/9109) Creating channels on Firefox +- [#9108](https://github.com/RocketChat/Rocket.Chat/pull/9108) REST API file upload not respecting size limit +- [#9095](https://github.com/RocketChat/Rocket.Chat/pull/9095) Some UI problems on 0.60 +- [#9094](https://github.com/RocketChat/Rocket.Chat/pull/9094) Update rocketchat:streamer to be compatible with previous version + + +
+Others + +- [#9110](https://github.com/RocketChat/Rocket.Chat/pull/9110) Fix regression in api channels.members +- [#9111](https://github.com/RocketChat/Rocket.Chat/pull/9111) Fix: users listed as online after API login +
+ + + # 0.60.0-rc.0 (2017-12-12) diff --git a/package.json b/package.json index f5445d91ecf3..819bc4e19719 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "Rocket.Chat", "description": "The Ultimate Open Source WebChat Platform", - "version": "0.60.0-rc.0", + "version": "0.60.0-rc.1", "author": { "name": "Rocket.Chat", "url": "https://rocket.chat/" diff --git a/packages/rocketchat-lib/rocketchat.info b/packages/rocketchat-lib/rocketchat.info index 0e973b155782..347517cd3946 100644 --- a/packages/rocketchat-lib/rocketchat.info +++ b/packages/rocketchat-lib/rocketchat.info @@ -1,3 +1,3 @@ { - "version": "0.60.0-rc.0" + "version": "0.60.0-rc.1" } From 76f82a0838a88045101d10c84b2533152e58aa13 Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento Date: Thu, 14 Dec 2017 09:47:13 -0200 Subject: [PATCH 14/70] Merge pull request #9091 from ggrish/working [FIX] Channel page error --- packages/rocketchat-ui/client/views/app/room.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/rocketchat-ui/client/views/app/room.js b/packages/rocketchat-ui/client/views/app/room.js index cf9991f42a8e..46245ee405a6 100644 --- a/packages/rocketchat-ui/client/views/app/room.js +++ b/packages/rocketchat-ui/client/views/app/room.js @@ -256,7 +256,9 @@ Template.room.helpers({ return { _id: this._id, onResize: () => { - instance.sendToBottomIfNecessary(); + if (instance.sendToBottomIfNecessary) { + instance.sendToBottomIfNecessary(); + } } }; }, From 3b0ea46529f87c7291a29c0ae6b3d6f072f17515 Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento Date: Thu, 14 Dec 2017 17:42:32 -0200 Subject: [PATCH 15/70] Merge pull request #9120 from RocketChat/hotfix/9043 Fix: Multiple unread indicators --- packages/rocketchat-ui/client/lib/readMessages.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/rocketchat-ui/client/lib/readMessages.js b/packages/rocketchat-ui/client/lib/readMessages.js index 8fb246850e93..e03ee4afbc63 100644 --- a/packages/rocketchat-ui/client/lib/readMessages.js +++ b/packages/rocketchat-ui/client/lib/readMessages.js @@ -180,6 +180,7 @@ const readMessage = new class { if (firstUnreadRecord != null) { room.unreadFirstId = firstUnreadRecord._id; + $(room.dom).find(`.message.first-unread:not(#${ firstUnreadRecord._id })`).removeClass('first-unread'); $(room.dom).find(`.message#${ firstUnreadRecord._id }`).addClass('first-unread'); } } From 7d04990cadd7b29749efa3ebc2c359ef83cd1a27 Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento Date: Thu, 14 Dec 2017 17:58:39 -0200 Subject: [PATCH 16/70] Merge pull request #9121 from RocketChat/hotfix/room-loading-block [FIX] Do not block room while loading history --- packages/rocketchat-ui/client/lib/RoomManager.js | 11 +++++------ server/methods/loadHistory.js | 1 + 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/rocketchat-ui/client/lib/RoomManager.js b/packages/rocketchat-ui/client/lib/RoomManager.js index 46c8805cbb0e..c50521198617 100644 --- a/packages/rocketchat-ui/client/lib/RoomManager.js +++ b/packages/rocketchat-ui/client/lib/RoomManager.js @@ -25,14 +25,10 @@ const RoomManager = new function() { return RocketChat.roomTypes.findRoom(type, name, user); }); - if (room == null) { - record.ready = true; - } else { + if (room != null) { openedRooms[typeName].rid = room._id; RoomHistoryManager.getMoreIfIsEmpty(room._id); - record.ready = RoomHistoryManager.isLoading(room._id) === false; - Dep.changed(); if (openedRooms[typeName].streamActive !== true) { openedRooms[typeName].streamActive = true; @@ -69,7 +65,10 @@ const RoomManager = new function() { RocketChat.Notifications.onRoom(openedRooms[typeName].rid, 'deleteMessage', onDeleteMessageStream); // eslint-disable-line no-use-before-define } } - return Dep.changed(); + Meteor.defer(() => { + record.ready = true; + Dep.changed(); + }); }); }); } diff --git a/server/methods/loadHistory.js b/server/methods/loadHistory.js index 6b569c2062f7..d0d7fb21e264 100644 --- a/server/methods/loadHistory.js +++ b/server/methods/loadHistory.js @@ -21,6 +21,7 @@ RocketChat.settings.get(/Message_HideType_.+/, function(key, value) { Meteor.methods({ loadHistory(rid, end, limit = 20, ls) { + this.unblock(); check(rid, String); if (!Meteor.userId() && RocketChat.settings.get('Accounts_AllowAnonymousRead') === false) { From 5653ee6cda932651ceec7372e3214291b6448a5b Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento Date: Thu, 14 Dec 2017 19:14:02 -0200 Subject: [PATCH 17/70] Merge pull request #9134 from RocketChat/wrap-importers-in-try [FIX] Importers not recovering when an error occurs --- .../server/importer.js | 268 +++++++-------- .../server/importer.js | 313 +++++++++--------- .../server/importer.js | 275 +++++++-------- .../server/importer.js | 81 ++--- .../server/importer.js | 22 +- 5 files changed, 496 insertions(+), 463 deletions(-) diff --git a/packages/rocketchat-importer-csv/server/importer.js b/packages/rocketchat-importer-csv/server/importer.js index 11568c5d52a5..89710bad7567 100644 --- a/packages/rocketchat-importer-csv/server/importer.js +++ b/packages/rocketchat-importer-csv/server/importer.js @@ -169,169 +169,175 @@ export class CsvImporter extends Base { const startedByUserId = Meteor.userId(); Meteor.defer(() => { super.updateProgress(ProgressStep.IMPORTING_USERS); - //Import the users - for (const u of this.users.users) { - if (!u.do_import) { - continue; - } - - Meteor.runAsUser(startedByUserId, () => { - let existantUser = RocketChat.models.Users.findOneByEmailAddress(u.email); - //If we couldn't find one by their email address, try to find an existing user by their username - if (!existantUser) { - existantUser = RocketChat.models.Users.findOneByUsername(u.username); - } - - if (existantUser) { - //since we have an existing user, let's try a few things - u.rocketId = existantUser._id; - RocketChat.models.Users.update({ _id: u.rocketId }, { $addToSet: { importIds: u.id } }); - } else { - const userId = Accounts.createUser({ email: u.email, password: Date.now() + u.name + u.email.toUpperCase() }); - Meteor.runAsUser(userId, () => { - Meteor.call('setUsername', u.username, {joinDefaultChannelsSilenced: true}); - RocketChat.models.Users.setName(userId, u.name); - RocketChat.models.Users.update({ _id: userId }, { $addToSet: { importIds: u.id } }); - u.rocketId = userId; - }); + try { + //Import the users + for (const u of this.users.users) { + if (!u.do_import) { + continue; } - super.addCountCompleted(1); - }); - } - this.collection.update({ _id: this.users._id }, { $set: { 'users': this.users.users }}); + Meteor.runAsUser(startedByUserId, () => { + let existantUser = RocketChat.models.Users.findOneByEmailAddress(u.email); - //Import the channels - super.updateProgress(ProgressStep.IMPORTING_CHANNELS); - for (const c of this.channels.channels) { - if (!c.do_import) { - continue; - } + //If we couldn't find one by their email address, try to find an existing user by their username + if (!existantUser) { + existantUser = RocketChat.models.Users.findOneByUsername(u.username); + } - Meteor.runAsUser(startedByUserId, () => { - const existantRoom = RocketChat.models.Rooms.findOneByName(c.name); - //If the room exists or the name of it is 'general', then we don't need to create it again - if (existantRoom || c.name.toUpperCase() === 'GENERAL') { - c.rocketId = c.name.toUpperCase() === 'GENERAL' ? 'GENERAL' : existantRoom._id; - RocketChat.models.Rooms.update({ _id: c.rocketId }, { $addToSet: { importIds: c.id } }); - } else { - //Find the rocketchatId of the user who created this channel - let creatorId = startedByUserId; - for (const u of this.users.users) { - if (u.username === c.creator && u.do_import) { - creatorId = u.rocketId; - } + if (existantUser) { + //since we have an existing user, let's try a few things + u.rocketId = existantUser._id; + RocketChat.models.Users.update({ _id: u.rocketId }, { $addToSet: { importIds: u.id } }); + } else { + const userId = Accounts.createUser({ email: u.email, password: Date.now() + u.name + u.email.toUpperCase() }); + Meteor.runAsUser(userId, () => { + Meteor.call('setUsername', u.username, {joinDefaultChannelsSilenced: true}); + RocketChat.models.Users.setName(userId, u.name); + RocketChat.models.Users.update({ _id: userId }, { $addToSet: { importIds: u.id } }); + u.rocketId = userId; + }); } - //Create the channel - Meteor.runAsUser(creatorId, () => { - const roomInfo = Meteor.call(c.isPrivate ? 'createPrivateGroup' : 'createChannel', c.name, c.members); - c.rocketId = roomInfo.rid; - }); + super.addCountCompleted(1); + }); + } + this.collection.update({ _id: this.users._id }, { $set: { 'users': this.users.users }}); - RocketChat.models.Rooms.update({ _id: c.rocketId }, { $addToSet: { importIds: c.id } }); + //Import the channels + super.updateProgress(ProgressStep.IMPORTING_CHANNELS); + for (const c of this.channels.channels) { + if (!c.do_import) { + continue; } - super.addCountCompleted(1); - }); - } - this.collection.update({ _id: this.channels._id }, { $set: { 'channels': this.channels.channels }}); - - //If no channels file, collect channel map from DB for message-only import - if (this.channels.channels.length === 0) { - for (const cname of this.messages.keys()) { Meteor.runAsUser(startedByUserId, () => { - const existantRoom = RocketChat.models.Rooms.findOneByName(cname); - if (existantRoom || cname.toUpperCase() === 'GENERAL') { - this.channels.channels.push({ - id: cname.replace('.', '_'), - name: cname, - rocketId: (cname.toUpperCase() === 'GENERAL' ? 'GENERAL' : existantRoom._id), - do_import: true + const existantRoom = RocketChat.models.Rooms.findOneByName(c.name); + //If the room exists or the name of it is 'general', then we don't need to create it again + if (existantRoom || c.name.toUpperCase() === 'GENERAL') { + c.rocketId = c.name.toUpperCase() === 'GENERAL' ? 'GENERAL' : existantRoom._id; + RocketChat.models.Rooms.update({ _id: c.rocketId }, { $addToSet: { importIds: c.id } }); + } else { + //Find the rocketchatId of the user who created this channel + let creatorId = startedByUserId; + for (const u of this.users.users) { + if (u.username === c.creator && u.do_import) { + creatorId = u.rocketId; + } + } + + //Create the channel + Meteor.runAsUser(creatorId, () => { + const roomInfo = Meteor.call(c.isPrivate ? 'createPrivateGroup' : 'createChannel', c.name, c.members); + c.rocketId = roomInfo.rid; }); + + RocketChat.models.Rooms.update({ _id: c.rocketId }, { $addToSet: { importIds: c.id } }); } + + super.addCountCompleted(1); }); } - } + this.collection.update({ _id: this.channels._id }, { $set: { 'channels': this.channels.channels }}); + + //If no channels file, collect channel map from DB for message-only import + if (this.channels.channels.length === 0) { + for (const cname of this.messages.keys()) { + Meteor.runAsUser(startedByUserId, () => { + const existantRoom = RocketChat.models.Rooms.findOneByName(cname); + if (existantRoom || cname.toUpperCase() === 'GENERAL') { + this.channels.channels.push({ + id: cname.replace('.', '_'), + name: cname, + rocketId: (cname.toUpperCase() === 'GENERAL' ? 'GENERAL' : existantRoom._id), + do_import: true + }); + } + }); + } + } + + //If no users file, collect user map from DB for message-only import + if (this.users.users.length === 0) { + for (const [ch, messagesMap] of this.messages.entries()) { + const csvChannel = this.getChannelFromName(ch); + if (!csvChannel || !csvChannel.do_import) { + continue; + } + Meteor.runAsUser(startedByUserId, () => { + for (const msgs of messagesMap.values()) { + for (const msg of msgs.messages) { + if (!this.getUserFromUsername(msg.username)) { + const user = RocketChat.models.Users.findOneByUsername(msg.username); + if (user) { + this.users.users.push({ + rocketId: user._id, + username: user.username + }); + } + } + } + } + }); + } + } - //If no users file, collect user map from DB for message-only import - if (this.users.users.length === 0) { + //Import the Messages + super.updateProgress(ProgressStep.IMPORTING_MESSAGES); for (const [ch, messagesMap] of this.messages.entries()) { const csvChannel = this.getChannelFromName(ch); if (!csvChannel || !csvChannel.do_import) { continue; } + + const room = RocketChat.models.Rooms.findOneById(csvChannel.rocketId, { fields: { usernames: 1, t: 1, name: 1 } }); Meteor.runAsUser(startedByUserId, () => { - for (const msgs of messagesMap.values()) { + const timestamps = {}; + for (const [msgGroupData, msgs] of messagesMap.entries()) { + super.updateRecord({ 'messagesstatus': `${ ch }/${ msgGroupData }.${ msgs.messages.length }` }); for (const msg of msgs.messages) { - if (!this.getUserFromUsername(msg.username)) { - const user = RocketChat.models.Users.findOneByUsername(msg.username); - if (user) { - this.users.users.push({ - rocketId: user._id, - username: user.username - }); + if (isNaN(new Date(parseInt(msg.ts)))) { + this.logger.warn(`Timestamp on a message in ${ ch }/${ msgGroupData } is invalid`); + super.addCountCompleted(1); + continue; + } + + const creator = this.getUserFromUsername(msg.username); + if (creator) { + let suffix = ''; + if (timestamps[msg.ts] === undefined) { + timestamps[msg.ts] = 1; + } else { + suffix = `-${ timestamps[msg.ts] }`; + timestamps[msg.ts] += 1; } + const msgObj = { + _id: `csv-${ csvChannel.id }-${ msg.ts }${ suffix }`, + ts: new Date(parseInt(msg.ts)), + msg: msg.text, + rid: room._id, + u: { + _id: creator._id, + username: creator.username + } + }; + + RocketChat.sendMessage(creator, msgObj, room, true); } + + super.addCountCompleted(1); } } }); } - } - - //Import the Messages - super.updateProgress(ProgressStep.IMPORTING_MESSAGES); - for (const [ch, messagesMap] of this.messages.entries()) { - const csvChannel = this.getChannelFromName(ch); - if (!csvChannel || !csvChannel.do_import) { - continue; - } - - const room = RocketChat.models.Rooms.findOneById(csvChannel.rocketId, { fields: { usernames: 1, t: 1, name: 1 } }); - Meteor.runAsUser(startedByUserId, () => { - const timestamps = {}; - for (const [msgGroupData, msgs] of messagesMap.entries()) { - super.updateRecord({ 'messagesstatus': `${ ch }/${ msgGroupData }.${ msgs.messages.length }` }); - for (const msg of msgs.messages) { - if (isNaN(new Date(parseInt(msg.ts)))) { - this.logger.warn(`Timestamp on a message in ${ ch }/${ msgGroupData } is invalid`); - super.addCountCompleted(1); - continue; - } - - const creator = this.getUserFromUsername(msg.username); - if (creator) { - let suffix = ''; - if (timestamps[msg.ts] === undefined) { - timestamps[msg.ts] = 1; - } else { - suffix = `-${ timestamps[msg.ts] }`; - timestamps[msg.ts] += 1; - } - const msgObj = { - _id: `csv-${ csvChannel.id }-${ msg.ts }${ suffix }`, - ts: new Date(parseInt(msg.ts)), - msg: msg.text, - rid: room._id, - u: { - _id: creator._id, - username: creator.username - } - }; - - RocketChat.sendMessage(creator, msgObj, room, true); - } - - super.addCountCompleted(1); - } - } - }); + super.updateProgress(ProgressStep.FINISHING); + super.updateProgress(ProgressStep.DONE); + } catch (e) { + this.logger.error(e); + super.updateProgress(ProgressStep.ERROR); } - super.updateProgress(ProgressStep.FINISHING); - super.updateProgress(ProgressStep.DONE); const timeTook = Date.now() - started; this.logger.log(`CSV Import took ${ timeTook } milliseconds.`); }); diff --git a/packages/rocketchat-importer-hipchat-enterprise/server/importer.js b/packages/rocketchat-importer-hipchat-enterprise/server/importer.js index 7e566662a3d6..bc74cd5ff5ba 100644 --- a/packages/rocketchat-importer-hipchat-enterprise/server/importer.js +++ b/packages/rocketchat-importer-hipchat-enterprise/server/importer.js @@ -240,193 +240,200 @@ export class HipChatEnterpriseImporter extends Base { const startedByUserId = Meteor.userId(); Meteor.defer(() => { super.updateProgress(ProgressStep.IMPORTING_USERS); - //Import the users - for (const u of this.users.users) { - this.logger.debug(`Starting the user import: ${ u.username } and are we importing them? ${ u.do_import }`); - if (!u.do_import) { - continue; - } - Meteor.runAsUser(startedByUserId, () => { - let existantUser = RocketChat.models.Users.findOneByEmailAddress(u.email); + try { + //Import the users + for (const u of this.users.users) { + this.logger.debug(`Starting the user import: ${ u.username } and are we importing them? ${ u.do_import }`); + if (!u.do_import) { + continue; + } + + Meteor.runAsUser(startedByUserId, () => { + let existantUser = RocketChat.models.Users.findOneByEmailAddress(u.email); + + //If we couldn't find one by their email address, try to find an existing user by their username + if (!existantUser) { + existantUser = RocketChat.models.Users.findOneByUsername(u.username); + } + + if (existantUser) { + //since we have an existing user, let's try a few things + u.rocketId = existantUser._id; + RocketChat.models.Users.update({ _id: u.rocketId }, { $addToSet: { importIds: u.id } }); + } else { + const userId = Accounts.createUser({ email: u.email, password: Date.now() + u.name + u.email.toUpperCase() }); + Meteor.runAsUser(userId, () => { + Meteor.call('setUsername', u.username, {joinDefaultChannelsSilenced: true}); + //TODO: Use moment timezone to calc the time offset - Meteor.call 'userSetUtcOffset', user.tz_offset / 3600 + RocketChat.models.Users.setName(userId, u.name); + //TODO: Think about using a custom field for the users "title" field + + if (u.avatar) { + Meteor.call('setAvatarFromService', `data:image/png;base64,${ u.avatar }`); + } + + //Deleted users are 'inactive' users in Rocket.Chat + if (u.deleted) { + Meteor.call('setUserActiveStatus', userId, false); + } + + RocketChat.models.Users.update({ _id: userId }, { $addToSet: { importIds: u.id } }); + u.rocketId = userId; + }); + } + + super.addCountCompleted(1); + }); + } + this.collection.update({ _id: this.users._id }, { $set: { 'users': this.users.users }}); - //If we couldn't find one by their email address, try to find an existing user by their username - if (!existantUser) { - existantUser = RocketChat.models.Users.findOneByUsername(u.username); + //Import the channels + super.updateProgress(ProgressStep.IMPORTING_CHANNELS); + for (const c of this.channels.channels) { + if (!c.do_import) { + continue; } - if (existantUser) { - //since we have an existing user, let's try a few things - u.rocketId = existantUser._id; - RocketChat.models.Users.update({ _id: u.rocketId }, { $addToSet: { importIds: u.id } }); - } else { - const userId = Accounts.createUser({ email: u.email, password: Date.now() + u.name + u.email.toUpperCase() }); - Meteor.runAsUser(userId, () => { - Meteor.call('setUsername', u.username, {joinDefaultChannelsSilenced: true}); - //TODO: Use moment timezone to calc the time offset - Meteor.call 'userSetUtcOffset', user.tz_offset / 3600 - RocketChat.models.Users.setName(userId, u.name); - //TODO: Think about using a custom field for the users "title" field - - if (u.avatar) { - Meteor.call('setAvatarFromService', `data:image/png;base64,${ u.avatar }`); + Meteor.runAsUser(startedByUserId, () => { + const existantRoom = RocketChat.models.Rooms.findOneByName(c.name); + //If the room exists or the name of it is 'general', then we don't need to create it again + if (existantRoom || c.name.toUpperCase() === 'GENERAL') { + c.rocketId = c.name.toUpperCase() === 'GENERAL' ? 'GENERAL' : existantRoom._id; + RocketChat.models.Rooms.update({ _id: c.rocketId }, { $addToSet: { importIds: c.id } }); + } else { + //Find the rocketchatId of the user who created this channel + let creatorId = startedByUserId; + for (const u of this.users.users) { + if (u.id === c.creator && u.do_import) { + creatorId = u.rocketId; + } } - //Deleted users are 'inactive' users in Rocket.Chat - if (u.deleted) { - Meteor.call('setUserActiveStatus', userId, false); - } + //Create the channel + Meteor.runAsUser(creatorId, () => { + const roomInfo = Meteor.call(c.isPrivate ? 'createPrivateGroup' : 'createChannel', c.name, []); + c.rocketId = roomInfo.rid; + }); - RocketChat.models.Users.update({ _id: userId }, { $addToSet: { importIds: u.id } }); - u.rocketId = userId; - }); + RocketChat.models.Rooms.update({ _id: c.rocketId }, { $set: { ts: c.created, topic: c.topic }, $addToSet: { importIds: c.id } }); + } + + super.addCountCompleted(1); + }); + } + this.collection.update({ _id: this.channels._id }, { $set: { 'channels': this.channels.channels }}); + + //Import the Messages + super.updateProgress(ProgressStep.IMPORTING_MESSAGES); + for (const [ch, messagesMap] of this.messages.entries()) { + const hipChannel = this.getChannelFromRoomIdentifier(ch); + if (!hipChannel.do_import) { + continue; } - super.addCountCompleted(1); - }); - } - this.collection.update({ _id: this.users._id }, { $set: { 'users': this.users.users }}); + const room = RocketChat.models.Rooms.findOneById(hipChannel.rocketId, { fields: { usernames: 1, t: 1, name: 1 } }); + Meteor.runAsUser(startedByUserId, () => { + for (const [msgGroupData, msgs] of messagesMap.entries()) { + super.updateRecord({ 'messagesstatus': `${ ch }/${ msgGroupData }.${ msgs.messages.length }` }); + for (const msg of msgs.messages) { + if (isNaN(msg.ts)) { + this.logger.warn(`Timestamp on a message in ${ ch }/${ msgGroupData } is invalid`); + super.addCountCompleted(1); + continue; + } - //Import the channels - super.updateProgress(ProgressStep.IMPORTING_CHANNELS); - for (const c of this.channels.channels) { - if (!c.do_import) { - continue; - } + const creator = this.getRocketUserFromUserId(msg.userId); + if (creator) { + switch (msg.type) { + case 'user': + RocketChat.sendMessage(creator, { + _id: msg.id, + ts: msg.ts, + msg: msg.text, + rid: room._id, + u: { + _id: creator._id, + username: creator.username + } + }, room, true); + break; + case 'topic': + RocketChat.models.Messages.createRoomSettingsChangedWithTypeRoomIdMessageAndUser('room_changed_topic', room._id, msg.text, creator, { _id: msg.id, ts: msg.ts }); + break; + } + } - Meteor.runAsUser(startedByUserId, () => { - const existantRoom = RocketChat.models.Rooms.findOneByName(c.name); - //If the room exists or the name of it is 'general', then we don't need to create it again - if (existantRoom || c.name.toUpperCase() === 'GENERAL') { - c.rocketId = c.name.toUpperCase() === 'GENERAL' ? 'GENERAL' : existantRoom._id; - RocketChat.models.Rooms.update({ _id: c.rocketId }, { $addToSet: { importIds: c.id } }); - } else { - //Find the rocketchatId of the user who created this channel - let creatorId = startedByUserId; - for (const u of this.users.users) { - if (u.id === c.creator && u.do_import) { - creatorId = u.rocketId; + super.addCountCompleted(1); } } + }); + } - //Create the channel - Meteor.runAsUser(creatorId, () => { - const roomInfo = Meteor.call(c.isPrivate ? 'createPrivateGroup' : 'createChannel', c.name, []); - c.rocketId = roomInfo.rid; - }); - - RocketChat.models.Rooms.update({ _id: c.rocketId }, { $set: { ts: c.created, topic: c.topic }, $addToSet: { importIds: c.id } }); + //Import the Direct Messages + for (const [directMsgRoom, directMessagesMap] of this.directMessages.entries()) { + const hipUser = this.getUserFromDirectMessageIdentifier(directMsgRoom); + if (!hipUser.do_import) { + continue; } - super.addCountCompleted(1); - }); - } - this.collection.update({ _id: this.channels._id }, { $set: { 'channels': this.channels.channels }}); - - //Import the Messages - super.updateProgress(ProgressStep.IMPORTING_MESSAGES); - for (const [ch, messagesMap] of this.messages.entries()) { - const hipChannel = this.getChannelFromRoomIdentifier(ch); - if (!hipChannel.do_import) { - continue; - } + //Verify this direct message user's room is valid (confusing but idk how else to explain it) + if (!this.getRocketUserFromUserId(hipUser.id)) { + continue; + } - const room = RocketChat.models.Rooms.findOneById(hipChannel.rocketId, { fields: { usernames: 1, t: 1, name: 1 } }); - Meteor.runAsUser(startedByUserId, () => { - for (const [msgGroupData, msgs] of messagesMap.entries()) { - super.updateRecord({ 'messagesstatus': `${ ch }/${ msgGroupData }.${ msgs.messages.length }` }); + for (const [msgGroupData, msgs] of directMessagesMap.entries()) { + super.updateRecord({ 'messagesstatus': `${ directMsgRoom }/${ msgGroupData }.${ msgs.messages.length }` }); for (const msg of msgs.messages) { if (isNaN(msg.ts)) { - this.logger.warn(`Timestamp on a message in ${ ch }/${ msgGroupData } is invalid`); + this.logger.warn(`Timestamp on a message in ${ directMsgRoom }/${ msgGroupData } is invalid`); super.addCountCompleted(1); continue; } - const creator = this.getRocketUserFromUserId(msg.userId); - if (creator) { - switch (msg.type) { - case 'user': - RocketChat.sendMessage(creator, { - _id: msg.id, - ts: msg.ts, - msg: msg.text, - rid: room._id, - u: { - _id: creator._id, - username: creator.username - } - }, room, true); - break; - case 'topic': - RocketChat.models.Messages.createRoomSettingsChangedWithTypeRoomIdMessageAndUser('room_changed_topic', room._id, msg.text, creator, { _id: msg.id, ts: msg.ts }); - break; - } + //make sure the message sender is a valid user inside rocket.chat + const sender = this.getRocketUserFromUserId(msg.senderId); + if (!sender) { + continue; } - super.addCountCompleted(1); - } - } - }); - } - - //Import the Direct Messages - for (const [directMsgRoom, directMessagesMap] of this.directMessages.entries()) { - const hipUser = this.getUserFromDirectMessageIdentifier(directMsgRoom); - if (!hipUser.do_import) { - continue; - } - - //Verify this direct message user's room is valid (confusing but idk how else to explain it) - if (!this.getRocketUserFromUserId(hipUser.id)) { - continue; - } - - for (const [msgGroupData, msgs] of directMessagesMap.entries()) { - super.updateRecord({ 'messagesstatus': `${ directMsgRoom }/${ msgGroupData }.${ msgs.messages.length }` }); - for (const msg of msgs.messages) { - if (isNaN(msg.ts)) { - this.logger.warn(`Timestamp on a message in ${ directMsgRoom }/${ msgGroupData } is invalid`); - super.addCountCompleted(1); - continue; - } - - //make sure the message sender is a valid user inside rocket.chat - const sender = this.getRocketUserFromUserId(msg.senderId); - if (!sender) { - continue; - } + //make sure the receiver of the message is a valid rocket.chat user + const receiver = this.getRocketUserFromUserId(msg.receiverId); + if (!receiver) { + continue; + } - //make sure the receiver of the message is a valid rocket.chat user - const receiver = this.getRocketUserFromUserId(msg.receiverId); - if (!receiver) { - continue; - } + let room = RocketChat.models.Rooms.findOneById([receiver._id, sender._id].sort().join('')); + if (!room) { + Meteor.runAsUser(sender._id, () => { + const roomInfo = Meteor.call('createDirectMessage', receiver.username); + room = RocketChat.models.Rooms.findOneById(roomInfo.rid); + }); + } - let room = RocketChat.models.Rooms.findOneById([receiver._id, sender._id].sort().join('')); - if (!room) { Meteor.runAsUser(sender._id, () => { - const roomInfo = Meteor.call('createDirectMessage', receiver.username); - room = RocketChat.models.Rooms.findOneById(roomInfo.rid); + RocketChat.sendMessage(sender, { + _id: msg.id, + ts: msg.ts, + msg: msg.text, + rid: room._id, + u: { + _id: sender._id, + username: sender.username + } + }, room, true); }); } - - Meteor.runAsUser(sender._id, () => { - RocketChat.sendMessage(sender, { - _id: msg.id, - ts: msg.ts, - msg: msg.text, - rid: room._id, - u: { - _id: sender._id, - username: sender.username - } - }, room, true); - }); } } + + super.updateProgress(ProgressStep.FINISHING); + super.updateProgress(ProgressStep.DONE); + } catch (e) { + this.logger.error(e); + super.updateProgress(ProgressStep.ERROR); } - super.updateProgress(ProgressStep.FINISHING); - super.updateProgress(ProgressStep.DONE); const timeTook = Date.now() - started; this.logger.log(`HipChat Enterprise Import took ${ timeTook } milliseconds.`); }); diff --git a/packages/rocketchat-importer-hipchat/server/importer.js b/packages/rocketchat-importer-hipchat/server/importer.js index 072d720d0f44..6f2fcb57f1b3 100644 --- a/packages/rocketchat-importer-hipchat/server/importer.js +++ b/packages/rocketchat-importer-hipchat/server/importer.js @@ -41,7 +41,7 @@ export class HipChatImporter extends Base { if (entry.entryName.indexOf(this.roomPrefix) > -1) { let roomName = entry.entryName.split(this.roomPrefix)[1]; if (roomName === 'list.json') { - this.updateProgress(ProgressStep.PREPARING_CHANNELS); + super.updateProgress(ProgressStep.PREPARING_CHANNELS); const tempRooms = JSON.parse(entry.getData().toString()).rooms; tempRooms.forEach(room => { room.name = s.slugify(room.name); @@ -62,7 +62,7 @@ export class HipChatImporter extends Base { } else if (entry.entryName.indexOf(this.usersPrefix) > -1) { const usersName = entry.entryName.split(this.usersPrefix)[1]; if (usersName === 'list.json') { - this.updateProgress(ProgressStep.PREPARING_USERS); + super.updateProgress(ProgressStep.PREPARING_USERS); return tempUsers = JSON.parse(entry.getData().toString()).users; } else { return this.logger.warn(`Unexpected file in the ${ this.name } import: ${ entry.entryName }`); @@ -91,7 +91,7 @@ export class HipChatImporter extends Base { 'count.channels': tempRooms.length }); this.addCountToTotal(tempRooms.length); - this.updateProgress(ProgressStep.PREPARING_MESSAGES); + super.updateProgress(ProgressStep.PREPARING_MESSAGES); let messagesCount = 0; Object.keys(tempMessages).forEach(channel => { const messagesObj = tempMessages[channel]; @@ -132,7 +132,7 @@ export class HipChatImporter extends Base { this.addCountToTotal(messagesCount); if (tempUsers.length === 0 || tempRooms.length === 0 || messagesCount === 0) { this.logger.warn(`The loaded users count ${ tempUsers.length }, the loaded channels ${ tempRooms.length }, and the loaded messages ${ messagesCount }`); - this.updateProgress(ProgressStep.ERROR); + super.updateProgress(ProgressStep.ERROR); return this.getProgress(); } const selectionUsers = tempUsers.map(function(user) { @@ -142,13 +142,14 @@ export class HipChatImporter extends Base { return new SelectionChannel(room.room_id, room.name, room.is_archived, true, false); }); const selectionMessages = this.importRecord.count.messages; - this.updateProgress(ProgressStep.USER_SELECTION); + super.updateProgress(ProgressStep.USER_SELECTION); return new Selection(this.name, selectionUsers, selectionChannels, selectionMessages); } startImport(importSelection) { super.startImport(importSelection); const start = Date.now(); + importSelection.users.forEach(user => { this.users.users.forEach(u => { if (u.user_id === user.user_id) { @@ -157,156 +158,168 @@ export class HipChatImporter extends Base { }); }); this.collection.update({_id: this.users._id}, { $set: { 'users': this.users.users } }); + importSelection.channels.forEach(channel => this.channels.channels.forEach(c => c.room_id === channel.channel_id && (c.do_import = channel.do_import)) ); this.collection.update({ _id: this.channels._id }, { $set: { 'channels': this.channels.channels }}); + const startedByUserId = Meteor.userId(); Meteor.defer(() => { - this.updateProgress(ProgressStep.IMPORTING_USERS); - this.users.users.forEach(user => { - if (!user.do_import) { - return; - } - Meteor.runAsUser(startedByUserId, () => { - const existantUser = RocketChat.models.Users.findOneByEmailAddress(user.email); - if (existantUser) { - user.rocketId = existantUser._id; - this.userTags.push({ - hipchat: `@${ user.mention_name }`, - rocket: `@${ existantUser.username }` - }); - } else { - const userId = Accounts.createUser({ - email: user.email, - password: Date.now() + user.name + user.email.toUpperCase() - }); - user.rocketId = userId; - this.userTags.push({ - hipchat: `@${ user.mention_name }`, - rocket: `@${ user.mention_name }` - }); - Meteor.runAsUser(userId, () => { - Meteor.call('setUsername', user.mention_name, { - joinDefaultChannelsSilenced: true + super.updateProgress(ProgressStep.IMPORTING_USERS); + + try { + this.users.users.forEach(user => { + if (!user.do_import) { + return; + } + + Meteor.runAsUser(startedByUserId, () => { + const existantUser = RocketChat.models.Users.findOneByEmailAddress(user.email); + if (existantUser) { + user.rocketId = existantUser._id; + this.userTags.push({ + hipchat: `@${ user.mention_name }`, + rocket: `@${ existantUser.username }` }); - Meteor.call('setAvatarFromService', user.photo_url, undefined, 'url'); - return Meteor.call('userSetUtcOffset', parseInt(moment().tz(user.timezone).format('Z').toString().split(':')[0])); - }); - if (user.name != null) { - RocketChat.models.Users.setName(userId, user.name); - } - if (user.is_deleted) { - Meteor.call('setUserActiveStatus', userId, false); + } else { + const userId = Accounts.createUser({ + email: user.email, + password: Date.now() + user.name + user.email.toUpperCase() + }); + user.rocketId = userId; + this.userTags.push({ + hipchat: `@${ user.mention_name }`, + rocket: `@${ user.mention_name }` + }); + Meteor.runAsUser(userId, () => { + Meteor.call('setUsername', user.mention_name, { + joinDefaultChannelsSilenced: true + }); + Meteor.call('setAvatarFromService', user.photo_url, undefined, 'url'); + return Meteor.call('userSetUtcOffset', parseInt(moment().tz(user.timezone).format('Z').toString().split(':')[0])); + }); + if (user.name != null) { + RocketChat.models.Users.setName(userId, user.name); + } + if (user.is_deleted) { + Meteor.call('setUserActiveStatus', userId, false); + } } - } - return this.addCountCompleted(1); + return this.addCountCompleted(1); + }); }); - }); - this.collection.update({ _id: this.users._id }, { $set: { 'users': this.users.users }}); - this.updateProgress(ProgressStep.IMPORTING_CHANNELS); - this.channels.channels.forEach(channel => { - if (!channel.do_import) { - return; - } - Meteor.runAsUser(startedByUserId, () => { - channel.name = channel.name.replace(/ /g, ''); - const existantRoom = RocketChat.models.Rooms.findOneByName(channel.name); - if (existantRoom) { - channel.rocketId = existantRoom._id; - } else { - let userId = ''; - this.users.users.forEach(user => { - if (user.user_id === channel.owner_user_id) { - userId = user.rocketId; + + this.collection.update({ _id: this.users._id }, { $set: { 'users': this.users.users }}); + + super.updateProgress(ProgressStep.IMPORTING_CHANNELS); + this.channels.channels.forEach(channel => { + if (!channel.do_import) { + return; + } + Meteor.runAsUser(startedByUserId, () => { + channel.name = channel.name.replace(/ /g, ''); + const existantRoom = RocketChat.models.Rooms.findOneByName(channel.name); + if (existantRoom) { + channel.rocketId = existantRoom._id; + } else { + let userId = ''; + this.users.users.forEach(user => { + if (user.user_id === channel.owner_user_id) { + userId = user.rocketId; + } + }); + if (userId === '') { + this.logger.warn(`Failed to find the channel creator for ${ channel.name }, setting it to the current running user.`); + userId = startedByUserId; } - }); - if (userId === '') { - this.logger.warn(`Failed to find the channel creator for ${ channel.name }, setting it to the current running user.`); - userId = startedByUserId; + Meteor.runAsUser(userId, () => { + const returned = Meteor.call('createChannel', channel.name, []); + return channel.rocketId = returned.rid; + }); + RocketChat.models.Rooms.update({ + _id: channel.rocketId + }, { + $set: { + 'ts': new Date(channel.created * 1000) + } + }); } - Meteor.runAsUser(userId, () => { - const returned = Meteor.call('createChannel', channel.name, []); - return channel.rocketId = returned.rid; - }); - RocketChat.models.Rooms.update({ - _id: channel.rocketId - }, { - $set: { - 'ts': new Date(channel.created * 1000) - } - }); - } - return this.addCountCompleted(1); + return this.addCountCompleted(1); + }); }); - }); - this.collection.update({ - _id: this.channels._id - }, { - $set: { - 'channels': this.channels.channels - } - }); - this.updateProgress(ProgressStep.IMPORTING_MESSAGES); - const nousers = {}; - Object.keys(this.messages).forEach(channel => { - const messagesObj = this.messages[channel]; - Meteor.runAsUser(startedByUserId, () => { - const hipchatChannel = this.getHipChatChannelFromName(channel); - if (hipchatChannel != null ? hipchatChannel.do_import : undefined) { - const room = RocketChat.models.Rooms.findOneById(hipchatChannel.rocketId, { - fields: { - usernames: 1, - t: 1, - name: 1 - } - }); + this.collection.update({ _id: this.channels._id }, { $set: { 'channels': this.channels.channels }}); + + super.updateProgress(ProgressStep.IMPORTING_MESSAGES); + const nousers = {}; - Object.keys(messagesObj).forEach(date => { - const msgs = messagesObj[date]; - this.updateRecord({ - 'messagesstatus': `${ channel }/${ date }.${ msgs.messages.length }` + Object.keys(this.messages).forEach(channel => { + const messagesObj = this.messages[channel]; + Meteor.runAsUser(startedByUserId, () => { + const hipchatChannel = this.getHipChatChannelFromName(channel); + if (hipchatChannel != null ? hipchatChannel.do_import : undefined) { + const room = RocketChat.models.Rooms.findOneById(hipchatChannel.rocketId, { + fields: { + usernames: 1, + t: 1, + name: 1 + } }); - msgs.messages.forEach(message => { - if (message.from != null) { - const user = this.getRocketUser(message.from.user_id); - if (user != null) { - const msgObj = { - msg: this.convertHipChatMessageToRocketChat(message.message), - ts: new Date(message.date), - u: { - _id: user._id, - username: user.username - } - }; - RocketChat.sendMessage(user, msgObj, room, true); - } else if (!nousers[message.from.user_id]) { - nousers[message.from.user_id] = message.from; + Object.keys(messagesObj).forEach(date => { + const msgs = messagesObj[date]; + this.updateRecord({ + 'messagesstatus': `${ channel }/${ date }.${ msgs.messages.length }` + }); + + msgs.messages.forEach(message => { + if (message.from != null) { + const user = this.getRocketUser(message.from.user_id); + if (user != null) { + const msgObj = { + msg: this.convertHipChatMessageToRocketChat(message.message), + ts: new Date(message.date), + u: { + _id: user._id, + username: user.username + } + }; + RocketChat.sendMessage(user, msgObj, room, true); + } else if (!nousers[message.from.user_id]) { + nousers[message.from.user_id] = message.from; + } + } else if (!_.isArray(message)) { + console.warn('Please report the following:', message); } - } else if (!_.isArray(message)) { - console.warn('Please report the following:', message); - } - this.addCountCompleted(1); + this.addCountCompleted(1); + }); }); + } + }); + }); + + this.logger.warn('The following did not have users:', nousers); + super.updateProgress(ProgressStep.FINISHING); + + this.channels.channels.forEach(channel => { + if (channel.do_import && channel.is_archived) { + Meteor.runAsUser(startedByUserId, () => { + return Meteor.call('archiveRoom', channel.rocketId); }); } }); - }); - this.logger.warn('The following did not have users:', nousers); - this.updateProgress(ProgressStep.FINISHING); - this.channels.channels.forEach(channel => { - if (channel.do_import && channel.is_archived) { - Meteor.runAsUser(startedByUserId, () => { - return Meteor.call('archiveRoom', channel.rocketId); - }); - } - }); - this.updateProgress(ProgressStep.DONE); + + super.updateProgress(ProgressStep.DONE); + } catch (e) { + this.logger.error(e); + super.updateProgress(ProgressStep.ERROR); + } + const timeTook = Date.now() - start; return this.logger.log(`Import took ${ timeTook } milliseconds.`); }); + return this.getProgress(); } diff --git a/packages/rocketchat-importer-slack-users/server/importer.js b/packages/rocketchat-importer-slack-users/server/importer.js index c482a33716f5..0be7fbec801d 100644 --- a/packages/rocketchat-importer-slack-users/server/importer.js +++ b/packages/rocketchat-importer-slack-users/server/importer.js @@ -82,50 +82,57 @@ export class SlackUsersImporter extends Base { Meteor.defer(() => { super.updateProgress(ProgressStep.IMPORTING_USERS); - for (const u of this.users.users) { - if (!u.do_import) { - continue; - } - - Meteor.runAsUser(startedByUserId, () => { - const existantUser = RocketChat.models.Users.findOneByEmailAddress(u.email) || RocketChat.models.Users.findOneByUsername(u.username); - - let userId = existantUser._id; - if (existantUser) { - //since we have an existing user, let's try a few things - u.rocketId = existantUser._id; - RocketChat.models.Users.update({ _id: u.rocketId }, { $addToSet: { importIds: u.id } }); - - RocketChat.models.Users.setEmail(existantUser._id, u.email); - RocketChat.models.Users.setEmailVerified(existantUser._id, u.email); - } else { - userId = Accounts.createUser({ username: u.username + Random.id(), password: Date.now() + u.name + u.email.toUpperCase() }); + try { + for (const u of this.users.users) { + if (!u.do_import) { + continue; + } - if (!userId) { - console.warn('An error happened while creating a user.'); - return; + Meteor.runAsUser(startedByUserId, () => { + const existantUser = RocketChat.models.Users.findOneByEmailAddress(u.email) || RocketChat.models.Users.findOneByUsername(u.username); + + let userId; + if (existantUser) { + //since we have an existing user, let's try a few things + userId = existantUser._id; + u.rocketId = existantUser._id; + RocketChat.models.Users.update({ _id: u.rocketId }, { $addToSet: { importIds: u.id } }); + + RocketChat.models.Users.setEmail(existantUser._id, u.email); + RocketChat.models.Users.setEmailVerified(existantUser._id, u.email); + } else { + userId = Accounts.createUser({ username: u.username + Random.id(), password: Date.now() + u.name + u.email.toUpperCase() }); + + if (!userId) { + console.warn('An error happened while creating a user.'); + return; + } + + Meteor.runAsUser(userId, () => { + Meteor.call('setUsername', u.username, {joinDefaultChannelsSilenced: true}); + RocketChat.models.Users.setName(userId, u.name); + RocketChat.models.Users.update({ _id: userId }, { $addToSet: { importIds: u.id } }); + RocketChat.models.Users.setEmail(userId, u.email); + RocketChat.models.Users.setEmailVerified(userId, u.email); + u.rocketId = userId; + }); } - Meteor.runAsUser(userId, () => { - Meteor.call('setUsername', u.username, {joinDefaultChannelsSilenced: true}); - RocketChat.models.Users.setName(userId, u.name); - RocketChat.models.Users.update({ _id: userId }, { $addToSet: { importIds: u.id } }); - RocketChat.models.Users.setEmail(userId, u.email); - RocketChat.models.Users.setEmailVerified(userId, u.email); - u.rocketId = userId; - }); - } + if (this.admins.includes(u.user_id)) { + Meteor.call('setAdminStatus', userId, true); + } - if (this.admins.includes(u.user_id)) { - Meteor.call('setAdminStatus', userId, true); - } + super.addCountCompleted(1); + }); + } - super.addCountCompleted(1); - }); + super.updateProgress(ProgressStep.FINISHING); + super.updateProgress(ProgressStep.DONE); + } catch (e) { + this.logger.error(e); + super.updateProgress(ProgressStep.ERROR); } - super.updateProgress(ProgressStep.FINISHING); - super.updateProgress(ProgressStep.DONE); const timeTook = Date.now() - started; this.logger.log(`Slack Users Import took ${ timeTook } milliseconds.`); }); diff --git a/packages/rocketchat-importer-slack/server/importer.js b/packages/rocketchat-importer-slack/server/importer.js index ced00651a758..d5ff5d5dc404 100644 --- a/packages/rocketchat-importer-slack/server/importer.js +++ b/packages/rocketchat-importer-slack/server/importer.js @@ -32,13 +32,13 @@ export class SlackImporter extends Base { } if (entry.entryName === 'channels.json') { - this.updateProgress(ProgressStep.PREPARING_CHANNELS); + super.updateProgress(ProgressStep.PREPARING_CHANNELS); tempChannels = JSON.parse(entry.getData().toString()).filter(channel => channel.creator != null); return; } if (entry.entryName === 'users.json') { - this.updateProgress(ProgressStep.PREPARING_USERS); + super.updateProgress(ProgressStep.PREPARING_USERS); tempUsers = JSON.parse(entry.getData().toString()); tempUsers.forEach(user => { @@ -78,7 +78,7 @@ export class SlackImporter extends Base { this.addCountToTotal(tempChannels.length); // Insert the messages records - this.updateProgress(ProgressStep.PREPARING_MESSAGES); + super.updateProgress(ProgressStep.PREPARING_MESSAGES); let messagesCount = 0; Object.keys(tempMessages).forEach(channel => { @@ -109,14 +109,14 @@ export class SlackImporter extends Base { if ([tempUsers.length, tempChannels.length, messagesCount].some(e => e === 0)) { this.logger.warn(`The loaded users count ${ tempUsers.length }, the loaded channels ${ tempChannels.length }, and the loaded messages ${ messagesCount }`); console.log(`The loaded users count ${ tempUsers.length }, the loaded channels ${ tempChannels.length }, and the loaded messages ${ messagesCount }`); - this.updateProgress(ProgressStep.ERROR); + super.updateProgress(ProgressStep.ERROR); return this.getProgress(); } const selectionUsers = tempUsers.map(user => new SelectionUser(user.id, user.name, user.profile.email, user.deleted, user.is_bot, !user.is_bot)); const selectionChannels = tempChannels.map(channel => new SelectionChannel(channel.id, channel.name, channel.is_archived, true, false)); const selectionMessages = this.importRecord.count.messages; - this.updateProgress(ProgressStep.USER_SELECTION); + super.updateProgress(ProgressStep.USER_SELECTION); return new Selection(this.name, selectionUsers, selectionChannels, selectionMessages); } @@ -150,7 +150,7 @@ export class SlackImporter extends Base { const startedByUserId = Meteor.userId(); Meteor.defer(() => { try { - this.updateProgress(ProgressStep.IMPORTING_USERS); + super.updateProgress(ProgressStep.IMPORTING_USERS); this.users.users.forEach(user => { if (!user.do_import) { return; @@ -209,7 +209,7 @@ export class SlackImporter extends Base { }); this.collection.update({ _id: this.users._id }, { $set: { 'users': this.users.users }}); - this.updateProgress(ProgressStep.IMPORTING_CHANNELS); + super.updateProgress(ProgressStep.IMPORTING_CHANNELS); this.channels.channels.forEach(channel => { if (!channel.do_import) { return; @@ -265,7 +265,7 @@ export class SlackImporter extends Base { const missedTypes = {}; const ignoreTypes = { 'bot_add': true, 'file_comment': true, 'file_mention': true }; - this.updateProgress(ProgressStep.IMPORTING_MESSAGES); + super.updateProgress(ProgressStep.IMPORTING_MESSAGES); Object.keys(this.messages).forEach(channel => { const messagesObj = this.messages[channel]; @@ -431,7 +431,7 @@ export class SlackImporter extends Base { console.log('Missed import types:', missedTypes); } - this.updateProgress(ProgressStep.FINISHING); + super.updateProgress(ProgressStep.FINISHING); this.channels.channels.forEach(channel => { if (channel.do_import && channel.is_archived) { @@ -440,12 +440,12 @@ export class SlackImporter extends Base { }); } }); - this.updateProgress(ProgressStep.DONE); + super.updateProgress(ProgressStep.DONE); this.logger.log(`Import took ${ Date.now() - start } milliseconds.`); } catch (e) { this.logger.error(e); - this.updateProgress(ProgressStep.ERROR); + super.updateProgress(ProgressStep.ERROR); } }); From f01fd95f1b4aa0b2b34c3fd1e5fa3c73470dec57 Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento Date: Thu, 14 Dec 2017 19:16:29 -0200 Subject: [PATCH 18/70] Merge pull request #9136 from RocketChat/hotfix/9132 Fix: Confirmation modals showing `Send` button --- .../rocketchat-theme/client/imports/components/modal.css | 5 +++++ packages/rocketchat-ui/client/views/app/modal.html | 4 ++-- packages/rocketchat-ui/client/views/app/modal.js | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/rocketchat-theme/client/imports/components/modal.css b/packages/rocketchat-theme/client/imports/components/modal.css index 6f6a8701883a..c143558f278e 100644 --- a/packages/rocketchat-theme/client/imports/components/modal.css +++ b/packages/rocketchat-theme/client/imports/components/modal.css @@ -116,6 +116,11 @@ & > .rc-button { margin: 0; } + + &--empty { + padding: 0; + background: transparent; + } } } diff --git a/packages/rocketchat-ui/client/views/app/modal.html b/packages/rocketchat-ui/client/views/app/modal.html index 8c6b18a2e331..98ba88a958cd 100644 --- a/packages/rocketchat-ui/client/views/app/modal.html +++ b/packages/rocketchat-ui/client/views/app/modal.html @@ -38,9 +38,9 @@

{{title}}

{{/if}} - diff --git a/packages/rocketchat-ui/client/views/app/modal.js b/packages/rocketchat-ui/client/views/app/modal.js index 45871b51fd06..ae56c5669f8f 100644 --- a/packages/rocketchat-ui/client/views/app/modal.js +++ b/packages/rocketchat-ui/client/views/app/modal.js @@ -5,6 +5,8 @@ this.modal = { open(config = {}, fn) { config.confirmButtonText = config.confirmButtonText || t('Send'); config.cancelButtonText = config.cancelButtonText || t('Cancel'); + config.showConfirmButton = config.showConfirmButton == null ? true : config.showConfirmButton; + config.showFooter = config.showConfirmButton === true || config.showCancelButton === true; if (config.type === 'input') { config.input = true; From 44164a8507b83c15c1eb594de0389421dc089cd4 Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento Date: Thu, 14 Dec 2017 22:35:15 -0200 Subject: [PATCH 19/70] Merge pull request #9138 from RocketChat/hotfix/9129 Fix: Message action quick buttons drops if "new message" divider is being shown --- .../client/imports/components/messages.css | 4 ---- packages/rocketchat-theme/client/imports/general/base.css | 8 ++++++-- .../rocketchat-theme/client/imports/general/base_old.css | 5 +++++ 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/rocketchat-theme/client/imports/components/messages.css b/packages/rocketchat-theme/client/imports/components/messages.css index 0d22af91ec84..ae6de78a3344 100644 --- a/packages/rocketchat-theme/client/imports/components/messages.css +++ b/packages/rocketchat-theme/client/imports/components/messages.css @@ -79,10 +79,6 @@ padding: 0; } -.first-unread .message-actions { - top: 18px; -} - .rtl .message-actions { right: auto; left: 2px; diff --git a/packages/rocketchat-theme/client/imports/general/base.css b/packages/rocketchat-theme/client/imports/general/base.css index c0d5e79e69b9..ebd956399f48 100644 --- a/packages/rocketchat-theme/client/imports/general/base.css +++ b/packages/rocketchat-theme/client/imports/general/base.css @@ -121,7 +121,7 @@ button { &::before { position: absolute; z-index: 1; - top: 0; + top: -10px; left: 0; width: 100%; @@ -130,12 +130,14 @@ button { content: ""; background: var(--rc-color-error); + + pointer-events: none; } &::after { position: absolute; z-index: 2; - top: -10px; + top: -20px; right: 0; padding: 0 1rem; @@ -148,6 +150,8 @@ button { background: #ffffff; font-size: 10px; + + pointer-events: none; } } diff --git a/packages/rocketchat-theme/client/imports/general/base_old.css b/packages/rocketchat-theme/client/imports/general/base_old.css index a04728e8e675..6df5716839b3 100644 --- a/packages/rocketchat-theme/client/imports/general/base_old.css +++ b/packages/rocketchat-theme/client/imports/general/base_old.css @@ -3093,6 +3093,11 @@ &:hover .edited { display: none; } + + } + + &.first-unread { + margin-top: 20px; } &.system .body { From ab93661e6c967d6aebbea82bc9cf300e703f4bd6 Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento Date: Thu, 14 Dec 2017 23:09:28 -0200 Subject: [PATCH 20/70] Merge pull request #9137 from RocketChat/hotfix/9130 Fix: Clear all unreads modal not closing after confirming --- .../rocketchat-ui/client/views/app/modal.js | 34 ++++++++++++------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/packages/rocketchat-ui/client/views/app/modal.js b/packages/rocketchat-ui/client/views/app/modal.js index ae56c5669f8f..80541d890a88 100644 --- a/packages/rocketchat-ui/client/views/app/modal.js +++ b/packages/rocketchat-ui/client/views/app/modal.js @@ -5,6 +5,7 @@ this.modal = { open(config = {}, fn) { config.confirmButtonText = config.confirmButtonText || t('Send'); config.cancelButtonText = config.cancelButtonText || t('Cancel'); + config.closeOnConfirm = config.closeOnConfirm == null ? true : config.closeOnConfirm; config.showConfirmButton = config.showConfirmButton == null ? true : config.showConfirmButton; config.showFooter = config.showConfirmButton === true || config.showCancelButton === true; @@ -48,6 +49,18 @@ this.modal = { const errorEl = document.querySelector('.rc-modal__content-error'); errorEl.innerHTML = text; errorEl.style.display = 'block'; + }, + onKeydown(e) { + e.preventDefault(); + e.stopPropagation(); + + if (e.key === 'Enter') { + modal.confirm(true); + } + + if (e.key === 'Escape') { + modal.close(); + } } }; @@ -65,29 +78,25 @@ Template.rc_modal.onRendered(function() { this.data.onRendered(); } - document.addEventListener('keydown', function(e) { - e.preventDefault(); - e.stopPropagation(); - - if (e.key === 'Enter') { - modal.confirm(true); - } + document.addEventListener('keydown', modal.onKeydown); +}); - if (e.key === 'Escape') { - modal.close(); - } - }, {once: true}); +Template.rc_modal.onDestroyed(function() { + document.removeEventListener('keydown', modal.onKeydown); }); Template.rc_modal.events({ 'click .js-action'(e, instance) { !this.action || this.action.call(instance.data.data, e, instance); + e.stopPropagation(); modal.close(); }, - 'click .js-close'() { + 'click .js-close'(e) { + e.stopPropagation(); modal.close(); }, 'click .js-confirm'(e, instance) { + e.stopPropagation(); if (instance.data.input) { return modal.confirm($('.js-modal-input').val()); } @@ -100,6 +109,7 @@ Template.rc_modal.events({ } if (e.currentTarget === e.target) { + e.stopPropagation(); modal.close(); } } From 27c80f77976dfdc31bfe54bc6a9c452d832cfa3b Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento Date: Thu, 14 Dec 2017 23:10:36 -0200 Subject: [PATCH 21/70] Bump version to 0.60.0-rc.2 --- .docker/Dockerfile | 2 +- .sandstorm/sandstorm-pkgdef.capnp | 2 +- .travis/snap.sh | 2 +- HISTORY.md | 22 ++++++++++++++++++++++ package.json | 2 +- packages/rocketchat-lib/rocketchat.info | 2 +- 6 files changed, 27 insertions(+), 5 deletions(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index d08d0d33e30e..88b96765360a 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,6 +1,6 @@ FROM rocketchat/base:8 -ENV RC_VERSION 0.60.0-rc.1 +ENV RC_VERSION 0.60.0-rc.2 MAINTAINER buildmaster@rocket.chat diff --git a/.sandstorm/sandstorm-pkgdef.capnp b/.sandstorm/sandstorm-pkgdef.capnp index d360080543b1..d6ee7c1a5630 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.60.0-rc.1"), + appMarketingVersion = (defaultText = "0.60.0-rc.2"), # Human-readable representation of appVersion. Should match the way you # identify versions of your app in documentation and marketing. diff --git a/.travis/snap.sh b/.travis/snap.sh index 63eb75f4e96f..58c8b7e737ff 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.60.0-rc.1 + RC_VERSION=0.60.0-rc.2 fi echo "Preparing to trigger a snap release for $CHANNEL channel" diff --git a/HISTORY.md b/HISTORY.md index 8b7db9bd3c22..7e915b204cfe 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,25 @@ + +# 0.60.0-rc.2 (2017-12-15) + + +### Bug Fixes + +- [#9091](https://github.com/RocketChat/Rocket.Chat/pull/9091) Channel page error +- [#9121](https://github.com/RocketChat/Rocket.Chat/pull/9121) Do not block room while loading history +- [#9134](https://github.com/RocketChat/Rocket.Chat/pull/9134) Importers not recovering when an error occurs + + +
+Others + +- [#9137](https://github.com/RocketChat/Rocket.Chat/pull/9137) Fix: Clear all unreads modal not closing after confirming +- [#9136](https://github.com/RocketChat/Rocket.Chat/pull/9136) Fix: Confirmation modals showing `Send` button +- [#9138](https://github.com/RocketChat/Rocket.Chat/pull/9138) Fix: Message action quick buttons drops if "new message" divider is being shown +- [#9120](https://github.com/RocketChat/Rocket.Chat/pull/9120) Fix: Multiple unread indicators +
+ + + # 0.60.0-rc.1 (2017-12-13) diff --git a/package.json b/package.json index 819bc4e19719..2d7c1aa43016 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "Rocket.Chat", "description": "The Ultimate Open Source WebChat Platform", - "version": "0.60.0-rc.1", + "version": "0.60.0-rc.2", "author": { "name": "Rocket.Chat", "url": "https://rocket.chat/" diff --git a/packages/rocketchat-lib/rocketchat.info b/packages/rocketchat-lib/rocketchat.info index 347517cd3946..a4946222e170 100644 --- a/packages/rocketchat-lib/rocketchat.info +++ b/packages/rocketchat-lib/rocketchat.info @@ -1,3 +1,3 @@ { - "version": "0.60.0-rc.1" + "version": "0.60.0-rc.2" } From cf7a254aafbd84c14085fc29977adc2d682d197f Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Fri, 15 Dec 2017 10:49:35 -0200 Subject: [PATCH 22/70] Merge pull request #9062 from peterlee0127/develop [FIX] Update Rocket.Chat for sandstorm --- .meteor/packages | 2 +- .sandstorm/build.sh | 4 ++-- .sandstorm/sandstorm-pkgdef.capnp | 1 + .sandstorm/setup.sh | 4 ++-- packages/rocketchat-sandstorm/server/lib.js | 4 ++-- packages/rocketchat-sandstorm/server/powerbox.js | 6 +++--- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.meteor/packages b/.meteor/packages index 7649bcdc53a8..9d9eacbc0559 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -160,7 +160,7 @@ jparker:gravatar kadira:blaze-layout kadira:flow-router keepnox:perfect-scrollbar -#kenton:accounts-sandstorm +kenton:accounts-sandstorm mizzao:autocomplete mizzao:timesync mrt:reactive-store diff --git a/.sandstorm/build.sh b/.sandstorm/build.sh index e1e398869646..976f897db276 100755 --- a/.sandstorm/build.sh +++ b/.sandstorm/build.sh @@ -3,12 +3,12 @@ set -x set -euvo pipefail # Make meteor bundle -export NODE_ENV=production sudo chown vagrant:vagrant /home/vagrant -R cd /opt/app -meteor npm install --production +meteor npm install meteor build --directory /home/vagrant/ +export NODE_ENV=production # Use npm and node from the Meteor dev bundle to install the bundle's dependencies. TOOL_VERSION=$(meteor show --ejson $(<.meteor/release) | grep '^ *"tool":' | sed -re 's/^.*"(meteor-tool@[^"]*)".*$/\1/g') diff --git a/.sandstorm/sandstorm-pkgdef.capnp b/.sandstorm/sandstorm-pkgdef.capnp index d6ee7c1a5630..61f31ff0650a 100644 --- a/.sandstorm/sandstorm-pkgdef.capnp +++ b/.sandstorm/sandstorm-pkgdef.capnp @@ -106,6 +106,7 @@ const myCommand :Spk.Manifest.Command = ( # Note that this defines the *entire* environment seen by your app. (key = "PATH", value = "/usr/local/bin:/usr/bin:/bin"), (key = "SANDSTORM", value = "1"), + (key = "HOME", value = "/var"), (key = "Statistics_reporting", value = "false"), (key = "Accounts_AllowUserAvatarChange", value = "false"), (key = "Accounts_AllowUserProfileChange", value = "false"), diff --git a/.sandstorm/setup.sh b/.sandstorm/setup.sh index d410dda6cb1e..bc30455ed282 100755 --- a/.sandstorm/setup.sh +++ b/.sandstorm/setup.sh @@ -8,7 +8,7 @@ apt-get install build-essential git -y cd /opt/ NODE_ENV=production -PACKAGE=meteor-spk-0.3.1 +PACKAGE=meteor-spk-0.4.0 PACKAGE_FILENAME="$PACKAGE.tar.xz" CACHE_TARGET="/host-dot-sandstorm/caches/${PACKAGE_FILENAME}" @@ -32,7 +32,7 @@ cp -a /lib/x86_64-linux-gnu/libtinfo.so.* /opt/meteor-spk/meteor-spk.deps/lib/x8 # Unfortunately, Meteor does not explicitly make it easy to cache packages, but # we know experimentally that the package is mostly directly extractable to a # user's $HOME/.meteor directory. -METEOR_RELEASE=1.4.2 +METEOR_RELEASE=1.6.0.1 METEOR_PLATFORM=os.linux.x86_64 METEOR_TARBALL_FILENAME="meteor-bootstrap-${METEOR_PLATFORM}.tar.gz" METEOR_TARBALL_URL="https://d3sqy0vbqsdhku.cloudfront.net/packages-bootstrap/${METEOR_RELEASE}/${METEOR_TARBALL_FILENAME}" diff --git a/packages/rocketchat-sandstorm/server/lib.js b/packages/rocketchat-sandstorm/server/lib.js index 325e90ea629e..fe002e07756f 100644 --- a/packages/rocketchat-sandstorm/server/lib.js +++ b/packages/rocketchat-sandstorm/server/lib.js @@ -5,8 +5,8 @@ RocketChat.Sandstorm = {}; if (process.env.SANDSTORM === '1') { const Future = Npm.require('fibers/future'); - const Capnp = Npm.require('capnp'); - const SandstormHttpBridge = Npm.require('sandstorm/sandstorm-http-bridge.capnp').SandstormHttpBridge; + const Capnp = Npm.require('/node_modules/capnp.js'); + const SandstormHttpBridge = Capnp.importSystem('sandstorm/sandstorm-http-bridge.capnp').SandstormHttpBridge; let capnpConnection = null; let httpBridge = null; diff --git a/packages/rocketchat-sandstorm/server/powerbox.js b/packages/rocketchat-sandstorm/server/powerbox.js index 87e8cb86f9a6..c1f2d28b0590 100644 --- a/packages/rocketchat-sandstorm/server/powerbox.js +++ b/packages/rocketchat-sandstorm/server/powerbox.js @@ -3,9 +3,9 @@ RocketChat.Sandstorm.offerUiView = function() {}; if (process.env.SANDSTORM === '1') { - const Capnp = Npm.require('capnp'); - const Powerbox = Npm.require('sandstorm/powerbox.capnp'); - const Grain = Npm.require('sandstorm/grain.capnp'); + const Capnp = Npm.require('/node_modules/capnp.js'); + const Powerbox = Capnp.importSystem('sandstorm/powerbox.capnp'); + const Grain = Capnp.importSystem('sandstorm/grain.capnp'); RocketChat.Sandstorm.offerUiView = function(token, serializedDescriptor, sessionId) { const httpBridge = getHttpBridge(); From 76737a353aec0120813781a1eb0ae0b40bb2a278 Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento Date: Fri, 15 Dec 2017 10:47:04 -0200 Subject: [PATCH 23/70] Merge pull request #9144 from RocketChat/fix-send-to-bottom-issue Fix: Messages being displayed in reverse order --- packages/rocketchat-ui/client/views/app/room.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/rocketchat-ui/client/views/app/room.js b/packages/rocketchat-ui/client/views/app/room.js index 46245ee405a6..9ad1f0449388 100644 --- a/packages/rocketchat-ui/client/views/app/room.js +++ b/packages/rocketchat-ui/client/views/app/room.js @@ -815,6 +815,8 @@ Template.room.onCreated(function() { ChatMessage.update({ rid: this.data._id, 'u._id': role.u._id }, { $pull: { roles: role._id } }, { multi: true }); } }); + + this.sendToBottomIfNecessary = () => {}; }); // Update message to re-render DOM Template.room.onDestroyed(function() { From 54aab29fc212a0bf71f9f9f7a0d7fb5b959bbe8d Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Fri, 15 Dec 2017 10:53:44 -0200 Subject: [PATCH 24/70] Bump version to 0.60.0-rc.3 --- .docker/Dockerfile | 2 +- .sandstorm/sandstorm-pkgdef.capnp | 2 +- .travis/snap.sh | 2 +- HISTORY.md | 17 +++++++++++++++++ package.json | 2 +- packages/rocketchat-lib/rocketchat.info | 2 +- 6 files changed, 22 insertions(+), 5 deletions(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 88b96765360a..a95f28b89911 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,6 +1,6 @@ FROM rocketchat/base:8 -ENV RC_VERSION 0.60.0-rc.2 +ENV RC_VERSION 0.60.0-rc.3 MAINTAINER buildmaster@rocket.chat diff --git a/.sandstorm/sandstorm-pkgdef.capnp b/.sandstorm/sandstorm-pkgdef.capnp index 61f31ff0650a..ed7170b081e8 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.60.0-rc.2"), + appMarketingVersion = (defaultText = "0.60.0-rc.3"), # Human-readable representation of appVersion. Should match the way you # identify versions of your app in documentation and marketing. diff --git a/.travis/snap.sh b/.travis/snap.sh index 58c8b7e737ff..725d2eed8641 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.60.0-rc.2 + RC_VERSION=0.60.0-rc.3 fi echo "Preparing to trigger a snap release for $CHANNEL channel" diff --git a/HISTORY.md b/HISTORY.md index 7e915b204cfe..636243b6afda 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,20 @@ + +# 0.60.0-rc.3 (2017-12-15) + + +### Bug Fixes + +- [#9062](https://github.com/RocketChat/Rocket.Chat/pull/9062) Update Rocket.Chat for sandstorm + + +
+Others + +- [#9144](https://github.com/RocketChat/Rocket.Chat/pull/9144) Fix: Messages being displayed in reverse order +
+ + + # 0.60.0-rc.2 (2017-12-15) diff --git a/package.json b/package.json index 2d7c1aa43016..323b96769670 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "Rocket.Chat", "description": "The Ultimate Open Source WebChat Platform", - "version": "0.60.0-rc.2", + "version": "0.60.0-rc.3", "author": { "name": "Rocket.Chat", "url": "https://rocket.chat/" diff --git a/packages/rocketchat-lib/rocketchat.info b/packages/rocketchat-lib/rocketchat.info index a4946222e170..53f461808e98 100644 --- a/packages/rocketchat-lib/rocketchat.info +++ b/packages/rocketchat-lib/rocketchat.info @@ -1,3 +1,3 @@ { - "version": "0.60.0-rc.2" + "version": "0.60.0-rc.3" } From 55504c46fe8d3cc93fdbf49d18e68df916d60e26 Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento Date: Fri, 15 Dec 2017 14:21:04 -0200 Subject: [PATCH 25/70] Merge pull request #9146 from RocketChat/fix-test-without-oplog Fix test without oplog by waiting a successful login on changing users --- .meteor/versions | 1 + tests/chimp-config.js | 2 +- tests/data/checks.js | 4 ++-- tests/pageobjects/login.page.js | 7 +++++++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.meteor/versions b/.meteor/versions index 56325d854e47..e05002989288 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -64,6 +64,7 @@ jquery@1.11.10 kadira:blaze-layout@2.3.0 kadira:flow-router@2.12.1 keepnox:perfect-scrollbar@0.6.8 +kenton:accounts-sandstorm@0.7.0 konecty:change-case@2.3.0 konecty:delayed-task@1.0.0 konecty:mongo-counter@0.0.5_3 diff --git a/tests/chimp-config.js b/tests/chimp-config.js index 5e01594a635f..d03dcfc8273a 100644 --- a/tests/chimp-config.js +++ b/tests/chimp-config.js @@ -27,7 +27,7 @@ module.exports = { // chai: false, screenshotsOnError: true, screenshotsPath: '.screenshots', - captureAllStepScreenshots: true, + captureAllStepScreenshots: false, saveScreenshotsToDisk: true, // // Note: With a large viewport size and captureAllStepScreenshots enabled, // // you may run out of memory. Use browser.setViewportSize to make the diff --git a/tests/data/checks.js b/tests/data/checks.js index 0122d9948338..b187bc273880 100644 --- a/tests/data/checks.js +++ b/tests/data/checks.js @@ -44,7 +44,7 @@ export function checkIfUserIsValid(username, email, password) { sideNav.logout.click(); loginPage.open(); - loginPage.login({email, password}); + loginPage.loginSucceded({email, password}); mainContent.mainContent.waitForExist(5000); } else { console.log(' User already logged'); @@ -77,7 +77,7 @@ export function checkIfUserIsAdmin(username, email, password) { sideNav.logout.click(); loginPage.open(); - loginPage.login({email, password}); + loginPage.loginSucceded({email, password}); } else { console.log(' User already logged'); } diff --git a/tests/pageobjects/login.page.js b/tests/pageobjects/login.page.js index e0150d40a15a..318970150b14 100644 --- a/tests/pageobjects/login.page.js +++ b/tests/pageobjects/login.page.js @@ -1,4 +1,5 @@ import Page from './Page'; +import mainContent from './main-content.page'; class LoginPage extends Page { get registerButton() { return browser.element('button.register'); } @@ -66,6 +67,12 @@ class LoginPage extends Page { this.submit(); } + loginSucceded({email, password}) { + this.login({email, password}); + + mainContent.mainContent.waitForVisible(5000); + } + submit() { this.submitButton.waitForVisible(5000); this.submitButton.click(); From 5d712f39996df086330d0f7a8a4af47488a476cc Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento Date: Fri, 15 Dec 2017 16:17:47 -0200 Subject: [PATCH 26/70] Merge pull request #9149 from RocketChat/hotfix/unread-line Fix: Unread line --- .../client/imports/general/base.css | 13 ++++--- .../client/imports/general/base_old.css | 12 +++---- .../rocketchat-ui/client/views/app/modal.js | 11 +++--- .../rocketchat-ui/client/views/app/room.js | 36 ++++++++++++------- 4 files changed, 43 insertions(+), 29 deletions(-) diff --git a/packages/rocketchat-theme/client/imports/general/base.css b/packages/rocketchat-theme/client/imports/general/base.css index ebd956399f48..dd10edadfd98 100644 --- a/packages/rocketchat-theme/client/imports/general/base.css +++ b/packages/rocketchat-theme/client/imports/general/base.css @@ -121,7 +121,7 @@ button { &::before { position: absolute; z-index: 1; - top: -10px; + top: 0; left: 0; width: 100%; @@ -137,14 +137,15 @@ button { &::after { position: absolute; z-index: 2; - top: -20px; + top: -6px; right: 0; - padding: 0 1rem; + padding: 0 5px; + padding-bottom: 2px; content: attr(data-unread-text); text-align: right; - text-transform: uppercase; + text-transform: lowercase; color: var(--rc-color-error); background: #ffffff; @@ -152,6 +153,8 @@ button { font-size: 10px; pointer-events: none; + line-height: 10px; + border-radius: 2px; } } @@ -166,7 +169,7 @@ button { } &::after { - top: -30px; + top: -26px; } } } diff --git a/packages/rocketchat-theme/client/imports/general/base_old.css b/packages/rocketchat-theme/client/imports/general/base_old.css index 6df5716839b3..2096547c30da 100644 --- a/packages/rocketchat-theme/client/imports/general/base_old.css +++ b/packages/rocketchat-theme/client/imports/general/base_old.css @@ -2145,7 +2145,7 @@ .rc-old .container-bars { position: absolute; - z-index: 1; + z-index: 2; top: 4px; /* --header-height */ right: 10px; left: 10px; @@ -2879,7 +2879,7 @@ } &.new-day { - margin-top: 60px; + margin-top: 40px; &::before { position: absolute; @@ -2897,6 +2897,8 @@ font-size: 12px; font-weight: 600; + + pointer-events: none; } &::after { @@ -2911,6 +2913,8 @@ content: " "; border-width: 1px 0 0; + + pointer-events: none; } } @@ -3096,10 +3100,6 @@ } - &.first-unread { - margin-top: 20px; - } - &.system .body { font-style: italic; diff --git a/packages/rocketchat-ui/client/views/app/modal.js b/packages/rocketchat-ui/client/views/app/modal.js index 80541d890a88..d84d499fa10e 100644 --- a/packages/rocketchat-ui/client/views/app/modal.js +++ b/packages/rocketchat-ui/client/views/app/modal.js @@ -51,14 +51,15 @@ this.modal = { errorEl.style.display = 'block'; }, onKeydown(e) { - e.preventDefault(); - e.stopPropagation(); - if (e.key === 'Enter') { + e.preventDefault(); + e.stopPropagation(); + modal.confirm(true); - } + } else if (e.key === 'Escape') { + e.preventDefault(); + e.stopPropagation(); - if (e.key === 'Escape') { modal.close(); } } diff --git a/packages/rocketchat-ui/client/views/app/room.js b/packages/rocketchat-ui/client/views/app/room.js index 9ad1f0449388..197a6bc9cb33 100644 --- a/packages/rocketchat-ui/client/views/app/room.js +++ b/packages/rocketchat-ui/client/views/app/room.js @@ -917,26 +917,36 @@ Template.room.onRendered(function() { const rtl = $('html').hasClass('rtl'); - const updateUnreadCount = _.throttle(function() { - let lastInvisibleMessageOnScreen; + const getElementFromPoint = function(topOffset = 0) { const messageBoxOffset = messageBox.offset(); + let element; if (rtl) { - lastInvisibleMessageOnScreen = document.elementFromPoint((messageBoxOffset.left + messageBox.width()) - 1, messageBoxOffset.top + 1); + element = document.elementFromPoint((messageBoxOffset.left + messageBox.width()) - 1, messageBoxOffset.top + topOffset + 1); } else { - lastInvisibleMessageOnScreen = document.elementFromPoint(messageBoxOffset.left + 1, messageBoxOffset.top + 1); + element = document.elementFromPoint(messageBoxOffset.left + 1, messageBoxOffset.top + topOffset + 1); } - if ((lastInvisibleMessageOnScreen != null ? lastInvisibleMessageOnScreen.id : undefined) != null) { - const lastMessage = ChatMessage.findOne(lastInvisibleMessageOnScreen.id); - if (lastMessage != null) { - const subscription = ChatSubscription.findOne({ rid: template.data._id }); - const count = ChatMessage.find({ rid: template.data._id, ts: { $lte: lastMessage.ts, $gt: (subscription != null ? subscription.ls : undefined) } }).count(); - template.unreadCount.set(count); - } else { - template.unreadCount.set(0); - } + if (element && element.classList.contains('message')) { + return element; } + }; + + const updateUnreadCount = _.throttle(function() { + const lastInvisibleMessageOnScreen = getElementFromPoint(0) || getElementFromPoint(20) || getElementFromPoint(40); + + if (lastInvisibleMessageOnScreen == null || lastInvisibleMessageOnScreen.id == null) { + return template.unreadCount.set(0); + } + + const lastMessage = ChatMessage.findOne(lastInvisibleMessageOnScreen.id); + if (lastMessage == null) { + return template.unreadCount.set(0); + } + + const subscription = ChatSubscription.findOne({ rid: template.data._id }, {reactive: false}); + const count = ChatMessage.find({ rid: template.data._id, ts: { $lte: lastMessage.ts, $gt: subscription && subscription.ls } }).count(); + template.unreadCount.set(count); }, 300); readMessage.onRead(function(rid) { From eaebbb3ed46f66e2e9570821434faaedc90b1301 Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento Date: Mon, 18 Dec 2017 14:22:36 -0200 Subject: [PATCH 27/70] Merge pull request #9162 from RocketChat/hotfix/ldap-rest-login MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix: Can’t login using LDAP via REST --- packages/rocketchat-api/server/api.js | 11 +++++++++- .../rocketchat-livechat/app/package-lock.json | 22 +++++++++---------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/packages/rocketchat-api/server/api.js b/packages/rocketchat-api/server/api.js index 834f66db8331..3f81a157f317 100644 --- a/packages/rocketchat-api/server/api.js +++ b/packages/rocketchat-api/server/api.js @@ -161,6 +161,15 @@ class API extends Restivus { const loginCompatibility = (bodyParams) => { // Grab the username or email that the user is logging in with const {user, username, email, password, code} = bodyParams; + + if (password == null) { + return bodyParams; + } + + if (_.without(Object.keys(bodyParams), 'user', 'username', 'email', 'password', 'code').length > 0) { + return bodyParams; + } + const auth = { password }; @@ -177,7 +186,7 @@ class API extends Restivus { return bodyParams; } - if (auth.password && auth.password.hashed) { + if (auth.password.hashed) { auth.password = { digest: auth.password, algorithm: 'sha-256' diff --git a/packages/rocketchat-livechat/app/package-lock.json b/packages/rocketchat-livechat/app/package-lock.json index ca28ccbd474c..27af81ff05de 100644 --- a/packages/rocketchat-livechat/app/package-lock.json +++ b/packages/rocketchat-livechat/app/package-lock.json @@ -86,7 +86,7 @@ "bcrypt": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-1.0.3.tgz", - "integrity": "sha1-sC3cbAtS6ha40883XVoy54DatUg=", + "integrity": "sha512-pRyDdo73C8Nim3jwFJ7DWe3TZCgwDfWZ6nHS5LSdU77kWbj1frruvdndP02AOavtD4y8v6Fp2dolbHgp4SDrfg==", "requires": { "nan": "2.6.2", "node-pre-gyp": "0.6.36" @@ -314,7 +314,7 @@ "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "requires": { "fs.realpath": "1.0.0", "inflight": "1.0.6", @@ -469,7 +469,7 @@ "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "requires": { "brace-expansion": "1.1.8" } @@ -530,7 +530,7 @@ "npmlog": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha1-CKfyqL9zRgR3mp76StXMcXq7lUs=", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "requires": { "are-we-there-yet": "1.1.4", "console-control-strings": "1.1.0", @@ -626,7 +626,7 @@ "readable-stream": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha1-No8lEtefnUb9/HE0mueHi7weuVw=", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", "requires": { "core-util-is": "1.0.2", "inherits": "2.0.3", @@ -640,7 +640,7 @@ "regenerator-runtime": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz", - "integrity": "sha1-flT+W1zNXWYk6mJVw0c74JC4AuE=" + "integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A==" }, "request": { "version": "2.83.0", @@ -682,12 +682,12 @@ "safe-buffer": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha1-iTMSr2myEj3vcfV4iQAWce6yyFM=" + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" }, "semver": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha1-4FnAnYVx8FQII3M0M1BdOi8AsY4=" + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" }, "set-blocking": { "version": "2.0.0", @@ -738,7 +738,7 @@ }, "string_decoder": { "version": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", "requires": { "safe-buffer": "5.1.1" } @@ -840,7 +840,7 @@ "uuid": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", - "integrity": "sha1-PdPT55Crwk17DToDT/q6vijrvAQ=" + "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" }, "verror": { "version": "1.10.0", @@ -855,7 +855,7 @@ "wide-align": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", - "integrity": "sha1-Vx4PGwYEY268DfwhsDObvjE0FxA=", + "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", "requires": { "string-width": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz" } From a63ea215a0fc236b03716aaac394a71557a465d3 Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento Date: Mon, 18 Dec 2017 16:16:22 -0200 Subject: [PATCH 28/70] Merge pull request #9165 from RocketChat/hotfix/9147 Fix: Click on channel name - hover area bigger than link area --- .../client/imports/components/sidebar/sidebar-item.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/rocketchat-theme/client/imports/components/sidebar/sidebar-item.css b/packages/rocketchat-theme/client/imports/components/sidebar/sidebar-item.css index cf88ae264c92..6603731e772b 100644 --- a/packages/rocketchat-theme/client/imports/components/sidebar/sidebar-item.css +++ b/packages/rocketchat-theme/client/imports/components/sidebar/sidebar-item.css @@ -71,7 +71,8 @@ border-radius: var(--sidebar-item-radius); background-color: var(--sidebar-item-background); - align-items: center; + + align-items: stretch; &:hover { background-color: var(--sidebar-item-hover-background); From 71a4fa8d5395c4c57239234b04a21c5cbbbb83f0 Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento Date: Mon, 18 Dec 2017 16:14:30 -0200 Subject: [PATCH 29/70] Merge pull request #9166 from RocketChat/hotfix/9151 Fix: UI: Descenders of glyphs are cut off --- .../client/imports/components/sidebar/sidebar-item.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/rocketchat-theme/client/imports/components/sidebar/sidebar-item.css b/packages/rocketchat-theme/client/imports/components/sidebar/sidebar-item.css index 6603731e772b..abf6411650b0 100644 --- a/packages/rocketchat-theme/client/imports/components/sidebar/sidebar-item.css +++ b/packages/rocketchat-theme/client/imports/components/sidebar/sidebar-item.css @@ -46,7 +46,7 @@ } &-bottom { - margin-top: 6px; + margin-top: 4px; } } } @@ -218,7 +218,7 @@ text-overflow: ellipsis; font-size: 12px; - line-height: 12px; + line-height: 14px; & > p, & code, & pre { display: inline; From e48c18b39f274119d1700acbccf8591007f705ae Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento Date: Mon, 18 Dec 2017 16:14:00 -0200 Subject: [PATCH 30/70] Merge pull request #9169 from RocketChat/hotfix/save-message-not-clearing [FIX] Last sent message reoccurs in textbox --- .../.npm/package/npm-shrinkwrap.json | 149 ++++++-- .../.npm/package/npm-shrinkwrap.json | 341 ++++++++---------- packages/rocketchat-lib/package.js | 2 +- .../rocketchat-ui/client/lib/chatMessages.js | 3 + 4 files changed, 262 insertions(+), 233 deletions(-) diff --git a/packages/rocketchat-google-vision/.npm/package/npm-shrinkwrap.json b/packages/rocketchat-google-vision/.npm/package/npm-shrinkwrap.json index de48c301bb9f..2cd5d961f1fc 100644 --- a/packages/rocketchat-google-vision/.npm/package/npm-shrinkwrap.json +++ b/packages/rocketchat-google-vision/.npm/package/npm-shrinkwrap.json @@ -1,10 +1,97 @@ { "lockfileVersion": 1, "dependencies": { + "@google-cloud/common": { + "version": "0.13.6", + "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-0.13.6.tgz", + "integrity": "sha1-qdjhN7xCmkSrqWif5qDkMxeE+FM=" + }, + "@google-cloud/common-grpc": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@google-cloud/common-grpc/-/common-grpc-0.4.3.tgz", + "integrity": "sha512-A3nErp1qV8iCWPYQniBhot7Gx+kZHTAuRzOQyoPpfbv9pLmsvZgTWzVUg1/R1ncrirQElHUDhIFXPV+kr+UJAA==", + "dependencies": { + "dot-prop": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-2.4.0.tgz", + "integrity": "sha1-hI4o9/HVB0DGdHqzywdnBGK2+Jw=" + } + } + }, + "@google-cloud/storage": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@google-cloud/storage/-/storage-1.2.1.tgz", + "integrity": "sha1-oPLiCHG4YvDqZKkKxI/AiEXPlQU=" + }, + "@google-cloud/vision": { + "version": "0.11.5", + "resolved": "https://registry.npmjs.org/@google-cloud/vision/-/vision-0.11.5.tgz", + "integrity": "sha1-W9sS0ptVQsX7fbtelDLDmsrR9v4=" + }, + "@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=" + }, + "@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=" + }, + "@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=" + }, + "@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=" + }, + "@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=" + }, + "@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=" + }, + "@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=" + }, + "@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" + }, + "@types/long": { + "version": "3.0.32", + "resolved": "https://registry.npmjs.org/@types/long/-/long-3.0.32.tgz", + "integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA==" + }, + "@types/node": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.5.1.tgz", + "integrity": "sha512-SrmAO+NhnsuG/6TychSl2VdxBZiw/d6V+8j+DFo8O3PwFi+QeYXWHhAw+b170aSc6zYab6/PjEWRZHIDN9mNUw==" + }, "ajv": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.1.tgz", - "integrity": "sha1-s4u4h22ehr7plJVqBOch6IskjrI=" + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=" }, "ansi-regex": { "version": "2.1.1", @@ -353,14 +440,14 @@ "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" }, "grpc": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.7.2.tgz", - "integrity": "sha512-GH6xziNGjW8LAtqQ3HmYI7Tx8BIlr46iaMRXHfh46kkaOP6PNWUx47ULNTUlXSYR3P00d0Pl8uzodTLwPk805w==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.8.0.tgz", + "integrity": "sha512-AwVQiyMdNv09O4kwec3z52HwkPuo1i61Uk1oENWM9CDeLAUiixQLMpXDIJL31MmZdAuKnAYds/naFEXzprbgHg==", "dependencies": { "abbrev": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", - "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, "ajv": { "version": "4.11.8", @@ -485,9 +572,9 @@ } }, "debug": { - "version": "2.6.8", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", - "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=" + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==" }, "deep-extend": { "version": "0.4.2", @@ -505,9 +592,9 @@ "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" }, "detect-libc": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.2.tgz", - "integrity": "sha1-ca1dIEvxempsqPRQxhRUBm70YeE=" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" }, "ecc-jsbn": { "version": "0.1.1", @@ -567,9 +654,9 @@ } }, "glob": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", - "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=" + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==" }, "graceful-fs": { "version": "4.1.11", @@ -617,9 +704,9 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "ini": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", - "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=" + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" }, "is-fullwidth-code-point": { "version": "1.0.0", @@ -711,14 +798,12 @@ "node-pre-gyp": { "version": "0.6.39", "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz", - "integrity": "sha512-OsJV74qxnvz/AMGgcfZoDaeDXKD3oY3QVIbBmwszTFkRisTSXbMQyn4UWzUMOtA5SVhrBZOTp0wcoSBgfMfMmQ==", - "dependencies": { - "nopt": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", - "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=" - } - } + "integrity": "sha512-OsJV74qxnvz/AMGgcfZoDaeDXKD3oY3QVIbBmwszTFkRisTSXbMQyn4UWzUMOtA5SVhrBZOTp0wcoSBgfMfMmQ==" + }, + "nopt": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=" }, "npmlog": { "version": "4.1.2", @@ -1239,9 +1324,9 @@ "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==" }, "retry-request": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-3.3.0.tgz", - "integrity": "sha512-bCbvtnZkfgB2TnbKMUUxzSR5W4AJQyMD6D6UcCsE/wBTVmlsS59OrDQr4RKV/Kq1hiIBmUYlbxd9MZ0cfpjrAQ==" + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-3.3.1.tgz", + "integrity": "sha512-PjAmtWIxjNj4Co/6FRtBl8afRP3CxrrIAnUzb1dzydfROd+6xt7xAebFeskgQgkfFf8NmzrXIoaB3HxmswXyxw==" }, "rgb-hex": { "version": "1.0.0", diff --git a/packages/rocketchat-lib/.npm/package/npm-shrinkwrap.json b/packages/rocketchat-lib/.npm/package/npm-shrinkwrap.json index 44139fd581df..4ee2c0388940 100644 --- a/packages/rocketchat-lib/.npm/package/npm-shrinkwrap.json +++ b/packages/rocketchat-lib/.npm/package/npm-shrinkwrap.json @@ -6,25 +6,20 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz", "integrity": "sha1-yM4n3grMdtiW0rH6099YjZ6C8BQ=" }, + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=" + }, "amdefine": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, "asap": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.5.tgz", - "integrity": "sha1-UidltQw1EEkOUtfc/ghe+bqWlY8=" + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" }, "asn1": { "version": "0.2.3", @@ -32,9 +27,9 @@ "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" }, "assert-plus": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz", - "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" }, "ast-types": { "version": "0.8.15", @@ -47,14 +42,14 @@ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, "aws-sign2": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=" + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" }, "aws4": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.5.0.tgz", - "integrity": "sha1-Cin/t5wxyecS7rCH6OemS0pW11U=" + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" }, "bad-words": { "version": "1.3.1", @@ -72,9 +67,9 @@ "integrity": "sha1-e0F0wvlESXU7EcJlHAg9qEGnsIQ=" }, "bcrypt-pbkdf": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz", - "integrity": "sha1-PKdrhSQccXC/fZcD57mqdGMAQNQ=" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=" }, "bintrees": { "version": "1.0.1", @@ -82,9 +77,9 @@ "integrity": "sha1-DmVcm5wkNeqraL9AJyJtK1WjRSQ=" }, "boom": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", - "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=" + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", + "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=" }, "bugsnag": { "version": "1.8.0", @@ -92,46 +87,41 @@ "integrity": "sha1-5BKdm6KaxRQSANGG/4wK/vdDN8c=" }, "caseless": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz", - "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c=" + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=" + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" }, "combined-stream": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=" }, - "commander": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", - "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=" - }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "cryptiles": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", - "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=" + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", + "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", + "dependencies": { + "boom": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", + "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==" + } + } }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } - } + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=" }, "delayed-stream": { "version": "1.0.0", @@ -148,11 +138,6 @@ "resolved": "https://registry.npmjs.org/es3ify/-/es3ify-0.1.4.tgz", "integrity": "sha1-rZ+l3xrjTz8x4SEbWBiy1RB439E=" }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, "esmangle-evaluator": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/esmangle-evaluator/-/esmangle-evaluator-1.0.1.tgz", @@ -164,20 +149,30 @@ "integrity": "sha1-t303q8046gt3Qmu4vCkizmtCZBE=" }, "extend": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz", - "integrity": "sha1-WkdDU7nzNT3dgXbf03uRyDpG8dQ=" + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" }, "extsprintf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz", - "integrity": "sha1-4QgOBljjALBilJkMxw4VAiNf1VA=" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, "falafel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/falafel/-/falafel-1.2.0.tgz", "integrity": "sha1-wY0k71CRF0pJfzGM0ksCaiXN2rQ=" }, + "fast-deep-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", + "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=" + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + }, "foreach": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", @@ -189,61 +184,39 @@ "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" }, "form-data": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.2.tgz", - "integrity": "sha1-icNTQAi5fq2ky7FX1Y9vXfAl6uQ=" - }, - "generate-function": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", - "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ=" - }, - "generate-object-property": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", - "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz", + "integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=" }, "getpass": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.6.tgz", - "integrity": "sha1-KD/9n8ElaECHUxHBtg6MQBhxEOY=", - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } - } + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=" }, - "graceful-readlink": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", - "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=" + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" }, "har-validator": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", - "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=" - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=" + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", + "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=" }, "hawk": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", - "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=" + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", + "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==" }, "hoek": { - "version": "2.16.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz", + "integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ==" }, "http-signature": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz", - "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=" }, "immediate": { "version": "3.0.6", @@ -260,16 +233,6 @@ "resolved": "https://registry.npmjs.org/inline-process-browser/-/inline-process-browser-1.0.0.tgz", "integrity": "sha1-RqYbFT3TybFiSxoAYm7bT39BTyI=" }, - "is-my-json-valid": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz", - "integrity": "sha1-k27do8o8IR/ZjzstPgjaQ/eykVs=" - }, - "is-property": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", - "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=" - }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -285,35 +248,30 @@ "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, - "jodid25519": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz", - "integrity": "sha1-BtSRIlUJNBlHfUJWM2BuDpB4KWc=" - }, "jsbn": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.0.tgz", - "integrity": "sha1-ZQmH2g3XT06/WhE3eiqi0nPpff0=" + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, - "jsonpointer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", - "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=" - }, "jsprim": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.1.tgz", - "integrity": "sha1-KnJW9wQSop7jZwqspiWZTE3P8lI=" + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=" }, "jstransform": { "version": "3.0.0", @@ -326,9 +284,9 @@ "integrity": "sha1-/9oh17uibzd8rYZdNkmy/Izjn+o=" }, "localforage": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.4.2.tgz", - "integrity": "sha1-X66KkdFG0eqbTG3NDt3r3PamFlM=" + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.5.5.tgz", + "integrity": "sha1-VfwcOoikf2f1+sbxIxsl/xNVZCM=" }, "lokijs": { "version": "1.4.1", @@ -336,14 +294,14 @@ "integrity": "sha1-6he+ktLqfKuhyBbWwgBkJOjbC/4=" }, "mime-db": { - "version": "1.26.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.26.0.tgz", - "integrity": "sha1-6v/NDk/Gk1z4E02iRuLmw1MFrf8=" + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", + "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=" }, "mime-types": { - "version": "2.1.14", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.14.tgz", - "integrity": "sha1-9+99l1g/yvO30oK2+LVnnaselO4=" + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", + "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=" }, "node-dogstatsd": { "version": "0.0.6", @@ -365,20 +323,15 @@ "resolved": "https://registry.npmjs.org/object-path/-/object-path-0.9.2.tgz", "integrity": "sha1-D9mnT8X60a45aLWGvaXGMr1sBaU=" }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=" + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, "private": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.6.tgz", - "integrity": "sha1-VcapdtD5uvuZJIUTUP5HubX7t8E=" + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==" }, "prom-client": { "version": "7.0.1", @@ -386,9 +339,9 @@ "integrity": "sha1-+pO6MbdlVLLvEWC+gEdiqfbzr+Q=" }, "promise": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/promise/-/promise-7.1.1.tgz", - "integrity": "sha1-SJZUxpJha4qlWwck+oCbt9tJxb8=" + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==" }, "punycode": { "version": "1.4.1", @@ -396,9 +349,9 @@ "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" }, "qs": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.0.tgz", - "integrity": "sha1-9AOyZPI7wBIox0ExtAfxjV6l1EI=" + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" }, "readable-stream": { "version": "1.0.34", @@ -416,21 +369,26 @@ "integrity": "sha1-Q761fsJujPI3092LM+QlM1d/Jlk=" }, "source-map": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", - "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=" + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" } } }, "request": { - "version": "2.79.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz", - "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=" + "version": "2.83.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", + "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==" + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" }, "sntp": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", - "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", + "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==" }, "source-map": { "version": "0.1.31", @@ -438,16 +396,9 @@ "integrity": "sha1-n3BNDWnZ4TioG63267T94z0VHGE=" }, "sshpk": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.10.2.tgz", - "integrity": "sha1-1agEziJpVRVjjnmNviMnPeBwpfo=", - "dependencies": { - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - } - } + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", + "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=" }, "stack-trace": { "version": "0.0.9", @@ -464,16 +415,6 @@ "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=" - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - }, "tdigest": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/tdigest/-/tdigest-0.1.1.tgz", @@ -490,14 +431,14 @@ "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=" }, "tough-cookie": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz", - "integrity": "sha1-8IH3bkyFcg5sN6X6ztc3FQ2EByo=" + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", + "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=" }, "tunnel-agent": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", - "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=" + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=" }, "tweetnacl": { "version": "0.14.5", @@ -515,14 +456,14 @@ "integrity": "sha1-p8IW0mdUUWljeztu3GypEZ4v+T8=" }, "uuid": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz", - "integrity": "sha1-ZUS7ot/ajBzxfmKaOjBeK7H+5sE=" + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", + "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" }, "verror": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz", - "integrity": "sha1-z/XfEpRtKX0rqu+qJoniW+AcAFw=" + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=" }, "xtend": { "version": "4.0.1", diff --git a/packages/rocketchat-lib/package.js b/packages/rocketchat-lib/package.js index c91957d52a82..d7eedb158ad6 100644 --- a/packages/rocketchat-lib/package.js +++ b/packages/rocketchat-lib/package.js @@ -9,7 +9,7 @@ Npm.depends({ 'bad-words': '1.3.1', 'object-path': '0.9.2', 'node-dogstatsd': '0.0.6', - 'localforage': '1.4.2', + 'localforage': '1.5.5', 'lokijs': '1.4.1', 'bugsnag': '1.8.0', 'prom-client': '7.0.1' diff --git a/packages/rocketchat-ui/client/lib/chatMessages.js b/packages/rocketchat-ui/client/lib/chatMessages.js index 8fa06d14def9..6a416132355f 100644 --- a/packages/rocketchat-ui/client/lib/chatMessages.js +++ b/packages/rocketchat-ui/client/lib/chatMessages.js @@ -255,6 +255,9 @@ this.ChatMessages = class ChatMessages { } Meteor.call('sendMessage', msgObject); + + localStorage.setItem(`messagebox_${ rid }`, ''); + return done(); }); From 3b059dfc496e0b27f9aeb9d5355465e542936ad8 Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento Date: Mon, 18 Dec 2017 17:13:12 -0200 Subject: [PATCH 31/70] Merge pull request #9170 from RocketChat/fix-oauth-logins-adblock [FIX] show oauth logins when adblock is used --- packages/rocketchat-theme/client/imports/general/base_old.css | 4 ++-- packages/rocketchat-ui-login/client/login/services.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/rocketchat-theme/client/imports/general/base_old.css b/packages/rocketchat-theme/client/imports/general/base_old.css index 2096547c30da..1a89bd6205b8 100644 --- a/packages/rocketchat-theme/client/imports/general/base_old.css +++ b/packages/rocketchat-theme/client/imports/general/base_old.css @@ -4534,7 +4534,7 @@ body:not(.is-cordova) { } } -.rc-old .social-login { +.rc-old .oauth-login { margin-bottom: 16px; margin-left: -4px; flex-wrap: wrap; @@ -5585,7 +5585,7 @@ body:not(.is-cordova) { } } - .rc-old .social-login { + .rc-old .oauth-login { margin-bottom: 6px; } diff --git a/packages/rocketchat-ui-login/client/login/services.html b/packages/rocketchat-ui-login/client/login/services.html index 7eb0c3dfebbc..90e3f3d024b2 100644 --- a/packages/rocketchat-ui-login/client/login/services.html +++ b/packages/rocketchat-ui-login/client/login/services.html @@ -1,6 +1,6 @@