Merge branch 'develop' of https://github.com/RocketChat/Rocket.Chat into graphql

pull/8158/head
Gabriel Delavald 8 years ago
commit 7412babe78
  1. 280
      .circleci/config.yml
  2. 13
      .circleci/docker.sh
  3. 8
      .circleci/namefiles.sh
  4. 23
      .circleci/setartname.sh
  5. 2
      .circleci/setdeploydir.sh
  6. 8
      .circleci/setupsig.sh
  7. BIN
      .circleci/sign.key.gpg
  8. 37
      .circleci/snap.sh
  9. 7
      .circleci/update-releases.sh
  10. 11
      .docker/Dockerfile
  11. 6
      .eslintrc
  12. 57
      .meteor/packages
  13. 2
      .meteor/release
  14. 114
      .meteor/versions
  15. 8
      .openshift/rocket-chat-ephemeral.json
  16. 8
      .openshift/rocket-chat-persistent.json
  17. 15
      .postcssrc
  18. 2
      .sandstorm/sandstorm-pkgdef.capnp
  19. 2
      .scripts/set-version.js
  20. 2
      .scripts/start.js
  21. 102
      .snapcraft/candidate/snapcraft.yaml
  22. 102
      .snapcraft/edge/snapcraft.yaml
  23. 14
      .snapcraft/snapcraft.yaml
  24. 11
      .travis.yml
  25. 4
      .travis/snap.sh
  26. 657
      HISTORY.md
  27. 100
      README.md
  28. 7
      client/lib/handleError.js
  29. 1
      client/methods/deleteMessage.js
  30. 1
      client/methods/updateMessage.js
  31. 24
      client/notifications/notification.js
  32. 3
      client/routes/router.js
  33. 38
      client/startup/startup.js
  34. 2
      client/startup/unread.js
  35. 2
      example-build-run.sh
  36. 16
      example-pm2.json
  37. 16
      lib/underscore.string.js
  38. 14
      nginx-multi-config.txt
  39. 11646
      package-lock.json
  40. 49
      package.json
  41. 2
      packages/autoupdate/autoupdate_client.js
  42. 3
      packages/autoupdate/package.js
  43. 70
      packages/meteor-accounts-saml/.npm/package/npm-shrinkwrap.json
  44. 2
      packages/meteor-accounts-saml/package.js
  45. 5
      packages/meteor-accounts-saml/saml_server.js
  46. 1
      packages/meteor-autocomplete/client/autocomplete-client.js
  47. 2
      packages/meteor-autocomplete/client/templates.js
  48. 2
      packages/meteor-autocomplete/package.js
  49. 0
      packages/meteor-timesync/client/timesync-client.js
  50. 16
      packages/meteor-timesync/package.js
  51. 0
      packages/meteor-timesync/server/timesync-server.js
  52. 7
      packages/rocketchat-2fa/.npm/package/npm-shrinkwrap.json
  53. 2
      packages/rocketchat-2fa/client/TOTPPassword.js
  54. 1
      packages/rocketchat-2fa/client/accountSecurity.html
  55. 15
      packages/rocketchat-2fa/client/accountSecurity.js
  56. 1
      packages/rocketchat-2fa/server/methods/enable.js
  57. 16
      packages/rocketchat-analytics/client/loadScript.js
  58. 17
      packages/rocketchat-api/.npm/package/npm-shrinkwrap.json
  59. 5
      packages/rocketchat-api/package.js
  60. 241
      packages/rocketchat-api/server/api.js
  61. 40
      packages/rocketchat-api/server/v1/channels.js
  62. 82
      packages/rocketchat-api/server/v1/chat.js
  63. 86
      packages/rocketchat-api/server/v1/commands.js
  64. 31
      packages/rocketchat-api/server/v1/groups.js
  65. 34
      packages/rocketchat-api/server/v1/helpers/parseJsonQuery.js
  66. 29
      packages/rocketchat-api/server/v1/im.js
  67. 3
      packages/rocketchat-api/server/v1/integrations.js
  68. 2
      packages/rocketchat-api/server/v1/misc.js
  69. 59
      packages/rocketchat-api/server/v1/push.js
  70. 93
      packages/rocketchat-api/server/v1/rooms.js
  71. 40
      packages/rocketchat-api/server/v1/settings.js
  72. 8
      packages/rocketchat-api/server/v1/stats.js
  73. 26
      packages/rocketchat-api/server/v1/subscriptions.js
  74. 30
      packages/rocketchat-api/server/v1/users.js
  75. 13
      packages/rocketchat-assets/.npm/package/npm-shrinkwrap.json
  76. 1
      packages/rocketchat-assets/package.js
  77. 1
      packages/rocketchat-assets/server/assets.js
  78. 2
      packages/rocketchat-authorization/client/lib/models/Subscriptions.js
  79. 2
      packages/rocketchat-authorization/client/lib/models/Users.js
  80. 1
      packages/rocketchat-authorization/client/startup.js
  81. 4
      packages/rocketchat-authorization/client/views/permissionsRole.js
  82. 1
      packages/rocketchat-authorization/package.js
  83. 2
      packages/rocketchat-authorization/server/functions/addUserRoles.js
  84. 2
      packages/rocketchat-authorization/server/functions/removeUserFromRoles.js
  85. 2
      packages/rocketchat-authorization/server/methods/addUserToRole.js
  86. 2
      packages/rocketchat-authorization/server/methods/removeUserFromRole.js
  87. 2
      packages/rocketchat-authorization/server/models/Base.js
  88. 2
      packages/rocketchat-authorization/server/models/Subscriptions.js
  89. 3
      packages/rocketchat-autolinker/.npm/package/npm-shrinkwrap.json
  90. 9
      packages/rocketchat-autolinker/client/client.js
  91. 21
      packages/rocketchat-autolinker/server/settings.js
  92. 2
      packages/rocketchat-autotranslate/client/lib/autotranslate.js
  93. 1
      packages/rocketchat-autotranslate/client/views/autoTranslateFlexTab.js
  94. 3
      packages/rocketchat-autotranslate/server/autotranslate.js
  95. 1
      packages/rocketchat-bot-helpers/package.js
  96. 2
      packages/rocketchat-bot-helpers/server/index.js
  97. 46
      packages/rocketchat-cas/.npm/package/npm-shrinkwrap.json
  98. 2
      packages/rocketchat-cas/package.js
  99. 27
      packages/rocketchat-cas/server/cas_server.js
  100. 28
      packages/rocketchat-cas/server/models/CredentialTokens.js
  101. Some files were not shown because too many files have changed in this diff Show More

@ -0,0 +1,280 @@
defaults: &defaults
working_directory: ~/repo
version: 2
jobs:
build:
<<: *defaults
docker:
- image: circleci/node: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: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: 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: .screenshots/
test-without-oplog:
<<: *defaults
docker:
- image: circleci/node: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: 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: .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:
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
- test-without-oplog
filters:
branches:
only: develop
tags:
only: /^[0-9]+\.[0-9]+\.[0-9]+(-rc\.[0-9]+)?$/

@ -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"

@ -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"

@ -0,0 +1,23 @@
if [[ $CIRCLE_TAG ]]; then
export ARTIFACT_NAME="$(npm run version --silent)"
else
export ARTIFACT_NAME="$(npm run version --silent).$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.60.0-develop
fi
export SNAP_CHANNEL
export RC_RELEASE
export RC_VERSION

@ -0,0 +1,2 @@
export ROCKET_DEPLOY_DIR="/tmp/deploy"
mkdir -p $ROCKET_DEPLOY_DIR

@ -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

Binary file not shown.

@ -0,0 +1,37 @@
#!/bin/bash
set -euvo pipefail
IFS=$'\n\t'
# Add launchpad to known hosts
ssh-keyscan -t rsa -H git.launchpad.net > ~/.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

@ -0,0 +1,7 @@
#!/bin/bash
set -euvo pipefail
IFS=$'\n\t'
curl -X POST \
-H "X-Update-Token: ${UPDATE_TOKEN}" \
https://releases.rocket.chat/update

@ -1,20 +1,19 @@
FROM rocketchat/base:4
FROM rocketchat/base:8
ENV RC_VERSION 0.59.0-develop
ENV RC_VERSION 0.60.0-develop
MAINTAINER buildmaster@rocket.chat
RUN set -x \
&& curl -SLf "https://rocket.chat/releases/${RC_VERSION}/download" -o rocket.chat.tgz \
&& curl -SLf "https://rocket.chat/releases/${RC_VERSION}/asc" -o rocket.chat.tgz.asc \
&& mkdir /app \
&& 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 \
&& rm rocket.chat.tgz rocket.chat.tgz.asc \
&& cd /app/bundle/programs/server \
&& npm install \
&& npm cache clear \
&& npm cache clear --force \
&& chown -R rocketchat:rocketchat /app
USER rocketchat

@ -3,7 +3,7 @@
"sourceType": "module",
"ecmaVersion": 2017,
"ecmaFeatures": {
"experimentalObjectRestSpread" : true,
"experimentalObjectRestSpread" : true
}
},
"env": {
@ -89,7 +89,6 @@
"object-shorthand": 2
},
"globals": {
"_" : false,
"__meteor_runtime_config__" : false,
"AccountBox" : false,
"Accounts" : false,
@ -123,6 +122,7 @@
"Logger" : false,
"Match" : false,
"Meteor" : false,
"modal" : false,
"moment" : false,
"Mongo" : false,
"Npm" : false,
@ -135,13 +135,11 @@
"RocketChatFile" : false,
"RoomHistoryManager" : false,
"RoomManager" : false,
"s" : false,
"ServiceConfiguration" : false,
"Session" : false,
"Settings" : false,
"SHA256" : false,
"SideNav" : false,
"swal" : false,
"t" : false,
"TAPi18n" : false,
"TAPi18next" : false,

@ -4,36 +4,39 @@
# but you can also edit it by hand.
rocketchat:cors
accounts-facebook@1.2.1
accounts-github@1.3.0
accounts-google@1.2.0
accounts-meteor-developer@1.3.0
accounts-password@1.4.0
accounts-twitter@1.3.0
accounts-facebook@1.3.0
accounts-github@1.4.0
accounts-google@1.3.0
accounts-meteor-developer@1.4.0
accounts-password@1.5.0
accounts-twitter@1.4.0
blaze-html-templates
check@1.2.5
ddp-rate-limiter@1.0.7
ecmascript@0.8.2
ejson@1.0.14
ddp-common@1.3.0
dynamic-import@0.2.0
ecmascript@0.9.0
ejson@1.1.0
email@1.2.3
fastclick@1.0.13
http@1.2.12
http@1.3.0
jquery@1.11.10
less@2.7.9
logging@1.1.17
meteor-base@1.1.0
mobile-experience@1.0.4
mongo@1.2.0
less@2.7.11
logging@1.1.19
meteor-base@1.2.0
mobile-experience@1.0.5
mongo@1.3.1
random@1.0.10
rate-limit@1.0.8
reactive-dict@1.1.9
reactive-dict@1.2.0
reactive-var@1.0.11
reload@1.1.11
service-configuration@1.0.11
session@1.1.7
shell-server@0.2.4
shell-server@0.3.0
spacebars
standard-minifier-js@2.1.1
standard-minifier-js@2.2.0
tracker@1.1.3
rocketchat:2fa
@ -54,6 +57,7 @@ rocketchat:crowd
rocketchat:custom-oauth
rocketchat:custom-sounds
rocketchat:dolphin
rocketchat:drupal
rocketchat:emoji
rocketchat:emoji-custom
rocketchat:emoji-emojione
@ -63,6 +67,7 @@ rocketchat:file
rocketchat:file-upload
rocketchat:github-enterprise
rocketchat:gitlab
#rocketchat:google-natural-language
rocketchat:google-vision
rocketchat:grant
rocketchat:grant-facebook
@ -76,6 +81,7 @@ rocketchat:importer-csv
rocketchat:importer-hipchat
rocketchat:importer-hipchat-enterprise
rocketchat:importer-slack
rocketchat:importer-slack-users
rocketchat:integrations
rocketchat:internal-hubot
rocketchat:irc
@ -94,11 +100,14 @@ rocketchat:mentions-flextab
rocketchat:message-attachments
rocketchat:message-mark-as-unread
rocketchat:message-pin
rocketchat:message-snippet
rocketchat:message-star
rocketchat:migrations
rocketchat:monitoring
rocketchat:oauth2-server-config
rocketchat:oembed
rocketchat:otr
rocketchat:postcss
rocketchat:push-notifications
rocketchat:reactions
rocketchat:sandstorm
@ -124,6 +133,7 @@ rocketchat:spotify
rocketchat:statistics
rocketchat:streamer
rocketchat:theme
rocketchat:tokenpass
rocketchat:tooltip
rocketchat:tutum
rocketchat:ui
@ -139,11 +149,6 @@ rocketchat:version
rocketchat:videobridge
rocketchat:webrtc
rocketchat:wordpress
rocketchat:message-snippet
#rocketchat:google-natural-language
rocketchat:drupal
rocketchat:monitoring
#rocketchat:chatops
konecty:change-case
konecty:delayed-task
@ -152,6 +157,7 @@ konecty:multiple-instances-status
konecty:nrr
konecty:user-presence
deepwell:bootstrap-datepicker2
dispatch:run-as-user
francocatena:status
jalik:ufs
@ -159,6 +165,7 @@ jalik:ufs-gridfs
jparker:gravatar
kadira:blaze-layout
kadira:flow-router
keepnox:perfect-scrollbar
#kenton:accounts-sandstorm
mizzao:autocomplete
mizzao:timesync
@ -172,13 +179,7 @@ percolate:synced-cron
raix:handlebar-helpers
raix:push
raix:ui-dropped-event
smoral:sweetalert
steffo:meteor-accounts-saml
tmeasday:crypto-md5
todda00:friendly-slugs
underscorestring:underscore.string
yasaricli:slugify
yasinuslu:blaze-meta
deepwell:bootstrap-datepicker2
rocketchat:postcss
dynamic-import@0.1.1

@ -1 +1 @@
METEOR@1.5.2
METEOR@1.6.0.1

@ -1,58 +1,58 @@
accounts-base@1.3.2
accounts-facebook@1.2.1
accounts-github@1.3.0
accounts-google@1.2.0
accounts-meteor-developer@1.3.0
accounts-base@1.4.0
accounts-facebook@1.3.0
accounts-github@1.4.0
accounts-google@1.3.0
accounts-meteor-developer@1.4.0
accounts-oauth@1.1.15
accounts-password@1.4.0
accounts-twitter@1.3.0
accounts-password@1.5.0
accounts-twitter@1.4.0
aldeed:simple-schema@1.5.3
allow-deny@1.0.6
allow-deny@1.1.0
autoupdate@1.3.12
babel-compiler@6.20.0
babel-runtime@1.0.1
babel-compiler@6.24.7
babel-runtime@1.1.1
base64@1.0.10
binary-heap@1.0.10
blaze@2.3.2
blaze-html-templates@1.1.2
blaze-tools@1.0.10
boilerplate-generator@1.2.0
boilerplate-generator@1.3.1
caching-compiler@1.1.9
caching-html-compiler@1.1.2
callback-hook@1.0.10
cfs:http-methods@0.0.32
check@1.2.5
coffeescript@1.12.7_1
coffeescript-compiler@1.12.7_1
coffeescript@1.12.7_3
coffeescript-compiler@1.12.7_3
dandv:caret-position@2.1.1
ddp@1.3.0
ddp-client@2.1.0
ddp-common@1.2.9
ddp@1.4.0
ddp-client@2.2.0
ddp-common@1.3.0
ddp-rate-limiter@1.0.7
ddp-server@2.0.0
ddp-server@2.1.1
deepwell:bootstrap-datepicker2@1.3.0
deps@1.0.12
diff-sequence@1.0.7
dispatch:run-as-user@1.1.1
dynamic-import@0.1.1
ecmascript@0.8.2
ecmascript-runtime@0.4.1
ecmascript-runtime-client@0.4.3
ecmascript-runtime-server@0.4.1
dynamic-import@0.2.1
ecmascript@0.9.0
ecmascript-runtime@0.5.0
ecmascript-runtime-client@0.5.0
ecmascript-runtime-server@0.5.0
edgee:slingshot@0.7.1
ejson@1.0.14
ejson@1.1.0
email@1.2.3
emojione:emojione@2.2.6
facebook-oauth@1.3.2
facebook-oauth@1.4.0
fastclick@1.0.13
francocatena:status@1.5.3
geojson-utils@1.0.10
github-oauth@1.2.0
google-oauth@1.2.4
google-oauth@1.2.5
hot-code-push@1.0.4
html-tools@1.0.11
htmljs@1.0.11
http@1.2.12
http@1.3.0
id-map@1.0.9
jalik:ufs@0.7.4_1
jalik:ufs-gridfs@0.2.1
@ -63,36 +63,37 @@ jparker:gravatar@0.5.1
jquery@1.11.10
kadira:blaze-layout@2.3.0
kadira:flow-router@2.12.1
keepnox:perfect-scrollbar@0.6.8
konecty:change-case@2.3.0
konecty:delayed-task@1.0.0
konecty:mongo-counter@0.0.5_3
konecty:multiple-instances-status@1.0.6_1
konecty:multiple-instances-status@1.1.0
konecty:nrr@2.0.2
konecty:user-presence@1.2.9
konecty:user-presence@2.0.1
launch-screen@1.1.1
less@2.7.9
less@2.7.11
livedata@1.0.18
localstorage@1.1.1
logging@1.1.17
localstorage@1.2.0
logging@1.1.19
matb33:collection-hooks@0.8.4
mdg:validation-error@0.5.1
meteor@1.7.1
meteor-base@1.1.0
meteor@1.8.2
meteor-base@1.2.0
meteor-developer-oauth@1.2.0
meteorhacks:inject-initial@1.0.4
meteorhacks:meteorx@1.4.1
meteorspark:util@0.2.0
minifier-css@1.2.16
minifier-js@2.1.3
minimongo@1.3.0
minifier-js@2.2.2
minimongo@1.4.3
mizzao:autocomplete@0.5.1
mizzao:timesync@0.3.4
mobile-experience@1.0.4
mobile-experience@1.0.5
mobile-status-bar@1.0.14
modules@0.10.0
modules-runtime@0.8.0
mongo@1.2.0
mongo-dev-server@1.0.1
modules@0.11.0
modules-runtime@0.9.1
mongo@1.3.1
mongo-dev-server@1.1.0
mongo-id@1.0.6
mongo-livedata@1.0.12
mrt:reactive-store@0.0.1
@ -100,25 +101,25 @@ mystor:device-detection@0.2.0
nimble:restivus@0.8.12
nooitaf:colors@1.1.2_1
npm-bcrypt@0.9.3
npm-mongo@2.2.30
oauth@1.1.13
oauth1@1.1.11
oauth2@1.1.11
npm-mongo@2.2.33
oauth@1.2.0
oauth1@1.2.0
oauth2@1.2.0
observe-sequence@1.0.16
ordered-dict@1.0.9
ostrio:cookies@2.2.2
ostrio:cookies@2.2.4
pauli:accounts-linkedin@2.1.3
pauli:linkedin-oauth@1.2.0
percolate:synced-cron@1.3.2
promise@0.9.0
promise@0.10.0
raix:eventemitter@0.1.3
raix:eventstate@0.0.4
raix:handlebar-helpers@0.2.5
raix:push@3.0.3-rc.7
raix:push@3.3.0
raix:ui-dropped-event@0.0.7
random@1.0.10
rate-limit@1.0.8
reactive-dict@1.1.9
reactive-dict@1.2.0
reactive-var@1.0.11
reload@1.1.11
retry@1.0.9
@ -165,13 +166,13 @@ rocketchat:importer-csv@1.0.0
rocketchat:importer-hipchat@0.0.1
rocketchat:importer-hipchat-enterprise@1.0.0
rocketchat:importer-slack@0.0.1
rocketchat:importer-slack-users@1.0.0
rocketchat:integrations@0.0.1
rocketchat:internal-hubot@0.0.1
rocketchat:irc@0.0.2
rocketchat:issuelinks@0.0.1
rocketchat:katex@0.0.1
rocketchat:ldap@0.0.1
rocketchat:ldapjs@1.0.0
rocketchat:lib@0.0.1
rocketchat:livechat@0.0.1
rocketchat:logger@0.0.1
@ -217,8 +218,9 @@ rocketchat:smarsh-connector@0.0.1
rocketchat:sms@0.0.1
rocketchat:spotify@0.0.1
rocketchat:statistics@0.0.1
rocketchat:streamer@0.5.0
rocketchat:streamer@0.6.1
rocketchat:theme@0.0.1
rocketchat:tokenpass@0.0.1
rocketchat:tooltip@0.0.1
rocketchat:tutum@0.0.1
rocketchat:ui@0.1.0
@ -238,30 +240,26 @@ routepolicy@1.0.12
service-configuration@1.0.11
session@1.1.7
sha@1.0.9
shell-server@0.2.4
shell-server@0.3.1
simple:json-routes@2.1.0
smoral:sweetalert@1.1.1
spacebars@1.0.15
spacebars-compiler@1.1.3
srp@1.0.10
standard-minifier-js@2.1.1
standard-minifier-js@2.2.3
steffo:meteor-accounts-saml@0.0.1
swydo:graphql@0.0.3
tap:i18n@1.8.2
templating@1.3.2
templating-compiler@1.3.2
templating-compiler@1.3.3
templating-runtime@1.3.2
templating-tools@1.1.2
tmeasday:crypto-base@3.1.2
tmeasday:crypto-md5@3.1.2
todda00:friendly-slugs@0.6.0
tracker@1.1.3
twitter-oauth@1.2.0
ui@1.0.13
underscore@1.0.10
underscorestring:underscore.string@3.3.4
url@1.1.0
webapp@1.3.18
webapp@1.4.0
webapp-hashing@1.0.9
yasaricli:slugify@0.0.7
yasinuslu:blaze-meta@0.3.3

@ -151,7 +151,7 @@
"name": "rocketchat"
},
"spec": {
"dockerImageRepository": "docker.io/rocket.chat",
"dockerImageRepository": "registry.connect.redhat.com/rocketchat",
"tags": [
{
"name": "latest",
@ -208,8 +208,8 @@
],
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "rocket-chat:latest"
"namespace": "${NAMESPACE}",
"name": "rocketchat:latest"
}
}
}
@ -242,7 +242,7 @@
"containers": [
{
"name": "rocketchat",
"image": "rocketchat/rocket.chat:latest",
"image": "registry.connect.redhat.com/rocketchat/rocketchat:latest",
"ports": [
{
"containerPort": 3000,

@ -171,7 +171,7 @@
"name": "rocketchat"
},
"spec": {
"dockerImageRepository": "docker.io/rocket.chat",
"dockerImageRepository": "registry.connect.redhat.com/rocketchat/rocketchat",
"tags": [
{
"name": "latest",
@ -228,8 +228,8 @@
],
"from": {
"kind": "ImageStreamTag",
"namespace": "openshift",
"name": "rocket.chat:latest"
"namespace": "${NAMESPACE}",
"name": "rocketchat:latest"
}
}
}
@ -262,7 +262,7 @@
"containers": [
{
"name": "rocketchat",
"image": "rocketchat/rocket.chat:latest",
"image": "registry.connect.redhat.com/rocketchat/rocketchat:latest",
"ports": [
{
"containerPort": 3000,

@ -1,12 +1,13 @@
{
"plugins": {
"postcss-smart-import": {},
"postcss-cssnext": {
"features": {
"customProperties": {
"preserve": true
}
},
"postcss-import": {},
"postcss-custom-properties": {
"preserve": true
},
"postcss-media-minmax": {},
"postcss-selector-not": {},
"postcss-nesting": {},
"autoprefixer": {
"browsers": [
"ie > 10",
"last 2 Edge versions",

@ -21,7 +21,7 @@ const pkgdef :Spk.PackageDefinition = (
appVersion = 62, # Increment this for every release.
appMarketingVersion = (defaultText = "0.59.0-develop"),
appMarketingVersion = (defaultText = "0.60.0-develop"),
# Human-readable representation of appVersion. Should match the way you
# identify versions of your app in documentation and marketing.

@ -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'
];

@ -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 +

@ -1,102 +0,0 @@
#
# Easiest way to work with this file, from an updated Ubuntu 16.04 LTS image
# 1. create a non-root user with sudo priv and perform following steps as non-root
# 2. `sudo apt-get update`
# 3. `sudo apt-get install snapcraft python build-essential`
# 4. `snapcraft stage`
# 5. `snapcraft snap`
name: rocketchat-server
version: #{RC_VERSION}
summary: Rocket.Chat server
description: Have your own Slack like online chat, built with Meteor. https://rocket.chat/
confinement: strict
assumes: [snapd2.21]
apps:
rocketchat-server:
command: startRocketChat
daemon: simple
plugs: [network, network-bind]
rocketchat-mongo:
command: startmongo
daemon: simple
plugs: [network, network-bind]
rocketchat-caddy:
command: env LC_ALL=C caddy -conf=$SNAP_DATA/Caddyfile -host=localhost:8080
daemon: simple
plugs: [network, network-bind]
mongo:
command: env LC_ALL=C mongo
plugs: [network]
restoredb:
command: env LC_ALL=C restoredb
plugs: [network]
backupdb:
command: env LC_ALL=c rcbackup
plugs: [network]
initcaddy:
command: env LC_ALL=c initcaddy
parts:
node:
plugin: nodejs
node-engine: 4.8.3
node-packages:
- promise
- fibers
- underscore
- source-map-support
- semver
build-packages:
# For fibers
- python
- build-essential
- nodejs
organize:
lib/node_modules: node_modules
rocketchat-server:
plugin: dump
after: [node]
source: https://rocket.chat/releases/release-candidate/download
source-type: tar
stage-packages:
- graphicsmagick
stage:
- programs
- main.js
- .node_version.txt
- usr
- lib
mongodb:
build-packages:
- wget
source: ./
prepare: ./resources/preparemongo
plugin: dump
stage-packages:
- libssl1.0.0
prime:
- usr
- bin
- lib
scripts:
plugin: dump
source: resources/
organize:
rcbackup: bin/rcbackup
restoredb: bin/restoredb
startmongo: bin/startmongo
startRocketChat: bin/startRocketChat
initreplset.js: bin/initreplset.js
Caddyfile: bin/Caddyfile
initcaddy: bin/initcaddy
prime:
- bin
caddy:
prepare: ./resources/preparecaddy
plugin: dump
source: ./
prime:
- bin
organize:
caddy: bin/caddy
after: [mongodb]

@ -1,102 +0,0 @@
#
# Easiest way to work with this file, from an updated Ubuntu 16.04 LTS image
# 1. create a non-root user with sudo priv and perform following steps as non-root
# 2. `sudo apt-get update`
# 3. `sudo apt-get install snapcraft python build-essential`
# 4. `snapcraft stage`
# 5. `snapcraft snap`
name: rocketchat-server
version: #{RC_VERSION}
summary: Rocket.Chat server
description: Have your own Slack like online chat, built with Meteor. https://rocket.chat/
confinement: strict
assumes: [snapd2.21]
apps:
rocketchat-server:
command: startRocketChat
daemon: simple
plugs: [network, network-bind]
rocketchat-mongo:
command: startmongo
daemon: simple
plugs: [network, network-bind]
rocketchat-caddy:
command: env LC_ALL=C caddy -conf=$SNAP_DATA/Caddyfile -host=localhost:8080
daemon: simple
plugs: [network, network-bind]
mongo:
command: env LC_ALL=C mongo
plugs: [network]
restoredb:
command: env LC_ALL=C restoredb
plugs: [network]
backupdb:
command: env LC_ALL=c rcbackup
plugs: [network]
initcaddy:
command: env LC_ALL=c initcaddy
parts:
node:
plugin: nodejs
node-engine: 4.8.3
node-packages:
- promise
- fibers
- underscore
- source-map-support
- semver
build-packages:
# For fibers
- python
- build-essential
- nodejs
organize:
lib/node_modules: node_modules
rocketchat-server:
plugin: dump
after: [node]
source: https://rocket.chat/releases/develop/download
source-type: tar
stage-packages:
- graphicsmagick
stage:
- programs
- main.js
- .node_version.txt
- usr
- lib
mongodb:
build-packages:
- wget
source: ./
prepare: ./resources/preparemongo
plugin: dump
stage-packages:
- libssl1.0.0
prime:
- usr
- bin
- lib
scripts:
plugin: dump
source: resources/
organize:
rcbackup: bin/rcbackup
restoredb: bin/restoredb
startmongo: bin/startmongo
startRocketChat: bin/startRocketChat
initreplset.js: bin/initreplset.js
Caddyfile: bin/Caddyfile
initcaddy: bin/initcaddy
prime:
- bin
caddy:
prepare: ./resources/preparecaddy
plugin: dump
source: ./
prime:
- bin
organize:
caddy: bin/caddy
after: [mongodb]

@ -39,25 +39,17 @@ apps:
parts:
node:
plugin: nodejs
node-engine: 4.8.3
node-packages:
- promise
- fibers
- underscore
- source-map-support
- semver
node-engine: 8.8.1
build-packages:
# For fibers
- python
- build-essential
- nodejs
organize:
lib/node_modules: node_modules
rocketchat-server:
plugin: dump
prepare: curl -SLf "https://releases.rocket.chat/#{RC_VERSION}/download/" -o rocket.chat.tgz; tar xvf rocket.chat.tgz --strip 1; cd programs/server; npm install; cd npm/node_modules/meteor/rocketchat_google-vision; npm install grpc@1.6.6;
after: [node]
source: https://rocket.chat/releases/latest/download
source-type: tar
source: .
stage-packages:
- graphicsmagick
stage:

@ -9,7 +9,7 @@ branches:
git:
depth: 1
node_js:
- '4'
- '8'
addons:
apt:
sources:
@ -41,11 +41,13 @@ before_install:
install:
- export PATH="$HOME/.meteor:$PATH"
before_script:
- if [[ $TRAVIS_TAG ]]; then meteor reset; fi
- echo "replication:" | sudo tee -a /etc/mongod.conf
- |-
echo " replSetName: \"rs0\"" | sudo tee -a /etc/mongod.conf
- sudo service mongod restart
- mkdir /tmp/build
- meteor --version
- travis_retry meteor npm install
- |-
mongo --eval 'rs.initiate({_id:"rs0", members: [{"_id":1, "host":"localhost:27017"}]})'
@ -56,16 +58,15 @@ before_script:
- mkdir /tmp/build-test
- tar -xf /tmp/build/Rocket.Chat.tar.gz -C /tmp/build-test/
- cd /tmp/build-test/bundle/programs/server
- meteor npm install -g node-gyp node-pre-gyp
- meteor npm install
- npm install
- cd -
- mongo --eval 'rs.status()'
- mongo meteor --eval 'db.getCollectionNames()'
script:
- travis_retry meteor npm test
- travis_retry npm test
- mongo meteor --eval 'db.dropDatabase()'
- unset MONGO_OPLOG_URL
- travis_retry meteor npm test
- travis_retry npm test
before_deploy:
- source ".travis/setartname.sh"
- source ".travis/setdeploydir.sh"

@ -17,7 +17,7 @@ elif [[ $TRAVIS_TAG ]]; then
RC_VERSION=$TRAVIS_TAG
else
CHANNEL=edge
RC_VERSION=0.59.0-develop
RC_VERSION=0.60.0-develop
fi
echo "Preparing to trigger a snap release for $CHANNEL channel"
@ -38,7 +38,7 @@ GIT_SSH_COMMAND="ssh -i launchpadkey" git clone -b $CHANNEL git+ssh://rocket.cha
# Rarely will change, but just incase we copy it all
cp -r resources buildinfo launchpad/
sed s/#{RC_VERSION}/$RC_VERSION/ $CHANNEL/snapcraft.yaml > launchpad/snapcraft.yaml
sed s/#{RC_VERSION}/$RC_VERSION/ snapcraft.yaml > launchpad/snapcraft.yaml
cd launchpad
git add resources snapcraft.yaml buildinfo

@ -1,3 +1,660 @@
<a name="0.59.4"></a>
## 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
<a name="0.59.3"></a>
## 0.59.3 (2017-10-29)
### Bug Fixes
- [#8593](https://github.com/RocketChat/Rocket.Chat/pull/8593) AmazonS3: Quote file.name for ContentDisposition for files with commas
- [#8648](https://github.com/RocketChat/Rocket.Chat/pull/8648) Audio message icon
- [#8645](https://github.com/RocketChat/Rocket.Chat/pull/8645) Fix e-mail message forward
- [#8679](https://github.com/RocketChat/Rocket.Chat/pull/8679) Fix typos
- [#8431](https://github.com/RocketChat/Rocket.Chat/pull/8431) Highlighted color height issue
- [#8691](https://github.com/RocketChat/Rocket.Chat/pull/8691) LDAP not respecting UTF8 characters & Sync Interval not working
- [#8655](https://github.com/RocketChat/Rocket.Chat/pull/8655) Update pt-BR translation
<details>
<summary>Others</summary>
- [#8653](https://github.com/RocketChat/Rocket.Chat/pull/8653) install grpc package manually to fix snap armhf build
- [#8434](https://github.com/RocketChat/Rocket.Chat/pull/8434) removing a duplicate line
</details>
<a name="0.59.2"></a>
## 0.59.2 (2017-10-25)
### Bug Fixes
- [#8635](https://github.com/RocketChat/Rocket.Chat/pull/8635) API channel/group.members not sorting
- [#8551](https://github.com/RocketChat/Rocket.Chat/pull/8551) encode filename in url to prevent links breaking
- [#8577](https://github.com/RocketChat/Rocket.Chat/pull/8577) Fix guest pool inquiry taking
- [#8613](https://github.com/RocketChat/Rocket.Chat/pull/8613) LDAP not merging existent users && Wrong id link generation
- [#8634](https://github.com/RocketChat/Rocket.Chat/pull/8634) Message popup menu on mobile/cordova
- [#8637](https://github.com/RocketChat/Rocket.Chat/pull/8637) Missing scroll at create channel page
<a name="0.59.1"></a>
## 0.59.1 (2017-10-19)
### Bug Fixes
- [#8543](https://github.com/RocketChat/Rocket.Chat/pull/8543) Color reset when default value editor is different
- [#8541](https://github.com/RocketChat/Rocket.Chat/pull/8541) LDAP login error regression at 0.59.0
- [#8544](https://github.com/RocketChat/Rocket.Chat/pull/8544) Migration 103 wrong converting primrary colors
- [#8547](https://github.com/RocketChat/Rocket.Chat/pull/8547) Wrong colors after migration 103
<a name="0.59.0"></a>
# 0.59.0 (2017-10-18)
### New Features
- [#7636](https://github.com/RocketChat/Rocket.Chat/pull/7636) Add classes to notification menu so they can be hidden in css
- [#7852](https://github.com/RocketChat/Rocket.Chat/pull/7852) Add markdown parser "marked"
- [#7711](https://github.com/RocketChat/Rocket.Chat/pull/7711) Add room type as a class to the ul-group of rooms
- [#6301](https://github.com/RocketChat/Rocket.Chat/pull/6301) Add tags to uploaded images using Google Cloud Vision API
- [#7658](https://github.com/RocketChat/Rocket.Chat/pull/7658) Add unread options for direct messages
- [#5902](https://github.com/RocketChat/Rocket.Chat/pull/5902) Adds a Keyboard Shortcut option to the flextab
- [#7614](https://github.com/RocketChat/Rocket.Chat/pull/7614) Allow ldap mapping of customFields
- [#7817](https://github.com/RocketChat/Rocket.Chat/pull/7817) Audio Notification updated in sidebar
- [#7350](https://github.com/RocketChat/Rocket.Chat/pull/7350) Automatically select the first channel
- [#7853](https://github.com/RocketChat/Rocket.Chat/pull/7853) Create a standard for svg icons
- [#7342](https://github.com/RocketChat/Rocket.Chat/pull/7342) Integrated personal email gateway (GSoC'17)
- [#7830](https://github.com/RocketChat/Rocket.Chat/pull/7830) Option to block users to mention unknow users
- [#6700](https://github.com/RocketChat/Rocket.Chat/pull/6700) Package to render issue numbers into links to an issue tracker.
- [#7864](https://github.com/RocketChat/Rocket.Chat/pull/7864) Replace message cog for vertical menu
- [#7565](https://github.com/RocketChat/Rocket.Chat/pull/7565) REST API endpoint to list all private groups (permission limited)
- [#7643](https://github.com/RocketChat/Rocket.Chat/pull/7643) Rocket.Chat UI Redesign
- [#7612](https://github.com/RocketChat/Rocket.Chat/pull/7612) Search users by fields defined by admin
- [#7688](https://github.com/RocketChat/Rocket.Chat/pull/7688) Template to show Custom Fields in user info view
- [#8073](https://github.com/RocketChat/Rocket.Chat/pull/8073) Upgrade to meteor 1.5.2
- [#8260](https://github.com/RocketChat/Rocket.Chat/pull/8260) Enable read only channel creation
- [#8304](https://github.com/RocketChat/Rocket.Chat/pull/8304) Add RD Station integration to livechat
- [#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
- [#8361](https://github.com/RocketChat/Rocket.Chat/pull/8361) Unify unread and mentions badge
- [#8459](https://github.com/RocketChat/Rocket.Chat/pull/8459) Setting to disable MarkDown and enable AutoLinker
### Bug Fixes
- [#7854](https://github.com/RocketChat/Rocket.Chat/pull/7854) Add CSS support for Safari versions > 7
- [#7456](https://github.com/RocketChat/Rocket.Chat/pull/7456) Csv importer: work with more problematic data
- [#7815](https://github.com/RocketChat/Rocket.Chat/pull/7815) Dutch translations
- [#7846](https://github.com/RocketChat/Rocket.Chat/pull/7846) Email message forward error
- [#7673](https://github.com/RocketChat/Rocket.Chat/pull/7673) Example usage of unsubscribe.js
- [#7855](https://github.com/RocketChat/Rocket.Chat/pull/7855) File upload on multi-instances using a path prefix
- [#7656](https://github.com/RocketChat/Rocket.Chat/pull/7656) Fix avatar upload fail on Cordova app
- [#7168](https://github.com/RocketChat/Rocket.Chat/pull/7168) Fix black background on transparent avatars
- [#7814](https://github.com/RocketChat/Rocket.Chat/pull/7814) Fix Dutch translation
- [#7629](https://github.com/RocketChat/Rocket.Chat/pull/7629) Fix messagebox growth
- [#7863](https://github.com/RocketChat/Rocket.Chat/pull/7863) Fix migration 100
- [#7823](https://github.com/RocketChat/Rocket.Chat/pull/7823) Fix new-message button showing on search
- [#7687](https://github.com/RocketChat/Rocket.Chat/pull/7687) Fix room load on first hit
- [#7758](https://github.com/RocketChat/Rocket.Chat/pull/7758) Fixed function closure syntax allowing validation emails to be sent.
- [#7825](https://github.com/RocketChat/Rocket.Chat/pull/7825) Google vision NSFW tag
- [#7679](https://github.com/RocketChat/Rocket.Chat/pull/7679) Make link inside YouTube preview open in new tab
- [#7644](https://github.com/RocketChat/Rocket.Chat/pull/7644) Markdown noopener/noreferrer: use correct HTML attribute
- [#7721](https://github.com/RocketChat/Rocket.Chat/pull/7721) meteor-accounts-saml issue with ns0,ns1 namespaces, makes it compatible with pysaml2 lib
- [#7652](https://github.com/RocketChat/Rocket.Chat/pull/7652) Only use "File Uploaded" prefix on files
- [#7809](https://github.com/RocketChat/Rocket.Chat/pull/7809) Remove redundant "do" in "Are you sure ...?" messages.
- [#7672](https://github.com/RocketChat/Rocket.Chat/pull/7672) Remove references to non-existent tests
- [#7748](https://github.com/RocketChat/Rocket.Chat/pull/7748) scroll on flex-tab
- [#7779](https://github.com/RocketChat/Rocket.Chat/pull/7779) Settings not getting applied from Meteor.settings and process.env
- [#7778](https://github.com/RocketChat/Rocket.Chat/pull/7778) Update Snap links
- [#7639](https://github.com/RocketChat/Rocket.Chat/pull/7639) Wrong email subject when "All Messages" setting enabled
- [#7630](https://github.com/RocketChat/Rocket.Chat/pull/7630) Wrong render of snippet’s name
- [#7885](https://github.com/RocketChat/Rocket.Chat/pull/7885) message actions over unread bar
- [#7883](https://github.com/RocketChat/Rocket.Chat/pull/7883) popover position on mobile
- [#7881](https://github.com/RocketChat/Rocket.Chat/pull/7881) search results position on sidebar
- [#7880](https://github.com/RocketChat/Rocket.Chat/pull/7880) sidebar paddings
- [#7912](https://github.com/RocketChat/Rocket.Chat/pull/7912) Fix google play logo on repo README
- [#7904](https://github.com/RocketChat/Rocket.Chat/pull/7904) Fix livechat toggle UI issue
- [#7895](https://github.com/RocketChat/Rocket.Chat/pull/7895) Remove break change in Realtime API
- [#7893](https://github.com/RocketChat/Rocket.Chat/pull/7893) Window exception when parsing Markdown on server
- [#7971](https://github.com/RocketChat/Rocket.Chat/pull/7971) Add padding on messages to allow space to the action buttons
- [#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
- [#7984](https://github.com/RocketChat/Rocket.Chat/pull/7984) Chat box no longer auto-focuses when typing
- [#7942](https://github.com/RocketChat/Rocket.Chat/pull/7942) Create channel button on Firefox
- [#7948](https://github.com/RocketChat/Rocket.Chat/pull/7948) Document README.md. Drupal repo out of date
- [#7927](https://github.com/RocketChat/Rocket.Chat/pull/7927) Double scroll on 'keyboard shortcuts' menu in sidepanel
- [#7945](https://github.com/RocketChat/Rocket.Chat/pull/7945) Fix placeholders in account profile
- [#7963](https://github.com/RocketChat/Rocket.Chat/pull/7963) Fix the status on the members list
- [#7965](https://github.com/RocketChat/Rocket.Chat/pull/7965) Markdown being rendered in code tags
- [#7954](https://github.com/RocketChat/Rocket.Chat/pull/7954) OTR buttons padding
- [#7712](https://github.com/RocketChat/Rocket.Chat/pull/7712) Show leader on first load
- [#7970](https://github.com/RocketChat/Rocket.Chat/pull/7970) Small alignment fixes
- [#7960](https://github.com/RocketChat/Rocket.Chat/pull/7960) status and active room colors on sidebar
- [#7985](https://github.com/RocketChat/Rocket.Chat/pull/7985) Text area buttons and layout on mobile
- [#7986](https://github.com/RocketChat/Rocket.Chat/pull/7986) Textarea on firefox
- [#7953](https://github.com/RocketChat/Rocket.Chat/pull/7953) username ellipsis on firefox
- [#8101](https://github.com/RocketChat/Rocket.Chat/pull/8101) Dynamic popover
- [#8099](https://github.com/RocketChat/Rocket.Chat/pull/8099) Fix setting user avatar on LDAP login
- [#8059](https://github.com/RocketChat/Rocket.Chat/pull/8059) Not sending email to mentioned users with unchanged preference
- [#8112](https://github.com/RocketChat/Rocket.Chat/pull/8112) RTL
- [#8047](https://github.com/RocketChat/Rocket.Chat/pull/8047) Scroll on messagebox
- [#8039](https://github.com/RocketChat/Rocket.Chat/pull/8039) copy to clipboard and update clipboard.js library
- [#8001](https://github.com/RocketChat/Rocket.Chat/pull/8001) Error when translating message
- [#7754](https://github.com/RocketChat/Rocket.Chat/pull/7754) Fix email on mention
- [#8014](https://github.com/RocketChat/Rocket.Chat/pull/8014) Hide scrollbar on login page if not necessary
- [#8048](https://github.com/RocketChat/Rocket.Chat/pull/8048) Invisible leader bar on hover
- [#8019](https://github.com/RocketChat/Rocket.Chat/pull/8019) message-box autogrow
- [#8046](https://github.com/RocketChat/Rocket.Chat/pull/8046) Prevent autotranslate tokens race condition
- [#7998](https://github.com/RocketChat/Rocket.Chat/pull/7998) Recent emojis not updated when adding via text
- [#8017](https://github.com/RocketChat/Rocket.Chat/pull/8017) room icon on header
- [#8018](https://github.com/RocketChat/Rocket.Chat/pull/8018) search results height
- [#7988](https://github.com/RocketChat/Rocket.Chat/pull/7988) Vertical menu on flex-tab
- [#8122](https://github.com/RocketChat/Rocket.Chat/pull/8122) Settings description not showing
- [#8147](https://github.com/RocketChat/Rocket.Chat/pull/8147) "*.members" rest api being useless and only returning usernames
- [#8094](https://github.com/RocketChat/Rocket.Chat/pull/8094) Add admin audio preferences translations
- [#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))
- [#8146](https://github.com/RocketChat/Rocket.Chat/pull/8146) Fix iframe login API response (issue [#8145](https://github.com/RocketChat/Rocket.Chat/issues/8145))
- [#8144](https://github.com/RocketChat/Rocket.Chat/pull/8144) Fix new room sound being played too much
- [#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
- [#8154](https://github.com/RocketChat/Rocket.Chat/pull/8154) Sidebar and RTL alignments
- [#8159](https://github.com/RocketChat/Rocket.Chat/pull/8159) Text area lost text when page reloads
- [#8211](https://github.com/RocketChat/Rocket.Chat/pull/8211) Incorrect URL for login terms when using prefix
- [#8213](https://github.com/RocketChat/Rocket.Chat/pull/8213) Leave and hide buttons was removed
- [#8190](https://github.com/RocketChat/Rocket.Chat/pull/8190) Scrollbar not using new style
- [#8210](https://github.com/RocketChat/Rocket.Chat/pull/8210) User avatar in DM list.
- [#8241](https://github.com/RocketChat/Rocket.Chat/pull/8241) Api groups.files is always returning empty
- [#8216](https://github.com/RocketChat/Rocket.Chat/pull/8216) Case insensitive SAML email check
- [#8259](https://github.com/RocketChat/Rocket.Chat/pull/8259) clipboard and permalink on new popover
- [#8262](https://github.com/RocketChat/Rocket.Chat/pull/8262) make sidebar item animation fast
- [#8261](https://github.com/RocketChat/Rocket.Chat/pull/8261) RTL on reply
- [#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
- [#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
- [#8271](https://github.com/RocketChat/Rocket.Chat/pull/8271) Attachment icons alignment in LTR and RTL
- [#8307](https://github.com/RocketChat/Rocket.Chat/pull/8307) Call buttons with wrong margin on RTL
- [#8295](https://github.com/RocketChat/Rocket.Chat/pull/8295) Check attachments is defined before accessing first element
- [#8300](https://github.com/RocketChat/Rocket.Chat/pull/8300) Emoji Picker hidden for reactions in RTL
- [#8310](https://github.com/RocketChat/Rocket.Chat/pull/8310) Execute meteor reset on TRAVIS_TAG builds
- [#8286](https://github.com/RocketChat/Rocket.Chat/pull/8286) Missing placeholder translations
- [#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))
- [#8269](https://github.com/RocketChat/Rocket.Chat/pull/8269) some placeholder and phrase traslation fix
- [#8298](https://github.com/RocketChat/Rocket.Chat/pull/8298) TypeError: Cannot read property 't' of undefined
- [#8296](https://github.com/RocketChat/Rocket.Chat/pull/8296) Wrong file name when upload to AWS S3
- [#8314](https://github.com/RocketChat/Rocket.Chat/pull/8314) After deleting the room, cache is not synchronizing
- [#8317](https://github.com/RocketChat/Rocket.Chat/pull/8317) Email Subjects not being sent
- [#8316](https://github.com/RocketChat/Rocket.Chat/pull/8316) Mention unread indicator was removed
- [#8315](https://github.com/RocketChat/Rocket.Chat/pull/8315) Put delete action on another popover group
- [#8334](https://github.com/RocketChat/Rocket.Chat/pull/8334) Remove sidebar header on admin embedded version
- [#8357](https://github.com/RocketChat/Rocket.Chat/pull/8357) Missing i18n translations
- [#8358](https://github.com/RocketChat/Rocket.Chat/pull/8358) remove accountBox from admin menu
- [#8372](https://github.com/RocketChat/Rocket.Chat/pull/8372) Various LDAP issues & Missing pagination
- [#8386](https://github.com/RocketChat/Rocket.Chat/pull/8386) disabled katex tooltip on messageBox
- [#8408](https://github.com/RocketChat/Rocket.Chat/pull/8408) Duplicate code in rest api letting in a few bugs with the rest api
- [#8397](https://github.com/RocketChat/Rocket.Chat/pull/8397) Sidebar item menu position in RTL
- [#8390](https://github.com/RocketChat/Rocket.Chat/pull/8390) Slack import failing and not being able to be restarted
- [#8457](https://github.com/RocketChat/Rocket.Chat/pull/8457) LDAP memory issues when pagination is not available
- [#8491](https://github.com/RocketChat/Rocket.Chat/pull/8491) Invalid Code message for password protected channel
- [#8514](https://github.com/RocketChat/Rocket.Chat/pull/8514) Uncessary route reload break some routes
- [#8489](https://github.com/RocketChat/Rocket.Chat/pull/8489) Wrong message when reseting password and 2FA is enabled
- [#8527](https://github.com/RocketChat/Rocket.Chat/pull/8527) Do not send joinCode field to clients
- [#8529](https://github.com/RocketChat/Rocket.Chat/pull/8529) Improve room sync speed
<details>
<summary>Others</summary>
- [#7793](https://github.com/RocketChat/Rocket.Chat/pull/7793) Additions to the REST API
- [#7625](https://github.com/RocketChat/Rocket.Chat/pull/7625) Bump version to 0.59.0-develop
- [#7661](https://github.com/RocketChat/Rocket.Chat/pull/7661) Fix typo in generated URI
- [#7728](https://github.com/RocketChat/Rocket.Chat/pull/7728) FIX: Error when starting local development environment
- [#7803](https://github.com/RocketChat/Rocket.Chat/pull/7803) LingoHub based on develop
- [#2](https://github.com/RocketChat/Rocket.Chat/pull/2) local update
- [#7677](https://github.com/RocketChat/Rocket.Chat/pull/7677) Meteor packages and npm dependencies update
- [#7865](https://github.com/RocketChat/Rocket.Chat/pull/7865) Mobile sidenav
- [#7842](https://github.com/RocketChat/Rocket.Chat/pull/7842) npm deps update
- [#7755](https://github.com/RocketChat/Rocket.Chat/pull/7755) npm deps update
- [#7739](https://github.com/RocketChat/Rocket.Chat/pull/7739) Remove CircleCI
- [#7894](https://github.com/RocketChat/Rocket.Chat/pull/7894) Hide flex-tab close button
- [#8054](https://github.com/RocketChat/Rocket.Chat/pull/8054) Remove unnecessary returns in cors common
- [#8194](https://github.com/RocketChat/Rocket.Chat/pull/8194) Fix more rtl issues
- [#8197](https://github.com/RocketChat/Rocket.Chat/pull/8197) npm deps update
- [#8244](https://github.com/RocketChat/Rocket.Chat/pull/8244) Disable perfect scrollbar
- [#8243](https://github.com/RocketChat/Rocket.Chat/pull/8243) Fix `leave and hide` click, color and position
- [#8253](https://github.com/RocketChat/Rocket.Chat/pull/8253) readme-file: fix broken link
- [#8299](https://github.com/RocketChat/Rocket.Chat/pull/8299) [FIX] Amin menu not showing all items & File list breaking line
- [#8273](https://github.com/RocketChat/Rocket.Chat/pull/8273) Deps update
- [#8282](https://github.com/RocketChat/Rocket.Chat/pull/8282) fix color on unread messages
- [#8331](https://github.com/RocketChat/Rocket.Chat/pull/8331) [FIX-RC] Mobile file upload not working
- [#8355](https://github.com/RocketChat/Rocket.Chat/pull/8355) Update meteor to 1.5.2.2-rc.0
- [#8375](https://github.com/RocketChat/Rocket.Chat/pull/8375) LingoHub based on develop
- [#8345](https://github.com/RocketChat/Rocket.Chat/pull/8345) Remove field `lastActivity` from subscription data
- [#8363](https://github.com/RocketChat/Rocket.Chat/pull/8363) Sync translations from LingoHub
- [#8364](https://github.com/RocketChat/Rocket.Chat/pull/8364) Update Meteor to 1.5.2.2
- [#8394](https://github.com/RocketChat/Rocket.Chat/pull/8394) Add i18n Title to snippet messages
- [#8416](https://github.com/RocketChat/Rocket.Chat/pull/8416) Fix: Account menu position on RTL
- [#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
- [#8451](https://github.com/RocketChat/Rocket.Chat/pull/8451) Improve markdown parser code
- [#8515](https://github.com/RocketChat/Rocket.Chat/pull/8515) Change artifact path
- [#8463](https://github.com/RocketChat/Rocket.Chat/pull/8463) Color variables migration
- [#8490](https://github.com/RocketChat/Rocket.Chat/pull/8490) Enable AutoLinker back
- [#8516](https://github.com/RocketChat/Rocket.Chat/pull/8516) Fix: Change password not working in new UI
- [#8520](https://github.com/RocketChat/Rocket.Chat/pull/8520) Fix high CPU load when sending messages on large rooms (regression)
</details>
<details>
<summary>Details</summary>
## 0.59.0-rc.17 (2017-10-18)
<details>
<summary>Others</summary>
- [#8529](https://github.com/RocketChat/Rocket.Chat/pull/8529) Improve room sync speed
</details>
## 0.59.0-rc.16 (2017-10-18)
### Bug Fixes
- [#8527](https://github.com/RocketChat/Rocket.Chat/pull/8527) Do not send joinCode field to clients
## 0.59.0-rc.15 (2017-10-18)
<details>
<summary>Others</summary>
- [#8520](https://github.com/RocketChat/Rocket.Chat/pull/8520) Fix high CPU load when sending messages on large rooms (regression)
</details>
## 0.59.0-rc.14 (2017-10-17)
### Bug Fixes
- [#8491](https://github.com/RocketChat/Rocket.Chat/pull/8491) Invalid Code message for password protected channel
- [#8514](https://github.com/RocketChat/Rocket.Chat/pull/8514) Uncessary route reload break some routes
- [#8489](https://github.com/RocketChat/Rocket.Chat/pull/8489) Wrong message when reseting password and 2FA is enabled
<details>
<summary>Others</summary>
- [#8515](https://github.com/RocketChat/Rocket.Chat/pull/8515) Change artifact path
- [#8463](https://github.com/RocketChat/Rocket.Chat/pull/8463) Color variables migration
- [#8490](https://github.com/RocketChat/Rocket.Chat/pull/8490) Enable AutoLinker back
- [#8516](https://github.com/RocketChat/Rocket.Chat/pull/8516) Fix: Change password not working in new UI
</details>
## 0.59.0-rc.13 (2017-10-11)
### New Features
- [#8459](https://github.com/RocketChat/Rocket.Chat/pull/8459) Setting to disable MarkDown and enable AutoLinker
### Bug Fixes
- [#8457](https://github.com/RocketChat/Rocket.Chat/pull/8457) LDAP memory issues when pagination is not available
<details>
<summary>Others</summary>
- [#8451](https://github.com/RocketChat/Rocket.Chat/pull/8451) Improve markdown parser code
</details>
## 0.58.4 (2017-10-06)
### Bug Fixes
- [#8389](https://github.com/RocketChat/Rocket.Chat/pull/8389) Add needed dependency for snaps
- [#8408](https://github.com/RocketChat/Rocket.Chat/pull/8408) Duplicate code in rest api letting in a few bugs with the rest api
- [#8390](https://github.com/RocketChat/Rocket.Chat/pull/8390) Slack import failing and not being able to be restarted
## 0.59.0-rc.12 (2017-10-09)
- [#8386](https://github.com/RocketChat/Rocket.Chat/pull/8386) disabled katex tooltip on messageBox
- [#8408](https://github.com/RocketChat/Rocket.Chat/pull/8408) Duplicate code in rest api letting in a few bugs with the rest api
- [#8397](https://github.com/RocketChat/Rocket.Chat/pull/8397) Sidebar item menu position in RTL
- [#8390](https://github.com/RocketChat/Rocket.Chat/pull/8390) Slack import failing and not being able to be restarted
<details>
<summary>Others</summary>
- [#8394](https://github.com/RocketChat/Rocket.Chat/pull/8394) Add i18n Title to snippet messages
- [#8416](https://github.com/RocketChat/Rocket.Chat/pull/8416) Fix: Account menu position on RTL
- [#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
</details>
## 0.59.0-rc.11 (2017-10-03)
### New Features
- [#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
- [#8361](https://github.com/RocketChat/Rocket.Chat/pull/8361) Unify unread and mentions badge
### Bug Fixes
- [#8357](https://github.com/RocketChat/Rocket.Chat/pull/8357) Missing i18n translations
- [#8358](https://github.com/RocketChat/Rocket.Chat/pull/8358) remove accountBox from admin menu
- [#8372](https://github.com/RocketChat/Rocket.Chat/pull/8372) Various LDAP issues & Missing pagination
<details>
<summary>Others</summary>
- [#8375](https://github.com/RocketChat/Rocket.Chat/pull/8375) LingoHub based on develop
- [#8345](https://github.com/RocketChat/Rocket.Chat/pull/8345) Remove field `lastActivity` from subscription data
- [#8363](https://github.com/RocketChat/Rocket.Chat/pull/8363) Sync translations from LingoHub
- [#8364](https://github.com/RocketChat/Rocket.Chat/pull/8364) Update Meteor to 1.5.2.2
</details>
## 0.59.0-rc.10 (2017-09-29)
### Bug Fixes
- [#8314](https://github.com/RocketChat/Rocket.Chat/pull/8314) After deleting the room, cache is not synchronizing
- [#8317](https://github.com/RocketChat/Rocket.Chat/pull/8317) Email Subjects not being sent
- [#8316](https://github.com/RocketChat/Rocket.Chat/pull/8316) Mention unread indicator was removed
- [#8315](https://github.com/RocketChat/Rocket.Chat/pull/8315) Put delete action on another popover group
- [#8334](https://github.com/RocketChat/Rocket.Chat/pull/8334) Remove sidebar header on admin embedded version
<details>
<summary>Others</summary>
- [#8331](https://github.com/RocketChat/Rocket.Chat/pull/8331) [FIX-RC] Mobile file upload not working
- [#8355](https://github.com/RocketChat/Rocket.Chat/pull/8355) Update meteor to 1.5.2.2-rc.0
</details>
## 0.59.0-rc.9 (2017-09-26)
### New Features
- [#8304](https://github.com/RocketChat/Rocket.Chat/pull/8304) Add RD Station integration to livechat
### Bug Fixes
- [#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
- [#8271](https://github.com/RocketChat/Rocket.Chat/pull/8271) Attachment icons alignment in LTR and RTL
- [#8307](https://github.com/RocketChat/Rocket.Chat/pull/8307) Call buttons with wrong margin on RTL
- [#8295](https://github.com/RocketChat/Rocket.Chat/pull/8295) Check attachments is defined before accessing first element
- [#8300](https://github.com/RocketChat/Rocket.Chat/pull/8300) Emoji Picker hidden for reactions in RTL
- [#8310](https://github.com/RocketChat/Rocket.Chat/pull/8310) Execute meteor reset on TRAVIS_TAG builds
- [#8286](https://github.com/RocketChat/Rocket.Chat/pull/8286) Missing placeholder translations
- [#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))
- [#8269](https://github.com/RocketChat/Rocket.Chat/pull/8269) some placeholder and phrase traslation fix
- [#8298](https://github.com/RocketChat/Rocket.Chat/pull/8298) TypeError: Cannot read property 't' of undefined
- [#8296](https://github.com/RocketChat/Rocket.Chat/pull/8296) Wrong file name when upload to AWS S3
<details>
<summary>Others</summary>
- [#8299](https://github.com/RocketChat/Rocket.Chat/pull/8299) [FIX] Amin menu not showing all items & File list breaking line
- [#8273](https://github.com/RocketChat/Rocket.Chat/pull/8273) Deps update
- [#8282](https://github.com/RocketChat/Rocket.Chat/pull/8282) fix color on unread messages
</details>
## 0.59.0-rc.8 (2017-09-23)
### New Features
- [#8260](https://github.com/RocketChat/Rocket.Chat/pull/8260) Enable read only channel creation
### Bug Fixes
- [#8241](https://github.com/RocketChat/Rocket.Chat/pull/8241) Api groups.files is always returning empty
- [#8216](https://github.com/RocketChat/Rocket.Chat/pull/8216) Case insensitive SAML email check
- [#8259](https://github.com/RocketChat/Rocket.Chat/pull/8259) clipboard and permalink on new popover
- [#8262](https://github.com/RocketChat/Rocket.Chat/pull/8262) make sidebar item animation fast
- [#8261](https://github.com/RocketChat/Rocket.Chat/pull/8261) RTL on reply
- [#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
<details>
<summary>Others</summary>
- [#8244](https://github.com/RocketChat/Rocket.Chat/pull/8244) Disable perfect scrollbar
- [#8243](https://github.com/RocketChat/Rocket.Chat/pull/8243) Fix `leave and hide` click, color and position
- [#8253](https://github.com/RocketChat/Rocket.Chat/pull/8253) readme-file: fix broken link
</details>
## 0.59.0-rc.7 (2017-09-20)
### Bug Fixes
- [#8211](https://github.com/RocketChat/Rocket.Chat/pull/8211) Incorrect URL for login terms when using prefix
- [#8213](https://github.com/RocketChat/Rocket.Chat/pull/8213) Leave and hide buttons was removed
- [#8190](https://github.com/RocketChat/Rocket.Chat/pull/8190) Scrollbar not using new style
- [#8210](https://github.com/RocketChat/Rocket.Chat/pull/8210) User avatar in DM list.
<details>
<summary>Others</summary>
- [#8194](https://github.com/RocketChat/Rocket.Chat/pull/8194) Fix more rtl issues
- [#8197](https://github.com/RocketChat/Rocket.Chat/pull/8197) npm deps update
</details>
## 0.59.0-rc.6 (2017-09-18)
### New Features
- [#8073](https://github.com/RocketChat/Rocket.Chat/pull/8073) Upgrade to meteor 1.5.2
### Bug Fixes
- [#8147](https://github.com/RocketChat/Rocket.Chat/pull/8147) "*.members" rest api being useless and only returning usernames
- [#8094](https://github.com/RocketChat/Rocket.Chat/pull/8094) Add admin audio preferences translations
- [#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))
- [#8146](https://github.com/RocketChat/Rocket.Chat/pull/8146) Fix iframe login API response (issue [#8145](https://github.com/RocketChat/Rocket.Chat/issues/8145))
- [#8144](https://github.com/RocketChat/Rocket.Chat/pull/8144) Fix new room sound being played too much
- [#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
- [#8154](https://github.com/RocketChat/Rocket.Chat/pull/8154) Sidebar and RTL alignments
- [#8159](https://github.com/RocketChat/Rocket.Chat/pull/8159) Text area lost text when page reloads
## 0.59.0-rc.5 (2017-09-14)
### Bug Fixes
- [#8101](https://github.com/RocketChat/Rocket.Chat/pull/8101) Dynamic popover
- [#8099](https://github.com/RocketChat/Rocket.Chat/pull/8099) Fix setting user avatar on LDAP login
- [#8059](https://github.com/RocketChat/Rocket.Chat/pull/8059) Not sending email to mentioned users with unchanged preference
- [#8112](https://github.com/RocketChat/Rocket.Chat/pull/8112) RTL
- [#8047](https://github.com/RocketChat/Rocket.Chat/pull/8047) Scroll on messagebox
- [#8122](https://github.com/RocketChat/Rocket.Chat/pull/8122) Settings description not showing
<details>
<summary>Others</summary>
- [#8054](https://github.com/RocketChat/Rocket.Chat/pull/8054) Remove unnecessary returns in cors common
</details>
## 0.59.0-rc.4 (2017-09-05)
### Bug Fixes
- [#8039](https://github.com/RocketChat/Rocket.Chat/pull/8039) copy to clipboard and update clipboard.js library
- [#8001](https://github.com/RocketChat/Rocket.Chat/pull/8001) Error when translating message
- [#7754](https://github.com/RocketChat/Rocket.Chat/pull/7754) Fix email on mention
- [#8014](https://github.com/RocketChat/Rocket.Chat/pull/8014) Hide scrollbar on login page if not necessary
- [#8048](https://github.com/RocketChat/Rocket.Chat/pull/8048) Invisible leader bar on hover
- [#8019](https://github.com/RocketChat/Rocket.Chat/pull/8019) message-box autogrow
- [#8046](https://github.com/RocketChat/Rocket.Chat/pull/8046) Prevent autotranslate tokens race condition
- [#7998](https://github.com/RocketChat/Rocket.Chat/pull/7998) Recent emojis not updated when adding via text
- [#8017](https://github.com/RocketChat/Rocket.Chat/pull/8017) room icon on header
- [#8018](https://github.com/RocketChat/Rocket.Chat/pull/8018) search results height
- [#7988](https://github.com/RocketChat/Rocket.Chat/pull/7988) Vertical menu on flex-tab
## 0.59.0-rc.3 (2017-08-30)
### Bug Fixes
- [#7971](https://github.com/RocketChat/Rocket.Chat/pull/7971) Add padding on messages to allow space to the action buttons
- [#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
- [#7984](https://github.com/RocketChat/Rocket.Chat/pull/7984) Chat box no longer auto-focuses when typing
- [#7942](https://github.com/RocketChat/Rocket.Chat/pull/7942) Create channel button on Firefox
- [#7948](https://github.com/RocketChat/Rocket.Chat/pull/7948) Document README.md. Drupal repo out of date
- [#7927](https://github.com/RocketChat/Rocket.Chat/pull/7927) Double scroll on 'keyboard shortcuts' menu in sidepanel
- [#7945](https://github.com/RocketChat/Rocket.Chat/pull/7945) Fix placeholders in account profile
- [#7963](https://github.com/RocketChat/Rocket.Chat/pull/7963) Fix the status on the members list
- [#7965](https://github.com/RocketChat/Rocket.Chat/pull/7965) Markdown being rendered in code tags
- [#7954](https://github.com/RocketChat/Rocket.Chat/pull/7954) OTR buttons padding
- [#7712](https://github.com/RocketChat/Rocket.Chat/pull/7712) Show leader on first load
- [#7970](https://github.com/RocketChat/Rocket.Chat/pull/7970) Small alignment fixes
- [#7960](https://github.com/RocketChat/Rocket.Chat/pull/7960) status and active room colors on sidebar
- [#7985](https://github.com/RocketChat/Rocket.Chat/pull/7985) Text area buttons and layout on mobile
- [#7986](https://github.com/RocketChat/Rocket.Chat/pull/7986) Textarea on firefox
- [#7953](https://github.com/RocketChat/Rocket.Chat/pull/7953) username ellipsis on firefox
## 0.59.0-rc.2 (2017-08-28)
### Bug Fixes
- [#7912](https://github.com/RocketChat/Rocket.Chat/pull/7912) Fix google play logo on repo README
- [#7904](https://github.com/RocketChat/Rocket.Chat/pull/7904) Fix livechat toggle UI issue
- [#7895](https://github.com/RocketChat/Rocket.Chat/pull/7895) Remove break change in Realtime API
- [#7893](https://github.com/RocketChat/Rocket.Chat/pull/7893) Window exception when parsing Markdown on server
<details>
<summary>Others</summary>
- [#7894](https://github.com/RocketChat/Rocket.Chat/pull/7894) Hide flex-tab close button
</details>
## 0.59.0-rc.1 (2017-08-25)
### Bug Fixes
- [#7885](https://github.com/RocketChat/Rocket.Chat/pull/7885) message actions over unread bar
- [#7883](https://github.com/RocketChat/Rocket.Chat/pull/7883) popover position on mobile
- [#7881](https://github.com/RocketChat/Rocket.Chat/pull/7881) search results position on sidebar
- [#7880](https://github.com/RocketChat/Rocket.Chat/pull/7880) sidebar paddings
## 0.59.0-rc.0 (2017-08-25)
### New Features
- [#7636](https://github.com/RocketChat/Rocket.Chat/pull/7636) Add classes to notification menu so they can be hidden in css
- [#7852](https://github.com/RocketChat/Rocket.Chat/pull/7852) Add markdown parser "marked"
- [#7711](https://github.com/RocketChat/Rocket.Chat/pull/7711) Add room type as a class to the ul-group of rooms
- [#6301](https://github.com/RocketChat/Rocket.Chat/pull/6301) Add tags to uploaded images using Google Cloud Vision API
- [#7658](https://github.com/RocketChat/Rocket.Chat/pull/7658) Add unread options for direct messages
- [#5902](https://github.com/RocketChat/Rocket.Chat/pull/5902) Adds a Keyboard Shortcut option to the flextab
- [#7614](https://github.com/RocketChat/Rocket.Chat/pull/7614) Allow ldap mapping of customFields
- [#7817](https://github.com/RocketChat/Rocket.Chat/pull/7817) Audio Notification updated in sidebar
- [#7350](https://github.com/RocketChat/Rocket.Chat/pull/7350) Automatically select the first channel
- [#7853](https://github.com/RocketChat/Rocket.Chat/pull/7853) Create a standard for svg icons
- [#7342](https://github.com/RocketChat/Rocket.Chat/pull/7342) Integrated personal email gateway (GSoC'17)
- [#7830](https://github.com/RocketChat/Rocket.Chat/pull/7830) Option to block users to mention unknow users
- [#6700](https://github.com/RocketChat/Rocket.Chat/pull/6700) Package to render issue numbers into links to an issue tracker.
- [#7864](https://github.com/RocketChat/Rocket.Chat/pull/7864) Replace message cog for vertical menu
- [#7565](https://github.com/RocketChat/Rocket.Chat/pull/7565) REST API endpoint to list all private groups (permission limited)
- [#7643](https://github.com/RocketChat/Rocket.Chat/pull/7643) Rocket.Chat UI Redesign
- [#7612](https://github.com/RocketChat/Rocket.Chat/pull/7612) Search users by fields defined by admin
- [#7688](https://github.com/RocketChat/Rocket.Chat/pull/7688) Template to show Custom Fields in user info view
### Bug Fixes
- [#7854](https://github.com/RocketChat/Rocket.Chat/pull/7854) Add CSS support for Safari versions > 7
- [#7456](https://github.com/RocketChat/Rocket.Chat/pull/7456) Csv importer: work with more problematic data
- [#7815](https://github.com/RocketChat/Rocket.Chat/pull/7815) Dutch translations
- [#7846](https://github.com/RocketChat/Rocket.Chat/pull/7846) Email message forward error
- [#7673](https://github.com/RocketChat/Rocket.Chat/pull/7673) Example usage of unsubscribe.js
- [#7855](https://github.com/RocketChat/Rocket.Chat/pull/7855) File upload on multi-instances using a path prefix
- [#7656](https://github.com/RocketChat/Rocket.Chat/pull/7656) Fix avatar upload fail on Cordova app
- [#7168](https://github.com/RocketChat/Rocket.Chat/pull/7168) Fix black background on transparent avatars
- [#7814](https://github.com/RocketChat/Rocket.Chat/pull/7814) Fix Dutch translation
- [#7629](https://github.com/RocketChat/Rocket.Chat/pull/7629) Fix messagebox growth
- [#7863](https://github.com/RocketChat/Rocket.Chat/pull/7863) Fix migration 100
- [#7823](https://github.com/RocketChat/Rocket.Chat/pull/7823) Fix new-message button showing on search
- [#7687](https://github.com/RocketChat/Rocket.Chat/pull/7687) Fix room load on first hit
- [#7758](https://github.com/RocketChat/Rocket.Chat/pull/7758) Fixed function closure syntax allowing validation emails to be sent.
- [#7825](https://github.com/RocketChat/Rocket.Chat/pull/7825) Google vision NSFW tag
- [#7679](https://github.com/RocketChat/Rocket.Chat/pull/7679) Make link inside YouTube preview open in new tab
- [#7644](https://github.com/RocketChat/Rocket.Chat/pull/7644) Markdown noopener/noreferrer: use correct HTML attribute
- [#7721](https://github.com/RocketChat/Rocket.Chat/pull/7721) meteor-accounts-saml issue with ns0,ns1 namespaces, makes it compatible with pysaml2 lib
- [#7652](https://github.com/RocketChat/Rocket.Chat/pull/7652) Only use "File Uploaded" prefix on files
- [#7809](https://github.com/RocketChat/Rocket.Chat/pull/7809) Remove redundant "do" in "Are you sure ...?" messages.
- [#7672](https://github.com/RocketChat/Rocket.Chat/pull/7672) Remove references to non-existent tests
- [#7748](https://github.com/RocketChat/Rocket.Chat/pull/7748) scroll on flex-tab
- [#7779](https://github.com/RocketChat/Rocket.Chat/pull/7779) Settings not getting applied from Meteor.settings and process.env
- [#7778](https://github.com/RocketChat/Rocket.Chat/pull/7778) Update Snap links
- [#7639](https://github.com/RocketChat/Rocket.Chat/pull/7639) Wrong email subject when "All Messages" setting enabled
- [#7630](https://github.com/RocketChat/Rocket.Chat/pull/7630) Wrong render of snippet’s name
<details>
<summary>Others</summary>
- [#7793](https://github.com/RocketChat/Rocket.Chat/pull/7793) Additions to the REST API
- [#7625](https://github.com/RocketChat/Rocket.Chat/pull/7625) Bump version to 0.59.0-develop
- [#7661](https://github.com/RocketChat/Rocket.Chat/pull/7661) Fix typo in generated URI
- [#7728](https://github.com/RocketChat/Rocket.Chat/pull/7728) FIX: Error when starting local development environment
- [#7803](https://github.com/RocketChat/Rocket.Chat/pull/7803) LingoHub based on develop
- [#2](https://github.com/RocketChat/Rocket.Chat/pull/2) local update
- [#7677](https://github.com/RocketChat/Rocket.Chat/pull/7677) Meteor packages and npm dependencies update
- [#7865](https://github.com/RocketChat/Rocket.Chat/pull/7865) Mobile sidenav
- [#7842](https://github.com/RocketChat/Rocket.Chat/pull/7842) npm deps update
- [#7755](https://github.com/RocketChat/Rocket.Chat/pull/7755) npm deps update
- [#7739](https://github.com/RocketChat/Rocket.Chat/pull/7739) Remove CircleCI
- [#8420](https://github.com/RocketChat/Rocket.Chat/pull/8420) Merge 0.58.4 to master
</details>
</details>
<a name="0.58.3"></a>
## 0.58.3 (2017-09-27)
- Dependencies update
<a name="0.58.2"></a>
## 0.58.2 (2017-08-23)

@ -2,7 +2,7 @@
# The Ultimate Open Source WebChat Platform
[![Rocket.Chat](https://demo.rocket.chat/images/join-chat.svg)](https://demo.rocket.chat/)
[![Rocket.Chat](https://open.rocket.chat/images/join-chat.svg)](https://open.rocket.chat/)
[![Build Status](https://img.shields.io/travis/RocketChat/Rocket.Chat/master.svg)](https://travis-ci.org/RocketChat/Rocket.Chat)
[![Project Dependencies](https://david-dm.org/RocketChat/Rocket.Chat.svg)](https://david-dm.org/RocketChat/Rocket.Chat)
[![Codacy Badge](https://api.codacy.com/project/badge/grade/8580571ba024426d9649e9ab389bd5dd)](https://www.codacy.com/app/RocketChat/Rocket-Chat)
@ -11,19 +11,19 @@
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://github.com/RocketChat/Rocket.Chat/raw/master/LICENSE)
* [Live Demo](#live-demo)
* [Community](#community)
* [Mobile apps](#mobile-apps)
* [Desktop apps](#desktop-apps)
* [Deployment](#deployment)
* [Snaps](#instant-server-installation-with-snaps)
* [RocketChatLauncher](#launcher)
* [RocketChatLauncher](#rocketchatlauncher)
* [Layershift](#layershift)
* [Sandstorm.io](#sandstormio)
* [Yunohost.org](#yunohostorg)
* [DPlatform](#dplatform)
* [DPlatform](#dplatform)
* [IndieHosters](#indiehosters)
* [Ubuntu 16.04](#ubuntu-1604)
* [Cloudron.io](#cloudronio)
* [Cloudron.io](#cloudronio)
* [Heroku](#heroku)
* [Helm Kubernetes](#helm-kubernetes)
* [Scalingo](#scalingo)
@ -36,6 +36,7 @@
* [Ubuntu VPS](#ubuntu-vps)
* [Hyper.sh](#hypersh)
* [WeDeploy](#wedeploy)
* [D2C.io](#d2cio)
* [About Rocket.Chat](#about-rocketchat)
* [On the News](#on-the-news)
* [Features](#features)
@ -51,39 +52,45 @@
* [Quick Start](#quick-start-for-code-developers)
* [Branching Model](#branching-model)
* [Translations](#translations)
* [Community](#community)
* [How to Contribute](#how-to-contribute)
* [Credits](#credits)
* [Donate](#donate)
# Live Demo
Checkout the latest version at [https://demo.rocket.chat](https://demo.rocket.chat)
# Community
Join thousands of members world-wide 24 x 7 in our [community server](https://open.rocket.chat).
[![Rocket.Chat](https://open.rocket.chat/api/v1/shield.svg?type=channel&name=Rocket.Chat&channel=support)](https://open.rocket.chat/channel/support) for help from our community with general Rocket.Chat questions.
[![Rocket.Chat](https://open.rocket.chat/api/v1/shield.svg?type=channel&name=Rocket.Chat&channel=dev)](https://open.rocket.chat/channel/dev) for developers needing help from the community to developing new features.
You can also join the conversation at [Twitter](https://twitter.com/RocketChat), [Facebook](https://www.facebook.com/RocketChatApp) or [Google Plus](https://plus.google.com/+RocketChatApp).
# Desktop Apps
Download the Native Cross-Platform Desktop Application at [Rocket.Chat.Electron](https://github.com/RocketChat/Rocket.Chat.Electron/releases)
# Native Mobile Apps
# Mobile Apps
## Native Mobile Apps
*Note: currently the native apps doesn't support all the features that web does. If you're looking for it, you should download the Cordova apps.*
[![Rocket.Chat on Apple AppStore](https://user-images.githubusercontent.com/551004/29770691-a2082ff4-8bc6-11e7-89a6-964cd405ea8e.png)](https://itunes.apple.com/us/app/rocket-chat/id1148741252?mt=8) [![Rocket.Chat on Google Play](https://user-images.githubusercontent.com/551004/29770692-a20975c6-8bc6-11e7-8ab0-1cde275496e0.png)](https://play.google.com/store/apps/details?id=chat.rocket.android)
# Hybrid Mobile Apps (Cordova)
## Hybrid Mobile Apps (Cordova)
[![Rocket.Chat on Apple AppStore](https://user-images.githubusercontent.com/551004/29770691-a2082ff4-8bc6-11e7-89a6-964cd405ea8e.png)](https://itunes.apple.com/us/app/rocket.chat/id1028869439?mt=8) [![Rocket.Chat on Google Play](https://user-images.githubusercontent.com/551004/29770692-a20975c6-8bc6-11e7-8ab0-1cde275496e0.png)](https://play.google.com/store/apps/details?id=com.konecty.rocket.chat)
*Now compatible with all Android devices as old as version 4.0.x - [download here](https://rocket.chat/docs/developer-guides/mobile-apps/), even on BlackBerry Passport!*
*Now compatible with all Android devices as old as version 4.0.x - [download here](https://docs.rocket.chat/developer-guides/mobile-apps/), even on BlackBerry Passport!*
### Also available as FirefoxOS app
[![Firefox OS app now available](https://raw.githubusercontent.com/Sing-Li/bbug/master/images/firefoxos.png)](https://rocket.chat/docs/installation/mobile-and-desktop-apps/#native-firefox-os-app)
[![Firefox OS app now available](https://raw.githubusercontent.com/Sing-Li/bbug/master/images/firefoxos.png)](https://docs.rocket.chat/installation/mobile-and-desktop-apps/#native-firefox-os-app).
# Deployment
## Instant Server Installation with Snaps
Install Rocket.Chat in seconds on Linux (Ubuntu and others) with:
```
@ -92,11 +99,11 @@ sudo snap install rocketchat-server
[![Rocket.Chat Snap is recommended for Linux deployments](https://github.com/Sing-Li/bbug/raw/master/images/ubuntulogo.png)](https://uappexplorer.com/snap/ubuntu/rocketchat-server)
Installing snaps is very quick. By running that command you have your full Rocket.Chat server up and running. Snaps are secure. They are isolated with all of their dependencies. Snaps also auto update when we release new versions.
Installing snaps is very quick. By running that command you have your full Rocket.Chat server up and running. Snaps are secure. They are isolated with all of their dependencies. Snaps also auto update when we release new versions.
Our snap features a built-in reverse proxy that can request and maintain free letsencrypt SSL certificates. You can go from zero to a public-facing SSL-secured Rocket.Chat server in less than 5 minutes.
Find out more information about our snaps [here](https://rocket.chat/docs/installation/manual-installation/ubuntu/snaps/)
Find out more information about our snaps [here](https://docs.rocket.chat/installation/manual-installation/ubuntu/snaps/).
## RocketChatLauncher
@ -113,7 +120,7 @@ Instantly deploy your Rocket.Chat server for free on next generation auto-scalin
Painless SSL. Automatically scale your server cluster based on usage demand.
## Sandstorm.io
Host your own Rocket.Chat server in four seconds flat:
Host your own Rocket.Chat server in four seconds flat.
[![Rocket.Chat on Sandstorm.io](https://raw.githubusercontent.com/Sing-Li/bbug/master/images/sandstorm.jpg)](https://apps.sandstorm.io/app/vfnwptfn02ty21w715snyyczw0nqxkv3jvawcah10c6z7hj1hnu0)
@ -124,12 +131,12 @@ Host your own Rocket.Chat server in a few seconds.
## DPlatform
Easiest way to install a ready-to-run Rocket.Chat server on a Linux machine, VM, or VPS
Easiest way to install a ready-to-run Rocket.Chat server on a Linux machine, VM, or VPS.
[![DP deploy](https://raw.githubusercontent.com/DFabric/DPlatform-ShellCore/gh-pages/img/deploy.png)](https://dfabric.github.io/DPlatform-ShellCore)
## IndieHosters
Get your Rocket.Chat instance hosted in a "as a Service" style. You register and we manage it for you! (updates, backup...)
Get your Rocket.Chat instance hosted in a "as a Service" style. You register and we manage it for you! (updates, backup...).
[![Rocket.Chat on IndieHosters](https://indie.host/signup.png)](https://indiehosters.net/shop/product/rocket-chat-21)
@ -149,7 +156,7 @@ Install Rocket.Chat on [Cloudron](https://cloudron.io) Smartserver:
[![Install](https://cloudron.io/img/button.svg)](https://cloudron.io/button.html?app=chat.rocket.cloudronapp)
## Heroku
Host your own Rocket.Chat server for **FREE** with [One-Click Deploy](https://heroku.com/deploy)
Host your own Rocket.Chat server for **FREE** with [One-Click Deploy](https://heroku.com/deploy).
[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy?template=https://github.com/RocketChat/Rocket.Chat/tree/master)
@ -157,24 +164,22 @@ Host your own Rocket.Chat server for **FREE** with [One-Click Deploy](https://he
Deploy on Kubernetes using the official [helm chart](https://github.com/kubernetes/charts/pull/752).
## Scalingo
Deploy your own Rocket.Chat server instantly on [Scalingo](https://scalingo.com)
Deploy your own Rocket.Chat server instantly on [Scalingo](https://scalingo.com).
[![Deploy on Scalingo](https://cdn.scalingo.com/deploy/button.svg)](https://my.scalingo.com/deploy?source=https://github.com/RocketChat/Rocket.Chat#master)
## Sloppy.io
Host your docker container at [sloppy.io](http://sloppy.io). Get an account and use the [quickstarter](https://github.com/sloppyio/quickstarters/tree/master/rocketchat)
Host your docker container at [sloppy.io](http://sloppy.io). Get an account and use the [quickstarter](https://github.com/sloppyio/quickstarters/tree/master/rocketchat).
## Docker
[Deploy with docker compose](https://rocket.chat/docs/installation/docker-containers/docker-compose)
or
Use the automated build image of our [most recent release](https://hub.docker.com/r/rocketchat/rocket.chat/)
[Deploy with docker compose](https://docs.rocket.chat/installation/docker-containers/docker-compose)
[![Rocket.Chat logo](https://d207aa93qlcgug.cloudfront.net/1.95.5.qa/img/nav/docker-logo-loggedout.png)](https://hub.docker.com/r/rocketchat/rocket.chat/)
OR Use the automated build image of our [most recent release](https://hub.docker.com/r/rocketchat/rocket.chat/)
```
docker pull rocketchat/rocket.chat:latest
```
@ -191,42 +196,47 @@ docker pull rocket.chat
```
## FreeBSD
Run solid five-nines deployment on industry workhorse FreeBSD server:
Run solid five-nines deployment on industry workhorse FreeBSD server.
[![FreeBSD Daemon](https://raw.githubusercontent.com/Sing-Li/bbug/master/images/freebsd.png)](https://rocket.chat/docs/installation/manual-installation/freebsd/)
[![FreeBSD Daemon](https://raw.githubusercontent.com/Sing-Li/bbug/master/images/freebsd.png)](https://docs.rocket.chat/installation/manual-installation/freebsd/)
## Windows Server
Deploy on your own enterprise server, or with Microsoft Azure:
Deploy on your own enterprise server, or with Microsoft Azure.
[![Windows 2012 or 2016 Server](https://github.com/Sing-Li/bbug/blob/master/images/windows.png)](https://rocket.chat/docs/installation/manual-installation/windows-server/)
[![Windows 2012 or 2016 Server](https://github.com/Sing-Li/bbug/blob/master/images/windows.png)](https://docs.rocket.chat/installation/manual-installation/windows-server/)
## Ansible
Automated production-grade deployment in minutes, for RHEL / CentOS 7 or Ubuntu 14.04 LTS / 15.04:
Automated production-grade deployment in minutes, for RHEL / CentOS 7 or Ubuntu 14.04 LTS / 15.04.
[![Ansible deployment](https://raw.githubusercontent.com/Sing-Li/bbug/master/images/ansible.png)](https://rocket.chat/docs/installation/automation-tools/ansible/)
[![Ansible deployment](https://raw.githubusercontent.com/Sing-Li/bbug/master/images/ansible.png)](https://docs.rocket.chat/installation/automation-tools/ansible/)
## Raspberry Pi 2
Run Rocket.Chat on this world famous $30 quad core server:
Run Rocket.Chat on this world famous $30 quad core server.
[![Raspberry Pi 2](https://raw.githubusercontent.com/Sing-Li/bbug/master/images/pitiny.png)](https://github.com/RocketChat/Rocket.Chat.RaspberryPi)
## Koozali SME
Add Rocket.Chat to this world famous time tested small enterprise server today:
Add Rocket.Chat to this world famous time tested small enterprise server today.
[![Koozali SME](https://raw.githubusercontent.com/Sing-Li/bbug/master/images/koozali.png)](https://wiki.contribs.org/Rocket_Chat)
## Ubuntu VPS
Follow these [deployment instructions](https://rocket.chat/docs/installation/manual-installation/ubuntu/)
Follow these [deployment instructions](https://docs.rocket.chat/installation/manual-installation/ubuntu/).
## Hyper.sh
Follow their [deployment instructions](https://rocket.chat/docs/installation/paas-deployments/hyper-sh/) to install a per-second billed Rocket.Chat instance on [Hyper.sh](https://rocket.chat/docs/installation/paas-deployments/hyper-sh/)
Follow their [deployment instructions](https://docs.rocket.chat/installation/paas-deployments/hyper-sh/) to install a per-second billed Rocket.Chat instance on [Hyper.sh](https://docs.rocket.chat/installation/paas-deployments/hyper-sh/).
## WeDeploy
Install Rocket.Chat on [WeDeploy](https://wedeploy.com):
[![Install](https://avatars3.githubusercontent.com/u/10002920?v=4&s=100)](https://rocket.chat/docs/installation/paas-deployments/wedeploy/)
[![Install](https://avatars3.githubusercontent.com/u/10002920?v=4&s=100)](https://docs.rocket.chat/installation/paas-deployments/wedeploy/)
## D2C.io
Deploy Rocket.Chat stack to your server with [D2C](https://d2c.io/). Scale with a single click, check live logs and metrics:
[![Deploy](https://github.com/mastappl/images/blob/master/deployTo.png)](https://panel.d2c.io/?import=https://github.com/d2cio/rocketchat-stack/archive/master.zip/)
# About Rocket.Chat
@ -300,7 +310,7 @@ It is a great solution for communities and companies wanting to privately host t
- Multi-users Audio Conference
- Screensharing
- Drupal 7.x and 8.x Plug-in (both stable and development flavours) ([download](https://www.drupal.org/project/rocket_chat) and [source code](https://git.drupal.org/project/rocket_chat.git) )
- XMPP bridge ([try it](https://demo.rocket.chat/channel/general))
- XMPP bridge ([try it](https://open.rocket.chat/channel/general))
- REST APIs
- Remote Locations Video Monitoring
- Native real-time APIs for Microsoft C#, Visual Basic, F# and other .NET supported languages ([Get it!](https://www.nuget.org/packages/Rocket.Chat.Net/0.0.12-pre))
@ -310,7 +320,7 @@ It is a great solution for communities and companies wanting to privately host t
- Native Cross-Platform Desktop Application [Windows, Mac OSX, or Linux](https://rocket.chat/)
- Mobile app for iPhone, iPad, and iPod touch [Download on AppStore!](https://geo.itunes.apple.com/us/app/rocket.chat/id1028869439?mt=8)
- Mobile app for Android phone, tablet, and TV stick [Available now on Google Play!](https://play.google.com/store/apps/details?id=com.konecty.rocket.chat)
- Native Firefox OS Application (also for Desktop Firefox and Firefox for Android!) - [Check the docs page for install instructions](https://rocket.chat/docs/installation/mobile-and-desktop-apps/#native-firefox-os-app)
- Native Firefox OS Application (also for Desktop Firefox and Firefox for Android!) - [Check the docs page for install instructions](https://docs.rocket.chat/installation/mobile-and-desktop-apps/#native-firefox-os-app)
- Sandstorm.io instant Rocket.Chat server [Now on Sandstorm App Store](https://apps.sandstorm.io/app/vfnwptfn02ty21w715snyyczw0nqxkv3jvawcah10c6z7hj1hnu0)
- Available on [Cloudron Store](https://cloudron.io/appstore.html#chat.rocket.cloudronapp)
@ -341,7 +351,7 @@ It is a great solution for communities and companies wanting to privately host t
## How it all started
Read about [how it all started](http://osdelivers.blackducksoftware.com/2016/06/10/rocket-chat-hosted-chat-services/).
Read about [how it all started](https://blog.blackducksoftware.com/rocket-chat-enabling-privately-hosted-chat-services).
## Awards
[![InfoWorld Bossie Awards 2016 - Best Open Source Applications](https://raw.githubusercontent.com/Sing-Li/bbug/master/images/bossie.png)](http://www.infoworld.com/article/3122000/open-source-tools/bossie-awards-2016-the-best-open-source-applications.html#slide4)
@ -379,7 +389,7 @@ We are developing the APIs based on the competition, so stay tuned and you will
## Documentation
Checkout [Rocket.Chat documentation](https://rocket.chat/docs/)
Checkout [Rocket.Chat documentation](https://docs.rocket.chat/).
## License
@ -401,11 +411,11 @@ cd Rocket.Chat
meteor npm start
```
If you are not a developer and just want to run the server - see [deployment methods](https://rocket.chat/docs/installation/paas-deployments/).
If you are not a developer and just want to run the server - see [deployment methods](https://docs.rocket.chat/installation/paas-deployments/).
## Branching Model
See [Branches and Releases](https://rocket.chat/docs/developer-guides/branches-and-releases/).
See [Branches and Releases](https://docs.rocket.chat/developer-guides/branches-and-releases/).
It is based on [Gitflow Workflow](http://nvie.com/posts/a-successful-git-branching-model/), reference section below is derived from Vincent Driessen at nvie.
@ -415,10 +425,6 @@ See also this [Git Workflows Comparison](https://www.atlassian.com/git/tutorials
We are experimenting [Lingohub](https://translate.lingohub.com/engelgabriel/rocket-dot-chat/dashboard).
If you want to help, send an email to support at rocket.chat to be invited to the translation project.
## Community
Join thousands of members world-wide 24 x 7 in our [community server](https://demo.rocket.chat). Join the conversation at [Twitter](https://twitter.com/RocketChatApp), [Facebook](https://www.facebook.com/RocketChatApp) or [Google Plus](https://plus.google.com/+RocketChatApp)
## How to Contribute
Already a JavaScript developer? Familiar with Meteor? [Pick an issue](https://github.com/RocketChat/Rocket.Chat/labels/contrib%3A%20easy), push a PR and instantly become a member of Rocket.Chat's international contributors community.

@ -1,4 +1,7 @@
import _ from 'underscore';
import s from 'underscore.string';
import toastr from 'toastr';
this.handleError = function(error, useToastr = true) {
if (_.isObject(error.details)) {
for (const key in error.details) {
@ -9,8 +12,8 @@ this.handleError = function(error, useToastr = true) {
}
if (useToastr) {
return toastr.error(_.escapeHTML(TAPi18n.__(error.error, error.details)), error.details && error.details.errorTitle ? _.escapeHTML(TAPi18n.__(error.details.errorTitle)) : null);
return toastr.error(s.escapeHTML(TAPi18n.__(error.error, error.details)), error.details && error.details.errorTitle ? s.escapeHTML(TAPi18n.__(error.details.errorTitle)) : null);
}
return _.escapeHTML(TAPi18n.__(error.error, error.details));
return s.escapeHTML(TAPi18n.__(error.error, error.details));
};

@ -1,3 +1,4 @@
import _ from 'underscore';
import moment from 'moment';
Meteor.methods({

@ -1,3 +1,4 @@
import _ from 'underscore';
import moment from 'moment';
import toastr from 'toastr';

@ -1,9 +1,21 @@
/* globals KonchatNotification, fireGlobalEvent, readMessage */
/* globals KonchatNotification, fireGlobalEvent, readMessage, CachedChatSubscription */
// Show notifications and play a sound for new messages.
// We trust the server to only send notifications for interesting messages, e.g. direct messages or
// group messages in which the user is mentioned.
function notifyNewRoom(sub) {
// Do not play new room sound if user is busy
if (Session.equals(`user_${ Meteor.userId() }_status`, 'busy')) {
return;
}
if ((!FlowRouter.getParam('name') || FlowRouter.getParam('name') !== sub.name) && !sub.ls && sub.alert === true) {
return KonchatNotification.newRoom(sub.rid);
}
}
Meteor.startup(function() {
Tracker.autorun(function() {
if (Meteor.userId()) {
@ -55,6 +67,16 @@ Meteor.startup(function() {
KonchatNotification.newMessage(notification.payload.rid);
}
});
CachedChatSubscription.onSyncData = function(action, sub) {
if (action !== 'removed') {
notifyNewRoom(sub);
}
};
RocketChat.Notifications.onUser('subscriptions-changed', (action, sub) => {
notifyNewRoom(sub);
});
}
});
});

@ -1,4 +1,5 @@
/* globals KonchatNotification */
import s from 'underscore.string';
Blaze.registerHelper('pathFor', function(path, kw) {
return FlowRouter.path(path, kw.hash);
@ -75,7 +76,7 @@ FlowRouter.route('/account/:group?', {
if (!params.group) {
params.group = 'Preferences';
}
params.group = _.capitalize(params.group, true);
params.group = s.capitalize(params.group, true);
BlazeLayout.render('main', { center: `account${ params.group }` });
},
triggersExit: [function() {

@ -17,8 +17,20 @@ if (window.DISABLE_ANIMATION) {
Meteor.startup(function() {
TimeSync.loggingEnabled = false;
UserPresence.awayTime = 300000;
UserPresence.start();
const userHasPreferences = (user) => {
if (!user) {
return false;
}
const userHasSettings = user.hasOwnProperty('settings');
if (!userHasSettings) {
return false;
}
return user.settings.hasOwnProperty('preferences');
};
Meteor.subscribe('activeUsers');
Session.setDefault('AvatarRandom', 0);
@ -79,8 +91,24 @@ Meteor.startup(function() {
}
};
const defaultIdleTimeLimit = 300000;
Meteor.subscribe('userData', function() {
const userLanguage = Meteor.user() && Meteor.user().language ? Meteor.user().language : window.defaultUserLanguage();
const user = Meteor.user();
const userLanguage = user && user.language ? user.language : window.defaultUserLanguage();
if (!userHasPreferences(user)) {
UserPresence.awayTime = defaultIdleTimeLimit;
UserPresence.start();
} else {
UserPresence.awayTime = user.settings.preferences.idleTimeLimit || defaultIdleTimeLimit;
if (user.settings.preferences.hasOwnProperty('enableAutoAway')) {
user.settings.preferences.enableAutoAway && UserPresence.start();
} else {
UserPresence.start();
}
}
if (localStorage.getItem('userLanguage') !== userLanguage) {
localStorage.setItem('userLanguage', userLanguage);
@ -94,8 +122,8 @@ Meteor.startup(function() {
return;
}
if (Meteor.user() && Meteor.user().status !== status) {
status = Meteor.user().status;
if (user && user.status !== status) {
status = user.status;
fireGlobalEvent('status-changed', status);
}
});

@ -32,7 +32,7 @@ Meteor.startup(function() {
// Increment the total unread count.
unreadCount += subscription.unread;
if (subscription.alert === true && subscription.unreadAlert !== 'nothing') {
const userUnreadAlert = Meteor.user() && Meteor.user().settings && Meteor.user().settings.preferences && Meteor.user().settings.preferences.unreadAlert;
const userUnreadAlert = RocketChat.getUserPreference(Meteor.user(), 'unreadAlert');
if (subscription.unreadAlert === 'all' || userUnreadAlert !== false) {
unreadAlert = '•';
}

@ -3,7 +3,7 @@ set -x
set -euvo pipefail
IFS=$'\n\t'
# Requies Node.js version 4.x
# Requires Node.js version 4.x
# Do not run as root
DEPLOY_DIR=/var/www/rocket.chat

@ -10,8 +10,8 @@
"env": {
"MONGO_URL": "mongodb://localhost:27017/rocketchat",
"MONGO_OPLOG_URL": "mongodb://localhost:27017/local",
"ROOT_URL": "https://demo.rocket.chat",
"DDP_DEFAULT_CONNECTION_URL": "https://demo.rocket.chat",
"ROOT_URL": "https://open.rocket.chat",
"DDP_DEFAULT_CONNECTION_URL": "https://open.rocket.chat",
"PORT": "8080"
}
}, {
@ -25,8 +25,8 @@
"env": {
"MONGO_URL": "mongodb://localhost:27017/rocketchat",
"MONGO_OPLOG_URL": "mongodb://localhost:27017/local",
"ROOT_URL": "https://demo.rocket.chat",
"DDP_DEFAULT_CONNECTION_URL": "https://demo.rocket.chat",
"ROOT_URL": "https://open.rocket.chat",
"DDP_DEFAULT_CONNECTION_URL": "https://open.rocket.chat",
"PORT": "8081"
}
}, {
@ -40,8 +40,8 @@
"env": {
"MONGO_URL": "mongodb://localhost:27017/rocketchat",
"MONGO_OPLOG_URL": "mongodb://localhost:27017/local",
"ROOT_URL": "https://demo.rocket.chat",
"DDP_DEFAULT_CONNECTION_URL": "https://demo.rocket.chat",
"ROOT_URL": "https://open.rocket.chat",
"DDP_DEFAULT_CONNECTION_URL": "https://open.rocket.chat",
"PORT": "8082"
}
}, {
@ -55,8 +55,8 @@
"env": {
"MONGO_URL": "mongodb://localhost:27017/rocketchat",
"MONGO_OPLOG_URL": "mongodb://localhost:27017/local",
"ROOT_URL": "https://demo.rocket.chat",
"DDP_DEFAULT_CONNECTION_URL": "https://demo.rocket.chat",
"ROOT_URL": "https://open.rocket.chat",
"DDP_DEFAULT_CONNECTION_URL": "https://open.rocket.chat",
"PORT": "8083"
}
}]

@ -1,16 +0,0 @@
/* globals mixin */
// This will add underscore.string methods to Underscore.js
// except for include, contains, reverse and join that are
// dropped because they collide with the functions already
// defined by Underscore.js.
mixin = function(obj) {
_.each(_.functions(obj), function(name) {
if (!_[name] && !_.prototype[name]) {
_[name] = obj[name];
}
});
};
mixin(s.exports());

@ -1,6 +1,6 @@
Example configuration fragment for front-end nginx with round-robin multiple Rocket.Chat instances
upstream demo.rocket.chat {
upstream open.rocket.chat {
server localhost:8080 weight=1;
server localhost:8081 weight=1;
server localhost:8082 weight=1;
@ -10,18 +10,18 @@ upstream demo.rocket.chat {
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
server_name demo.rocket.chat;
return 301 https://demo.rocket.chat$request_uri;
server_name open.rocket.chat;
return 301 https://open.rocket.chat$request_uri;
}
server {
listen 443 default_server;
listen [::]:443 default_server ipv6only=on;
server_name demo.rocket.chat;
server_name open.rocket.chat;
root /var/www/rocket.chat/bundle/programs/web.browser/app/;
ssl on;
ssl_certificate /var/www/rocket.chat/ssl/demo/demo.rocket.chat.chained.crt;
ssl_certificate_key /var/www/rocket.chat/ssl/demo/demo.rocket.chat.key;
ssl_certificate /var/www/rocket.chat/ssl/demo/open.rocket.chat.chained.crt;
ssl_certificate_key /var/www/rocket.chat/ssl/demo/open.rocket.chat.key;
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
ssl_prefer_server_ciphers on;
ssl_dhparam /etc/nginx/dhparams.pem;
@ -40,6 +40,6 @@ server {
proxy_set_header X-Nginx-Proxy true;
proxy_redirect off;
location / {
proxy_pass http://demo.rocket.chat;
proxy_pass http://open.rocket.chat;
}
}

11646
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -1,7 +1,7 @@
{
"name": "Rocket.Chat",
"description": "The Ultimate Open Source WebChat Platform",
"version": "0.59.0-develop",
"version": "0.60.0-develop",
"author": {
"name": "Rocket.Chat",
"url": "https://rocket.chat/"
@ -86,43 +86,50 @@
"email": "support@rocket.chat"
},
"devDependencies": {
"autoprefixer": "^7.1.6",
"babel-mocha-es6-compiler": "^0.1.0",
"babel-plugin-array-includes": "^2.0.3",
"chimp": "^0.50.0",
"conventional-changelog-cli": "^1.3.3",
"eslint": "^4.6.1",
"chimp": "^0.50.2",
"conventional-changelog-cli": "^1.3.4",
"eslint": "^4.10.0",
"mock-require": "^2.0.2",
"postcss-cssnext": "^2.11.0",
"postcss-smart-import": "^0.7.5",
"postcss-custom-properties": "^6.2.0",
"postcss-import": "^11.0.0",
"postcss-media-minmax": "^3.0.0",
"postcss-nesting": "^3.0.0",
"postcss-selector-not": "^3.0.1",
"proxyquire": "^1.8.0",
"simple-git": "^1.77.0",
"stylelint": "^8.1.1",
"stylelint-order": "^0.6.0",
"supertest": "^3.0.0",
"underscore": "^1.8.3",
"underscore.string": "^3.3.4"
"simple-git": "^1.80.1",
"stylelint": "^8.2.0",
"stylelint-order": "^0.7.0",
"supertest": "^3.0.0"
},
"dependencies": {
"@google-cloud/storage": "^1.2.1",
"aws-sdk": "^2.111.0",
"@google-cloud/storage": "^1.4.0",
"aws-sdk": "^2.146.0",
"babel-runtime": "^6.26.0",
"bcrypt": "^1.0.3",
"codemirror": "^5.29.0",
"bunyan": "^1.8.12",
"codemirror": "^5.31.0",
"core-js": "2.5.1",
"emailreplyparser": "0.0.5",
"file-type": "^6.1.0",
"file-type": "^7.2.0",
"highlight.js": "^9.12.0",
"imap": "^0.8.19",
"jquery": "^3.2.1",
"ldapjs": "^1.0.1",
"mailparser-node4": "^2.0.2-2",
"mime-db": "^1.30.0",
"mime-db": "^1.31.0",
"mime-type": "^3.0.5",
"moment": "^2.18.1",
"moment-timezone": "^0.5.13",
"moment": "^2.19.3",
"moment-timezone": "^0.5.14",
"photoswipe": "^4.1.2",
"poplib": "^0.1.7",
"prom-client": "^10.1.0",
"prom-client": "^10.2.2",
"semver": "^5.4.1",
"toastr": "^2.1.2",
"wolfy87-eventemitter": "^5.2.2"
"underscore": "^1.8.3",
"underscore.string": "^3.3.4",
"wolfy87-eventemitter": "^5.2.3"
}
}

@ -128,7 +128,7 @@ Autoupdate._retrySubscription = function () {
newLink.setAttribute("rel", "stylesheet");
newLink.setAttribute("type", "text/css");
newLink.setAttribute("class", "__meteor-css__");
newLink.setAttribute("href", Meteor._relativeToSiteRootUrl(css.url));
newLink.setAttribute("href", css.url);
attachStylesheetLink(newLink);
});
} else {

@ -16,8 +16,7 @@ Package.onUse(function (api) {
api.use([
'ddp',
'mongo',
'underscore'
'mongo'
], ['client', 'server']);
api.use(['http', 'random'], 'web.cordova');

@ -1,139 +1,115 @@
{
"lockfileVersion": 1,
"dependencies": {
"async": {
"version": "0.2.10",
"resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz",
"from": "async@>=0.2.7 <0.3.0"
},
"buffer-crc32": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.1.tgz",
"from": "buffer-crc32@0.2.1"
"integrity": "sha1-vj5TgvwCttYySVasGvmKqYsIU0w="
},
"bytes": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-0.2.0.tgz",
"from": "bytes@0.2.0"
"integrity": "sha1-qtM+wU49wsp06OfUUfm6BTrU96A="
},
"connect": {
"version": "2.7.10",
"resolved": "https://registry.npmjs.org/connect/-/connect-2.7.10.tgz",
"from": "connect@2.7.10"
"integrity": "sha1-oKxZRk1lJAedsCyXFRx5XBtN7mQ="
},
"cookie": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.0.5.tgz",
"from": "cookie@0.0.5"
"integrity": "sha1-+az521frdWjJ/MWWJWt7si4wfIE="
},
"cookie-signature": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.1.tgz",
"from": "cookie-signature@1.0.1"
"integrity": "sha1-ROByFIrwHm6OJK+/EmkNaK5pjss="
},
"debug": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
"from": "debug@*"
},
"ejs": {
"version": "0.8.8",
"resolved": "https://registry.npmjs.org/ejs/-/ejs-0.8.8.tgz",
"from": "ejs@>=0.8.3 <0.9.0"
"integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo="
},
"formidable": {
"version": "1.0.14",
"resolved": "https://registry.npmjs.org/formidable/-/formidable-1.0.14.tgz",
"from": "formidable@1.0.14"
"integrity": "sha1-Kz9MQRy7X91pXESEPiojUUpDIxo="
},
"fresh": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.1.0.tgz",
"from": "fresh@0.1.0"
"integrity": "sha1-A+SwF4Qk5MLV0ZpU2IFM3JeTSFA="
},
"lodash": {
"version": "3.10.1",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
"from": "lodash@>=3.5.0 <4.0.0"
"integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y="
},
"mime": {
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.2.6.tgz",
"from": "mime@1.2.6"
"integrity": "sha1-sfhsdowCX6h7SAdfFwnyiuryA2U="
},
"ms": {
"version": "0.7.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
"from": "ms@0.7.1"
},
"node-forge": {
"version": "0.2.24",
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.2.24.tgz",
"from": "node-forge@0.2.24"
"integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg="
},
"pause": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz",
"from": "pause@0.0.1"
"integrity": "sha1-HUCLP9t2kjuVQ9lvtMnf1TXZy10="
},
"qs": {
"version": "0.6.5",
"resolved": "https://registry.npmjs.org/qs/-/qs-0.6.5.tgz",
"from": "qs@0.6.5"
"integrity": "sha1-KUsmjksNQlD23eGbO4s0k13/FO8="
},
"querystring": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
"from": "querystring@0.2.0"
"integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA="
},
"range-parser": {
"version": "0.0.4",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-0.0.4.tgz",
"from": "range-parser@0.0.4"
"integrity": "sha1-wEJ//vUcEKy6B4KkbJYC50T/Ygs="
},
"sax": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz",
"from": "sax@>=0.1.1"
"integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o="
},
"send": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/send/-/send-0.1.0.tgz",
"from": "send@0.1.0"
"integrity": "sha1-z7COvTzsm3/Bo32f+eh1qXHPRkA="
},
"xml-crypto": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/xml-crypto/-/xml-crypto-0.6.0.tgz",
"from": "xml-crypto@0.6.0"
},
"xml-encryption": {
"version": "0.7.2",
"resolved": "https://registry.npmjs.org/xml-encryption/-/xml-encryption-0.7.2.tgz",
"from": "xml-encryption@0.7.2"
"integrity": "sha1-RSKeACjLPultxTP6M4DCvzuGrbg="
},
"xml2js": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.2.0.tgz",
"from": "xml2js@0.2.0"
"integrity": "sha1-99pSJ33rtkeYMFOtti2XLe5loaw="
},
"xmlbuilder": {
"version": "2.6.4",
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-2.6.4.tgz",
"from": "xmlbuilder@2.6.4"
"integrity": "sha1-gSOsFXbZxmkY9BBJbx/p8Ci4yj4="
},
"xmldom": {
"version": "0.1.19",
"resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.19.tgz",
"from": "xmldom@0.1.19"
},
"xpath": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.5.tgz",
"from": "xpath@0.0.5"
"integrity": "sha1-Yx/Ad3bv2EEYvyUXGzftTQdaCrw="
},
"xpath.js": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/xpath.js/-/xpath.js-1.0.6.tgz",
"from": "xpath.js@>=0.0.3"
"integrity": "sha1-/kuBwbFS69jhOVJl/txbAPyim5A="
}
}
}

@ -8,7 +8,7 @@ Package.describe({
Package.on_use(function(api) {
api.use('rocketchat:lib', 'server');
api.use('ecmascript');
api.use(['routepolicy', 'webapp', 'underscore', 'service-configuration'], 'server');
api.use(['routepolicy', 'webapp', 'service-configuration'], 'server');
api.use(['http', 'accounts-base'], ['client', 'server']);
api.add_files(['saml_server.js', 'saml_utils.js'], 'server');

@ -1,5 +1,6 @@
/* globals RoutePolicy, SAML */
/* jshint newcap: false */
import _ from 'underscore';
if (!Accounts.saml) {
Accounts.saml = {
@ -102,8 +103,10 @@ Accounts.registerLoginHandler(function(loginRequest) {
}
if (loginResult && loginResult.profile && loginResult.profile.email) {
const email = RegExp.escape(loginResult.profile.email);
const emailRegex = new RegExp(`^${ email }$`, 'i');
let user = Meteor.users.findOne({
'emails.address': loginResult.profile.email
'emails.address': emailRegex
});
if (!user) {

@ -1,4 +1,5 @@
/* globals Deps, getCaretCoordinates*/
import _ from 'underscore';
import AutoCompleteRecords from './collection';
const isServerSearch = function(rule) {

@ -1,4 +1,6 @@
/* globals AutoComplete */
import _ from 'underscore';
// Events on template instances, sent to the autocomplete class
const acEvents = {
'keydown'(e, t) {

@ -7,7 +7,7 @@ Package.describe({
Package.onUse(function(api) {
api.use(['blaze', 'templating', 'jquery'], 'client');
api.use(['underscore', 'ecmascript']); // both
api.use(['ecmascript']); // both
api.use(['mongo', 'ddp']);
api.use('dandv:caret-position@2.1.0-3', 'client');

@ -1,8 +1,8 @@
Package.describe({
name: "mizzao:timesync",
summary: "NTP-style time synchronization between server and client",
version: "0.3.4",
git: "https://github.com/mizzao/meteor-timesync.git"
name: 'mizzao:timesync',
summary: 'NTP-style time synchronization between server and client',
version: '0.3.4',
git: 'https://github.com/mizzao/meteor-timesync.git'
});
Package.onUse(function (api) {
@ -15,8 +15,8 @@ Package.onUse(function (api) {
api.use('webapp', 'server');
// Our files
api.addFiles('timesync-server.js', 'server');
api.addFiles('timesync-client.js', 'client');
api.addFiles('server/timesync-server.js', 'server');
api.addFiles('client/timesync-client.js', 'client');
api.export('TimeSync', 'client');
api.export('SyncInternals', 'client', {testOnly: true} );
@ -28,9 +28,9 @@ Package.onTest(function (api) {
'test-helpers'
]);
api.use(["tracker", "underscore"], 'client');
api.use(['tracker'], 'client');
api.use("mizzao:timesync");
api.use('mizzao:timesync');
api.addFiles('tests/client.js', 'client');
});

@ -1,19 +1,20 @@
{
"lockfileVersion": 1,
"dependencies": {
"base32.js": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/base32.js/-/base32.js-0.0.1.tgz",
"from": "base32.js@0.0.1"
"integrity": "sha1-0EVzalex9sE58MffQlGKhOkbsro="
},
"speakeasy": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/speakeasy/-/speakeasy-2.0.0.tgz",
"from": "speakeasy@2.0.0"
"integrity": "sha1-hckaBxsJpcuGQlkNmDVmFl9XYTo="
},
"yaqrcode": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/yaqrcode/-/yaqrcode-0.2.1.tgz",
"from": "yaqrcode@0.2.1"
"integrity": "sha1-7xyzMgNJ9rO7MctoCjeouBS9itc="
}
}
}

@ -45,7 +45,7 @@ Meteor.loginWithPassword = function(email, password, cb) {
return cb(error);
}
swal({
modal.open({
title: t('Two-factor_authentication'),
text: t('Open_your_authentication_app_and_enter_the_code'),
type: 'input',

@ -26,6 +26,7 @@
<button class="button primary enable-2fa">{{_ "Enable_two-factor_authentication"}}</button>
{{else}}
<p>{{_ "Scan_QR_code"}}</p>
<p>{{_ "Scan_QR_code_alternative_s" code=imageSecret}}</p>
<img src="{{imageData}}">

@ -10,6 +10,9 @@ Template.accountSecurity.helpers({
imageData() {
return Template.instance().imageData.get();
},
imageSecret() {
return Template.instance().imageSecret.get();
},
isEnabled() {
const user = Meteor.user();
return user && user.services && user.services.totp && user.services.totp.enabled;
@ -27,6 +30,7 @@ Template.accountSecurity.helpers({
Template.accountSecurity.events({
'click .enable-2fa'(event, instance) {
Meteor.call('2fa:enable', (error, result) => {
instance.imageSecret.set(result.secret);
instance.imageData.set(qrcode(result.url, { size: 200 }));
instance.state.set('registering');
@ -38,7 +42,7 @@ Template.accountSecurity.events({
},
'click .disable-2fa'() {
swal({
modal.open({
title: t('Two-factor_authentication'),
text: t('Open_your_authentication_app_and_enter_the_code'),
type: 'input',
@ -60,7 +64,7 @@ Template.accountSecurity.events({
if (result) {
toastr.success(t('Two-factor_authentication_disabled'));
} else {
return toastr.error(t('Invalid_two_factor_code'));
toastr.error(t('Invalid_two_factor_code'));
}
});
});
@ -83,7 +87,7 @@ Template.accountSecurity.events({
},
'click .regenerate-codes'(event, instance) {
swal({
modal.open({
title: t('Two-factor_authentication'),
text: t('Open_your_authentication_app_and_enter_the_code'),
type: 'input',
@ -105,7 +109,7 @@ Template.accountSecurity.events({
if (result) {
instance.showBackupCodes(result.codes);
} else {
return toastr.error(t('Invalid_two_factor_code'));
toastr.error(t('Invalid_two_factor_code'));
}
});
});
@ -115,6 +119,7 @@ Template.accountSecurity.events({
Template.accountSecurity.onCreated(function() {
this.showImage = new ReactiveVar(false);
this.imageData = new ReactiveVar();
this.imageSecret = new ReactiveVar();
this.state = new ReactiveVar();
@ -125,7 +130,7 @@ Template.accountSecurity.onCreated(function() {
return (index + 1) % 4 === 0 && index < 11 ? `${ value }\n` : `${ value } `;
}).join('');
const codes = `<code class="text-center allow-text-selection">${ backupCodes }</code>`;
swal({
modal.open({
title: t('Backup_codes'),
text: `${ t('Make_sure_you_have_a_copy_of_your_codes', { codes }) }`,
html: true

@ -11,6 +11,7 @@ Meteor.methods({
RocketChat.models.Users.disable2FAAndSetTempSecretByUserId(Meteor.userId(), secret.base32);
return {
secret: secret.base32,
url: RocketChat.TOTP.generateOtpauthURL(secret, user.username)
};
}

@ -38,10 +38,18 @@ Template.body.onRendered(() => {
window._paq.push(['setDomains', domains]);
}
(() => {
const addTrackers = JSON.parse(piwikAdditionalTracker);
for (let i = 0; i < addTrackers.length; i++) {
const tracker = addTrackers[i];
window._paq.push(['addTracker', `${ tracker['trackerURL'] }piwik.php`, tracker['siteId']]);
try {
if (/\S/.test(piwikAdditionalTracker)) {
// piwikAdditionalTracker is not empty or whitespace only
const addTrackers = JSON.parse(piwikAdditionalTracker);
for (let i = 0; i < addTrackers.length; i++) {
const tracker = addTrackers[i];
window._paq.push(['addTracker', `${ tracker['trackerURL'] }piwik.php`, tracker['siteId']]);
}
}
} catch (e) {
// parsing JSON faild
console.log('Error while parsing JSON value of "piwikAdditionalTracker": ', e);
}
window._paq.push(['setTrackerUrl', `${ piwikUrl }piwik.php`]);
window._paq.push(['setSiteId', Number.parseInt(piwikSiteId)]);

@ -1,44 +1,45 @@
{
"lockfileVersion": 1,
"dependencies": {
"busboy": {
"version": "0.2.13",
"resolved": "https://registry.npmjs.org/busboy/-/busboy-0.2.13.tgz",
"from": "busboy@0.2.13"
"integrity": "sha1-kPxPajln2BVhb8l2v6jlau0MWLY="
},
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"from": "core-util-is@>=1.0.0 <1.1.0"
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"dicer": {
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/dicer/-/dicer-0.2.5.tgz",
"from": "dicer@0.2.5"
"integrity": "sha1-WZbAhrszIYyBLAkL3cCc0S+stw8="
},
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"from": "inherits@>=2.0.1 <2.1.0"
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"isarray": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
"from": "isarray@0.0.1"
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"readable-stream": {
"version": "1.1.14",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
"from": "readable-stream@>=1.1.0 <1.2.0"
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk="
},
"streamsearch": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz",
"from": "streamsearch@0.1.2"
"integrity": "sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo="
},
"string_decoder": {
"version": "0.10.31",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
"from": "string_decoder@>=0.10.0 <0.11.0"
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
}
}
}

@ -7,7 +7,6 @@ Package.describe({
Package.onUse(function(api) {
api.use([
'underscore',
'ecmascript',
'rocketchat:lib',
'nimble:restivus'
@ -33,11 +32,15 @@ Package.onUse(function(api) {
//Add v1 routes
api.addFiles('server/v1/channels.js', 'server');
api.addFiles('server/v1/rooms.js', 'server');
api.addFiles('server/v1/subscriptions.js', 'server');
api.addFiles('server/v1/chat.js', 'server');
api.addFiles('server/v1/commands.js', 'server');
api.addFiles('server/v1/groups.js', 'server');
api.addFiles('server/v1/im.js', 'server');
api.addFiles('server/v1/integrations.js', 'server');
api.addFiles('server/v1/misc.js', 'server');
api.addFiles('server/v1/push.js', 'server');
api.addFiles('server/v1/settings.js', 'server');
api.addFiles('server/v1/stats.js', 'server');
api.addFiles('server/v1/users.js', 'server');

@ -1,18 +1,38 @@
/* global Restivus */
/* global Restivus, DDP, DDPCommon */
import _ from 'underscore';
class API extends Restivus {
constructor(properties) {
super(properties);
this.logger = new Logger(`API ${ properties.version ? properties.version : 'default' } Logger`, {});
this.authMethods = [];
this.helperMethods = new Map();
this.fieldSeparator = '.';
this.defaultFieldsToExclude = {
joinCode: 0,
$loki: 0,
meta: 0,
members: 0
members: 0,
usernames: 0, // Please use the `channel/dm/group.members` endpoint. This is disabled for performance reasons
importIds: 0
};
this.limitedUserFieldsToExclude = {
avatarOrigin: 0,
emails: 0,
phone: 0,
statusConnection: 0,
createdAt: 0,
lastLogin: 0,
services: 0,
requirePasswordChange: 0,
requirePasswordChangeReason: 0,
roles: 0,
statusDefault: 0,
_updatedAt: 0,
customFields: 0
};
this._config.defaultOptionsEndpoint = function() {
this._config.defaultOptionsEndpoint = function _defaultOptionsEndpoint() {
if (this.request.method === 'OPTIONS' && this.request.headers['access-control-request-method']) {
if (RocketChat.settings.get('API_Enable_CORS') === true) {
this.response.writeHead(200, {
@ -35,9 +55,11 @@ class API extends Restivus {
this.authMethods.push(method);
}
success(result={}) {
success(result = {}) {
if (_.isObject(result)) {
result.success = true;
// TODO: Remove this after three versions have been released. That means at 0.64 this should be gone. ;)
result.developerWarning = '[WARNING]: The "usernames" field has been removed for performance reasons. Please use the "*.members" endpoint to get a list of members/users in a room.';
}
return {
@ -77,6 +99,16 @@ class API extends Restivus {
};
}
notFound(msg) {
return {
statusCode: 404,
body: {
success: false,
error: msg ? msg : 'Nothing was found'
}
};
}
addRoute(routes, options, endpoints) {
//Note: required if the developer didn't provide options
if (typeof endpoints === 'undefined') {
@ -94,7 +126,7 @@ class API extends Restivus {
if (this.helperMethods) {
Object.keys(endpoints).forEach((method) => {
if (typeof endpoints[method] === 'function') {
endpoints[method] = { action: endpoints[method] };
endpoints[method] = {action: endpoints[method]};
}
//Add a try/catch for each endpoint
@ -124,8 +156,169 @@ class API extends Restivus {
super.addRoute(route, options, endpoints);
});
}
_initAuth() {
const loginCompatibility = (bodyParams) => {
// Grab the username or email that the user is logging in with
const {user, username, email, password, code} = bodyParams;
const auth = {
password
};
if (typeof user === 'string') {
auth.user = user.includes('@') ? {email: user} : {username: user};
} else if (username) {
auth.user = {username};
} else if (email) {
auth.user = {email};
}
if (auth.user == null) {
return bodyParams;
}
if (auth.password && auth.password.hashed) {
auth.password = {
digest: auth.password,
algorithm: 'sha-256'
};
}
if (code) {
return {
totp: {
code,
login: auth
}
};
}
return auth;
};
const self = this;
this.addRoute('login', {authRequired: false}, {
post() {
const args = loginCompatibility(this.bodyParams);
const invocation = new DDPCommon.MethodInvocation({
connection: {
close() {}
}
});
let auth;
try {
auth = DDP._CurrentInvocation.withValue(invocation, () => Meteor.call('login', args));
} catch (error) {
let e = error;
if (error.reason === 'User not found') {
e = {
error: 'Unauthorized',
reason: 'Unauthorized'
};
}
return {
statusCode: 401,
body: {
status: 'error',
error: e.error,
message: e.reason || e.message
}
};
}
this.user = Meteor.users.findOne({
_id: auth.id
});
this.userId = this.user._id;
// Remove tokenExpires to keep the old behavior
Meteor.users.update({
_id: this.user._id,
'services.resume.loginTokens.hashedToken': Accounts._hashLoginToken(auth.token)
}, {
$unset: {
'services.resume.loginTokens.$.when': 1
}
});
const response = {
status: 'success',
data: {
userId: this.userId,
authToken: auth.token
}
};
const extraData = self._config.onLoggedIn && self._config.onLoggedIn.call(this);
if (extraData != null) {
_.extend(response.data, {
extra: extraData
});
}
return response;
}
});
const logout = function() {
// Remove the given auth token from the user's account
const authToken = this.request.headers['x-auth-token'];
const hashedToken = Accounts._hashLoginToken(authToken);
const tokenLocation = self._config.auth.token;
const index = tokenLocation.lastIndexOf('.');
const tokenPath = tokenLocation.substring(0, index);
const tokenFieldName = tokenLocation.substring(index + 1);
const tokenToRemove = {};
tokenToRemove[tokenFieldName] = hashedToken;
const tokenRemovalQuery = {};
tokenRemovalQuery[tokenPath] = tokenToRemove;
Meteor.users.update(this.user._id, {
$pull: tokenRemovalQuery
});
const response = {
status: 'success',
data: {
message: 'You\'ve been logged out!'
}
};
// Call the logout hook with the authenticated user attached
const extraData = self._config.onLoggedOut && self._config.onLoggedOut.call(this);
if (extraData != null) {
_.extend(response.data, {
extra: extraData
});
}
return response;
};
/*
Add a logout endpoint to the API
After the user is logged out, the onLoggedOut hook is called (see Restfully.configure() for
adding hook).
*/
return this.addRoute('logout', {
authRequired: true
}, {
get() {
console.warn('Warning: Default logout via GET will be removed in Restivus v1.0. Use POST instead.');
console.warn(' See https://github.com/kahmali/meteor-restivus/issues/100');
return logout.call(this);
},
post: logout
});
}
}
RocketChat.API = {};
const getUserAuth = function _getUserAuth() {
@ -161,17 +354,31 @@ const getUserAuth = function _getUserAuth() {
};
};
RocketChat.API.v1 = new API({
version: 'v1',
useDefaultAuth: true,
prettyJson: true,
enableCors: false,
auth: getUserAuth()
});
const createApi = function(enableCors) {
if (!RocketChat.API.v1 || RocketChat.API.v1._config.enableCors !== enableCors) {
RocketChat.API.v1 = new API({
version: 'v1',
useDefaultAuth: true,
prettyJson: process.env.NODE_ENV === 'development',
enableCors,
auth: getUserAuth()
});
}
if (!RocketChat.API.default || RocketChat.API.default._config.enableCors !== enableCors) {
RocketChat.API.default = new API({
useDefaultAuth: true,
prettyJson: process.env.NODE_ENV === 'development',
enableCors,
auth: getUserAuth()
});
}
};
RocketChat.API.default = new API({
useDefaultAuth: true,
prettyJson: true,
enableCors: false,
auth: getUserAuth()
// register the API to be re-created once the CORS-setting changes.
RocketChat.settings.get('API_Enable_CORS', (key, value) => {
createApi(value);
});
// also create the API immediately
createApi(!!RocketChat.settings.get('API_Enable_CORS'));

@ -1,14 +1,21 @@
import _ from 'underscore';
//Returns the channel IF found otherwise it will return the failure of why it didn't. Check the `statusCode` property
function findChannelByIdOrName({ params, checkedArchived = true }) {
function findChannelByIdOrName({ params, checkedArchived = true, returnUsernames = false }) {
if ((!params.roomId || !params.roomId.trim()) && (!params.roomName || !params.roomName.trim())) {
throw new Meteor.Error('error-roomid-param-not-provided', 'The parameter "roomId" or "roomName" is required');
}
const fields = { ...RocketChat.API.v1.defaultFieldsToExclude };
if (returnUsernames) {
delete fields.usernames;
}
let room;
if (params.roomId) {
room = RocketChat.models.Rooms.findOneById(params.roomId, { fields: RocketChat.API.v1.defaultFieldsToExclude });
room = RocketChat.models.Rooms.findOneById(params.roomId, { fields });
} else if (params.roomName) {
room = RocketChat.models.Rooms.findOneByName(params.roomName, { fields: RocketChat.API.v1.defaultFieldsToExclude });
room = RocketChat.models.Rooms.findOneByName(params.roomName, { fields });
}
if (!room || room.t !== 'c') {
@ -236,7 +243,7 @@ RocketChat.API.v1.addRoute('channels.files', { authRequired: true }, {
sort: sort ? sort : { name: 1 },
skip: offset,
limit: count,
fields: Object.assign({}, fields, RocketChat.API.v1.defaultFieldsToExclude)
fields
}).fetch();
return RocketChat.API.v1.success({
@ -280,7 +287,7 @@ RocketChat.API.v1.addRoute('channels.getIntegrations', { authRequired: true }, {
sort: sort ? sort : { _createdAt: 1 },
skip: offset,
limit: count,
fields: Object.assign({}, fields, RocketChat.API.v1.defaultFieldsToExclude)
fields
}).fetch();
return RocketChat.API.v1.success({
@ -426,7 +433,7 @@ RocketChat.API.v1.addRoute('channels.list', { authRequired: true }, {
sort: sort ? sort : { name: 1 },
skip: offset,
limit: count,
fields: Object.assign({}, fields, RocketChat.API.v1.defaultFieldsToExclude)
fields
}).fetch();
return RocketChat.API.v1.success({
@ -450,7 +457,7 @@ RocketChat.API.v1.addRoute('channels.list.joined', { authRequired: true }, {
sort: sort ? sort : { name: 1 },
skip: offset,
limit: count,
fields: Object.assign({}, fields, RocketChat.API.v1.defaultFieldsToExclude)
fields
});
return RocketChat.API.v1.success({
@ -464,19 +471,28 @@ RocketChat.API.v1.addRoute('channels.list.joined', { authRequired: true }, {
RocketChat.API.v1.addRoute('channels.members', { authRequired: true }, {
get() {
const findResult = findChannelByIdOrName({ params: this.requestParams(), checkedArchived: false });
const findResult = findChannelByIdOrName({ params: this.requestParams(), checkedArchived: false, returnUsernames: true });
const { offset, count } = this.getPaginationItems();
const { sort } = this.parseJsonQuery();
const members = RocketChat.models.Rooms.processQueryOptionsOnResult(Array.from(findResult.usernames), {
sort: sort ? sort : -1,
let sortFn = (a, b) => a > b;
if (Match.test(sort, Object) && Match.test(sort.username, Number) && sort.username === -1) {
sortFn = (a, b) => b < a;
}
const members = RocketChat.models.Rooms.processQueryOptionsOnResult(Array.from(findResult.usernames).sort(sortFn), {
skip: offset,
limit: count
});
const users = RocketChat.models.Users.find({ username: { $in: members } }, {
fields: { _id: 1, username: 1, name: 1, status: 1, utcOffset: 1 },
sort: sort ? sort : { username: 1 }
}).fetch();
return RocketChat.API.v1.success({
members,
members: users,
count: members.length,
offset,
total: findResult.usernames.length
@ -503,7 +519,7 @@ RocketChat.API.v1.addRoute('channels.messages', { authRequired: true }, {
sort: sort ? sort : { ts: -1 },
skip: offset,
limit: count,
fields: Object.assign({}, fields, RocketChat.API.v1.defaultFieldsToExclude)
fields
}).fetch();
return RocketChat.API.v1.success({

@ -17,13 +17,47 @@ RocketChat.API.v1.addRoute('chat.delete', { authRequired: true }, {
return RocketChat.API.v1.failure('The room id provided does not match where the message is from.');
}
if (this.bodyParams.asUser && msg.u._id !== this.userId && !RocketChat.authz.hasPermission(Meteor.userId(), 'force-delete-message', msg.rid)) {
return RocketChat.API.v1.failure('Unauthorized. You must have the permission "force-delete-message" to delete other\'s message as them.');
}
Meteor.runAsUser(this.bodyParams.asUser ? msg.u._id : this.userId, () => {
Meteor.call('deleteMessage', { _id: msg._id });
});
return RocketChat.API.v1.success({
_id: msg._id,
ts: Date.now()
ts: Date.now(),
message: msg
});
}
});
RocketChat.API.v1.addRoute('chat.syncMessages', { authRequired: true }, {
get() {
const { roomId, lastUpdate } = this.queryParams;
if (!roomId) {
throw new Meteor.Error('error-roomId-param-not-provided', 'The required "roomId" query param is missing.');
}
if (!lastUpdate) {
throw new Meteor.Error('error-lastUpdate-param-not-provided', 'The required "lastUpdate" query param is missing.');
} else if (isNaN(Date.parse(lastUpdate))) {
throw new Meteor.Error('error-roomId-param-invalid', 'The "lastUpdate" query parameter must be a valid date.');
}
let result;
Meteor.runAsUser(this.userId, () => {
result = Meteor.call('messages/get', roomId, { lastUpdate: new Date(lastUpdate) });
});
if (!result) {
return RocketChat.API.v1.failure();
}
return RocketChat.API.v1.success({
result
});
}
});
@ -34,7 +68,6 @@ RocketChat.API.v1.addRoute('chat.getMessage', { authRequired: true }, {
return RocketChat.API.v1.failure('The "msgId" query parameter must be provided.');
}
let msg;
Meteor.runAsUser(this.userId, () => {
msg = Meteor.call('getSingleMessage', this.queryParams.msgId);
@ -53,7 +86,7 @@ RocketChat.API.v1.addRoute('chat.getMessage', { authRequired: true }, {
RocketChat.API.v1.addRoute('chat.pinMessage', { authRequired: true }, {
post() {
if (!this.bodyParams.messageId || !this.bodyParams.messageId.trim()) {
throw new Meteor.Error('error-messageid-param-not-provided', 'The required "messageId" param is required.');
throw new Meteor.Error('error-messageid-param-not-provided', 'The required "messageId" param is missing.');
}
const msg = RocketChat.models.Messages.findOneById(this.bodyParams.messageId);
@ -87,6 +120,49 @@ RocketChat.API.v1.addRoute('chat.postMessage', { authRequired: true }, {
}
});
RocketChat.API.v1.addRoute('chat.search', { authRequired: true }, {
get() {
const { roomId, searchText, limit } = this.queryParams;
if (!roomId) {
throw new Meteor.Error('error-roomId-param-not-provided', 'The required "roomId" query param is missing.');
}
if (!searchText) {
throw new Meteor.Error('error-searchText-param-not-provided', 'The required "searchText" query param is missing.');
}
if (limit && (typeof limit !== 'number' || isNaN(limit) || limit <= 0)) {
throw new Meteor.Error('error-limit-param-invalid', 'The "limit" query parameter must be a valid number and be greater than 0.');
}
let result;
Meteor.runAsUser(this.userId, () => result = Meteor.call('messageSearch', searchText, roomId, limit));
return RocketChat.API.v1.success({
messages: result.messages
});
}
});
// The difference between `chat.postMessage` and `chat.sendMessage` is that `chat.sendMessage` allows
// for passing a value for `_id` and the other one doesn't. Also, `chat.sendMessage` only sends it to
// one channel whereas the other one allows for sending to more than one channel at a time.
RocketChat.API.v1.addRoute('chat.sendMessage', { authRequired: true }, {
post() {
if (!this.bodyParams.message) {
throw new Meteor.Error('error-invalid-params', 'The "message" parameter must be provided.');
}
let message;
Meteor.runAsUser(this.userId, () => message = Meteor.call('sendMessage', this.bodyParams.message));
return RocketChat.API.v1.success({
message
});
}
});
RocketChat.API.v1.addRoute('chat.starMessage', { authRequired: true }, {
post() {
if (!this.bodyParams.messageId || !this.bodyParams.messageId.trim()) {

@ -0,0 +1,86 @@
RocketChat.API.v1.addRoute('commands.get', { authRequired: true }, {
get() {
const params = this.queryParams;
if (typeof params.command !== 'string') {
return RocketChat.API.v1.failure('The query param "command" must be provided.');
}
const cmd = RocketChat.slashCommands.commands[params.command.toLowerCase()];
if (!cmd) {
return RocketChat.API.v1.failure(`There is no command in the system by the name of: ${ params.command }`);
}
return RocketChat.API.v1.success({ command: cmd });
}
});
RocketChat.API.v1.addRoute('commands.list', { authRequired: true }, {
get() {
const { offset, count } = this.getPaginationItems();
const { sort, fields, query } = this.parseJsonQuery();
let commands = Object.values(RocketChat.slashCommands.commands);
if (query && query.command) {
commands = commands.filter((command) => command.command === query.command);
}
const totalCount = commands.length;
commands = RocketChat.models.Rooms.processQueryOptionsOnResult(commands, {
sort: sort ? sort : { name: 1 },
skip: offset,
limit: count,
fields
});
return RocketChat.API.v1.success({
commands,
offset,
count: commands.length,
total: totalCount
});
}
});
// Expects a body of: { command: 'gimme', params: 'any string value', roomId: 'value' }
RocketChat.API.v1.addRoute('commands.run', { authRequired: true }, {
post() {
const body = this.bodyParams;
const user = this.getLoggedInUser();
if (typeof body.command !== 'string') {
return RocketChat.API.v1.failure('You must provide a command to run.');
}
if (body.params && typeof body.params !== 'string') {
return RocketChat.API.v1.failure('The parameters for the command must be a single string.');
}
if (typeof body.roomId !== 'string') {
return RocketChat.API.v1.failure('The room\'s id where to execute this command must provided and be a string.');
}
const cmd = body.command.toLowerCase();
if (!RocketChat.slashCommands.commands[body.command.toLowerCase()]) {
return RocketChat.API.v1.failure('The command provided does not exist (or is disabled).');
}
// This will throw an error if they can't or the room is invalid
Meteor.call('canAccessRoom', body.roomId, user._id);
const params = body.params ? body.params : '';
let result;
Meteor.runAsUser(user._id, () => {
result = RocketChat.slashCommands.run(cmd, params, {
_id: Random.id(),
rid: body.roomId,
msg: `/${ cmd } ${ params }`
});
});
return RocketChat.API.v1.success({ result });
}
});

@ -1,3 +1,5 @@
import _ from 'underscore';
//Returns the private group subscription IF found otherwise it will return the failure of why it didn't. Check the `statusCode` property
function findPrivateGroupByIdOrName({ params, userId, checkedArchived = true }) {
if ((!params.roomId || !params.roomId.trim()) && (!params.roomName || !params.roomName.trim())) {
@ -161,13 +163,13 @@ RocketChat.API.v1.addRoute('groups.files', { authRequired: true }, {
const { offset, count } = this.getPaginationItems();
const { sort, fields, query } = this.parseJsonQuery();
const ourQuery = Object.assign({}, query, { rid: findResult._id });
const ourQuery = Object.assign({}, query, { rid: findResult.rid });
const files = RocketChat.models.Uploads.find(ourQuery, {
sort: sort ? sort : { name: 1 },
skip: offset,
limit: count,
fields: Object.assign({}, fields, RocketChat.API.v1.defaultFieldsToExclude)
fields
}).fetch();
return RocketChat.API.v1.success({
@ -205,7 +207,7 @@ RocketChat.API.v1.addRoute('groups.getIntegrations', { authRequired: true }, {
sort: sort ? sort : { _createdAt: 1 },
skip: offset,
limit: count,
fields: Object.assign({}, fields, RocketChat.API.v1.defaultFieldsToExclude)
fields
}).fetch();
return RocketChat.API.v1.success({
@ -323,7 +325,7 @@ RocketChat.API.v1.addRoute('groups.list', { authRequired: true }, {
sort: sort ? sort : { name: 1 },
skip: offset,
limit: count,
fields: Object.assign({}, fields, RocketChat.API.v1.defaultFieldsToExclude)
fields
});
return RocketChat.API.v1.success({
@ -350,7 +352,7 @@ RocketChat.API.v1.addRoute('groups.listAll', { authRequired: true }, {
sort: sort ? sort : { name: 1 },
skip: offset,
limit: count,
fields: Object.assign({}, fields, RocketChat.API.v1.defaultFieldsToExclude)
fields
});
return RocketChat.API.v1.success({
@ -368,17 +370,26 @@ RocketChat.API.v1.addRoute('groups.members', { authRequired: true }, {
const { offset, count } = this.getPaginationItems();
const { sort } = this.parseJsonQuery();
const members = RocketChat.models.Rooms.processQueryOptionsOnResult(Array.from(findResult._room.usernames), {
sort: sort ? sort : -1,
let sortFn = (a, b) => a > b;
if (Match.test(sort, Object) && Match.test(sort.username, Number) && sort.username === -1) {
sortFn = (a, b) => b < a;
}
const members = RocketChat.models.Rooms.processQueryOptionsOnResult(Array.from(findResult._room.usernames).sort(sortFn), {
skip: offset,
limit: count
});
const users = RocketChat.models.Users.find({ username: { $in: members } }, {
fields: { _id: 1, username: 1, name: 1, status: 1, utcOffset: 1 },
sort: sort ? sort : { username: 1 }
}).fetch();
return RocketChat.API.v1.success({
members,
members: users,
count: members.length,
offset,
total: findResult._room.usernames
total: findResult._room.usernames.length
});
}
});
@ -395,7 +406,7 @@ RocketChat.API.v1.addRoute('groups.messages', { authRequired: true }, {
sort: sort ? sort : { ts: -1 },
skip: offset,
limit: count,
fields: Object.assign({}, fields, RocketChat.API.v1.defaultFieldsToExclude)
fields
}).fetch();
return RocketChat.API.v1.success({

@ -19,6 +19,26 @@ RocketChat.API.v1.helperMethods.set('parseJsonQuery', function _parseJsonQuery()
}
}
// Verify the user's selected fields only contains ones which their role allows
if (typeof fields === 'object') {
let nonSelectableFields = Object.keys(RocketChat.API.v1.defaultFieldsToExclude);
if (!RocketChat.authz.hasPermission(this.userId, 'view-full-other-user-info') && this.request.route.includes('/v1/users.')) {
nonSelectableFields = nonSelectableFields.concat(Object.keys(RocketChat.API.v1.limitedUserFieldsToExclude));
}
Object.keys(fields).forEach((k) => {
if (nonSelectableFields.includes(k) || nonSelectableFields.includes(k.split(RocketChat.API.v1.fieldSeparator)[0])) {
delete fields[k];
}
});
}
// Limit the fields by default
fields = Object.assign({}, fields, RocketChat.API.v1.defaultFieldsToExclude);
if (!RocketChat.authz.hasPermission(this.userId, 'view-full-other-user-info') && this.request.route.includes('/v1/users.')) {
fields = Object.assign(fields, RocketChat.API.v1.limitedUserFieldsToExclude);
}
let query;
if (this.queryParams.query) {
try {
@ -29,6 +49,20 @@ RocketChat.API.v1.helperMethods.set('parseJsonQuery', function _parseJsonQuery()
}
}
// Verify the user has permission to query the fields they are
if (typeof query === 'object') {
let nonQuerableFields = Object.keys(RocketChat.API.v1.defaultFieldsToExclude);
if (!RocketChat.authz.hasPermission(this.userId, 'view-full-other-user-info') && this.request.route.includes('/v1/users.')) {
nonQuerableFields = nonQuerableFields.concat(Object.keys(RocketChat.API.v1.limitedUserFieldsToExclude));
}
Object.keys(query).forEach((k) => {
if (nonQuerableFields.includes(k) || nonQuerableFields.includes(k.split(RocketChat.API.v1.fieldSeparator)[0])) {
delete query[k];
}
});
}
return {
sort,
fields,

@ -1,3 +1,5 @@
import _ from 'underscore';
function findDirectMessageRoom(params, user) {
if ((!params.roomId || !params.roomId.trim()) && (!params.username || !params.username.trim())) {
throw new Meteor.Error('error-room-param-not-provided', 'Body param "roomId" or "username" is required');
@ -60,7 +62,7 @@ RocketChat.API.v1.addRoute(['dm.files', 'im.files'], { authRequired: true }, {
sort: sort ? sort : { name: 1 },
skip: offset,
limit: count,
fields: Object.assign({}, fields, RocketChat.API.v1.defaultFieldsToExclude)
fields
}).fetch();
return RocketChat.API.v1.success({
@ -134,11 +136,14 @@ RocketChat.API.v1.addRoute(['dm.members', 'im.members'], { authRequired: true },
limit: count
});
const users = RocketChat.models.Users.find({ username: { $in: members } },
{ fields: { _id: 1, username: 1, name: 1, status: 1, utcOffset: 1 } }).fetch();
return RocketChat.API.v1.success({
members,
members: users,
count: members.length,
offset,
total: findResult.room.usernames
total: findResult.room.usernames.length
});
}
});
@ -157,7 +162,7 @@ RocketChat.API.v1.addRoute(['dm.messages', 'im.messages'], { authRequired: true
sort: sort ? sort : { ts: -1 },
skip: offset,
limit: count,
fields: Object.assign({}, fields, RocketChat.API.v1.defaultFieldsToExclude)
fields
}).fetch();
return RocketChat.API.v1.success({
@ -197,7 +202,7 @@ RocketChat.API.v1.addRoute(['dm.messages.others', 'im.messages.others'], { authR
sort: sort ? sort : { ts: -1 },
skip: offset,
limit: count,
fields: Object.assign({}, fields, RocketChat.API.v1.defaultFieldsToExclude)
fields
}).fetch();
return RocketChat.API.v1.success({
@ -220,7 +225,7 @@ RocketChat.API.v1.addRoute(['dm.list', 'im.list'], { authRequired: true }, {
sort: sort ? sort : { name: 1 },
skip: offset,
limit: count,
fields: Object.assign({}, fields, RocketChat.API.v1.defaultFieldsToExclude)
fields
});
return RocketChat.API.v1.success({
@ -247,7 +252,7 @@ RocketChat.API.v1.addRoute(['dm.list.everyone', 'im.list.everyone'], { authRequi
sort: sort ? sort : { name: 1 },
skip: offset,
limit: count,
fields: Object.assign({}, fields, RocketChat.API.v1.defaultFieldsToExclude)
fields
}).fetch();
return RocketChat.API.v1.success({
@ -263,14 +268,12 @@ RocketChat.API.v1.addRoute(['dm.open', 'im.open'], { authRequired: true }, {
post() {
const findResult = findDirectMessageRoom(this.requestParams(), this.user);
if (findResult.subscription.open) {
return RocketChat.API.v1.failure(`The direct message room, ${ this.bodyParams.name }, is already open for the sender`);
if (!findResult.subscription.open) {
Meteor.runAsUser(this.userId, () => {
Meteor.call('openRoom', findResult.room._id);
});
}
Meteor.runAsUser(this.userId, () => {
Meteor.call('openRoom', findResult.room._id);
});
return RocketChat.API.v1.success();
}
});

@ -108,10 +108,9 @@ RocketChat.API.v1.addRoute('integrations.remove', { authRequired: true }, {
return RocketChat.API.v1.failure('An integrationId or target_url needs to be provided.');
}
let integration;
switch (this.bodyParams.type) {
case 'webhook-outgoing':
let integration;
if (this.bodyParams.target_url) {
integration = RocketChat.models.Integrations.findOne({ urls: this.bodyParams.target_url });
} else if (this.bodyParams.integrationId) {

@ -1,3 +1,5 @@
import _ from 'underscore';
RocketChat.API.v1.addRoute('info', { authRequired: false }, {
get() {
const user = this.getLoggedInUser();

@ -0,0 +1,59 @@
/* globals Push */
RocketChat.API.v1.addRoute('push.token', { authRequired: true }, {
post() {
const { type, value, appName } = this.bodyParams;
let { id } = this.bodyParams;
if (id && typeof id !== 'string') {
throw new Meteor.Error('error-id-param-not-valid', 'The required "id" body param is invalid.');
} else {
id = Random.id();
}
if (!type || (type !== 'apn' && type !== 'gcm')) {
throw new Meteor.Error('error-type-param-not-valid', 'The required "type" body param is missing or invalid.');
}
if (!value || typeof value !== 'string') {
throw new Meteor.Error('error-token-param-not-valid', 'The required "token" body param is missing or invalid.');
}
if (!appName || typeof appName !== 'string') {
throw new Meteor.Error('error-appName-param-not-valid', 'The required "appName" body param is missing or invalid.');
}
let result;
Meteor.runAsUser(this.userId, () => result = Meteor.call('raix:push-update', {
id,
token: { [type]: value },
appName,
userId: this.userId
}));
return RocketChat.API.v1.success({ result });
},
delete() {
const { token } = this.bodyParams;
if (!token || typeof token !== 'string') {
throw new Meteor.Error('error-token-param-not-valid', 'The required "token" body param is missing or invalid.');
}
const affectedRecords = Push.appCollection.remove({
$or: [{
'token.apn': token
}, {
'token.gcm': token
}],
userId: this.userId
});
if (affectedRecords === 0) {
return RocketChat.API.v1.notFound();
}
return RocketChat.API.v1.success();
}
});

@ -0,0 +1,93 @@
RocketChat.API.v1.addRoute('rooms.get', { authRequired: true }, {
get() {
const { updatedSince } = this.queryParams;
let updatedSinceDate;
if (updatedSince) {
if (isNaN(Date.parse(updatedSince))) {
throw new Meteor.Error('error-updatedSince-param-invalid', 'The "updatedSince" query parameter must be a valid date.');
} else {
updatedSinceDate = new Date(updatedSince);
}
}
let result;
Meteor.runAsUser(this.userId, () => result = Meteor.call('rooms/get', updatedSinceDate));
if (Array.isArray(result)) {
result = {
update: result,
remove: []
};
}
return RocketChat.API.v1.success(result);
}
});
RocketChat.API.v1.addRoute('rooms.upload/:rid', { authRequired: true }, {
post() {
const room = Meteor.call('canAccessRoom', this.urlParams.rid, this.userId);
if (!room) {
return RocketChat.API.v1.unauthorized();
}
const Busboy = Npm.require('busboy');
const busboy = new Busboy({ headers: this.request.headers });
const files = [];
const fields = {};
Meteor.wrapAsync((callback) => {
busboy.on('file', (fieldname, file, filename, encoding, mimetype) => {
if (fieldname !== 'file') {
return files.push(new Meteor.Error('invalid-field'));
}
const fileDate = [];
file.on('data', data => fileDate.push(data));
file.on('end', () => {
files.push({ fieldname, file, filename, encoding, mimetype, fileBuffer: Buffer.concat(fileDate) });
});
});
busboy.on('field', (fieldname, value) => fields[fieldname] = value);
busboy.on('finish', Meteor.bindEnvironment(() => callback()));
this.request.pipe(busboy);
})();
if (files.length === 0) {
return RocketChat.API.v1.failure('File required');
}
if (files.length > 1) {
return RocketChat.API.v1.failure('Just 1 file is allowed');
}
const file = files[0];
const fileStore = FileUpload.getStore('Uploads');
const details = {
name: file.filename,
size: file.fileBuffer.length,
type: file.mimetype,
rid: this.urlParams.rid
};
Meteor.runAsUser(this.userId, () => {
const uploadedFile = Meteor.wrapAsync(fileStore.insert.bind(fileStore))(details, file.fileBuffer);
uploadedFile.description = fields.description;
delete fields.description;
RocketChat.API.v1.success(Meteor.call('sendFileMessage', this.urlParams.rid, null, uploadedFile, fields));
});
return RocketChat.API.v1.success();
}
});

@ -1,4 +1,34 @@
import _ from 'underscore';
// settings endpoints
RocketChat.API.v1.addRoute('settings.public', { authRequired: false }, {
get() {
const { offset, count } = this.getPaginationItems();
const { sort, fields, query } = this.parseJsonQuery();
let ourQuery = {
hidden: { $ne: true },
'public': true
};
ourQuery = Object.assign({}, query, ourQuery);
const settings = RocketChat.models.Settings.find(ourQuery, {
sort: sort ? sort : { _id: 1 },
skip: offset,
limit: count,
fields: Object.assign({ _id: 1, value: 1 }, fields)
}).fetch();
return RocketChat.API.v1.success({
settings,
count: settings.length,
offset,
total: RocketChat.models.Settings.find(ourQuery).count()
});
}
});
RocketChat.API.v1.addRoute('settings', { authRequired: true }, {
get() {
const { offset, count } = this.getPaginationItems();
@ -54,3 +84,13 @@ RocketChat.API.v1.addRoute('settings/:_id', { authRequired: true }, {
return RocketChat.API.v1.failure();
}
});
RocketChat.API.v1.addRoute('service.configurations', { authRequired: false }, {
get() {
const ServiceConfiguration = Package['service-configuration'].ServiceConfiguration;
return RocketChat.API.v1.success({
configurations: ServiceConfiguration.configurations.find({}, {fields: {secret: 0}}).fetch()
});
}
});

@ -25,20 +25,18 @@ RocketChat.API.v1.addRoute('statistics.list', { authRequired: true }, {
const { offset, count } = this.getPaginationItems();
const { sort, fields, query } = this.parseJsonQuery();
const ourQuery = Object.assign({}, query);
const statistics = RocketChat.models.Statistics.find(ourQuery, {
const statistics = RocketChat.models.Statistics.find(query, {
sort: sort ? sort : { name: 1 },
skip: offset,
limit: count,
fields: Object.assign({}, fields, RocketChat.API.v1.defaultFieldsToExclude)
fields
}).fetch();
return RocketChat.API.v1.success({
statistics,
count: statistics.length,
offset,
total: RocketChat.models.Statistics.find(ourQuery).count()
total: RocketChat.models.Statistics.find(query).count()
});
}
});

@ -0,0 +1,26 @@
RocketChat.API.v1.addRoute('subscriptions.get', { authRequired: true }, {
get() {
const { updatedSince } = this.queryParams;
let updatedSinceDate;
if (updatedSince) {
if (isNaN(Date.parse(updatedSince))) {
throw new Meteor.Error('error-roomId-param-invalid', 'The "lastUpdate" query parameter must be a valid date.');
} else {
updatedSinceDate = new Date(updatedSince);
}
}
let result;
Meteor.runAsUser(this.userId, () => result = Meteor.call('subscriptions/get', updatedSinceDate));
if (Array.isArray(result)) {
result = {
update: result,
remove: []
};
}
return RocketChat.API.v1.success(result);
}
});

@ -1,3 +1,5 @@
import _ from 'underscore';
RocketChat.API.v1.addRoute('users.create', { authRequired: true }, {
post() {
check(this.bodyParams, {
@ -117,40 +119,18 @@ RocketChat.API.v1.addRoute('users.list', { authRequired: true }, {
const { offset, count } = this.getPaginationItems();
const { sort, fields, query } = this.parseJsonQuery();
let fieldsToKeepFromRegularUsers;
if (!RocketChat.authz.hasPermission(this.userId, 'view-full-other-user-info')) {
fieldsToKeepFromRegularUsers = {
avatarOrigin: 0,
emails: 0,
phone: 0,
statusConnection: 0,
createdAt: 0,
lastLogin: 0,
services: 0,
requirePasswordChange: 0,
requirePasswordChangeReason: 0,
roles: 0,
statusDefault: 0,
_updatedAt: 0,
customFields: 0
};
}
const ourQuery = Object.assign({}, query);
const ourFields = Object.assign({}, fields, fieldsToKeepFromRegularUsers, RocketChat.API.v1.defaultFieldsToExclude);
const users = RocketChat.models.Users.find(ourQuery, {
const users = RocketChat.models.Users.find(query, {
sort: sort ? sort : { username: 1 },
skip: offset,
limit: count,
fields: ourFields
fields
}).fetch();
return RocketChat.API.v1.success({
users,
count: users.length,
offset,
total: RocketChat.models.Users.find(ourQuery).count()
total: RocketChat.models.Users.find(query).count()
});
}
});

@ -1,19 +1,10 @@
{
"lockfileVersion": 1,
"dependencies": {
"image-size": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.4.0.tgz",
"from": "image-size@0.4.0"
},
"mime-db": {
"version": "1.21.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.21.0.tgz",
"from": "mime-db@>=1.21.0 <1.22.0"
},
"mime-types": {
"version": "2.1.9",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.9.tgz",
"from": "mime-types@2.1.9"
"integrity": "sha1-1LTh9hlS5MvBzqmmsMkV/stwdRA="
}
}
}

@ -8,7 +8,6 @@ Package.describe({
Package.onUse(function(api) {
api.use([
'ecmascript',
'underscore',
'webapp',
'rocketchat:file',
'rocketchat:lib',

@ -1,4 +1,5 @@
/* global WebAppHashing, WebAppInternals */
import _ from 'underscore';
import sizeOf from 'image-size';
import mime from 'mime-type/with-db';

@ -1,3 +1,5 @@
import _ from 'underscore';
if (_.isUndefined(RocketChat.models.Subscriptions)) {
RocketChat.models.Subscriptions = {};
}

@ -1,3 +1,5 @@
import _ from 'underscore';
if (_.isUndefined(RocketChat.models.Users)) {
RocketChat.models.Users = {};
}

@ -3,6 +3,7 @@ Meteor.subscribe('roles');
RocketChat.AdminBox.addOption({
href: 'admin-permissions',
i18nLabel: 'Permissions',
icon: 'lock',
permissionGranted() {
return RocketChat.authz.hasAllPermission('access-permissions');
}

@ -105,7 +105,7 @@ Template.permissionsRole.helpers({
Template.permissionsRole.events({
'click .remove-user'(e, instance) {
e.preventDefault();
swal({
modal.open({
title: t('Are_you_sure'),
type: 'warning',
showCancelButton: true,
@ -120,7 +120,7 @@ Template.permissionsRole.events({
return handleError(error);
}
swal({
modal.open({
title: t('Removed'),
text: t('User_removed'),
type: 'success',

@ -9,7 +9,6 @@ Package.describe({
Package.onUse(function(api) {
api.use([
'ecmascript',
'underscore',
'rocketchat:lib'
]);

@ -1,3 +1,5 @@
import _ from 'underscore';
RocketChat.authz.addUserRoles = function(userId, roleNames, scope) {
if (!userId || !roleNames) {
return false;

@ -1,3 +1,5 @@
import _ from 'underscore';
RocketChat.authz.removeUserFromRoles = function(userId, roleNames, scope) {
if (!userId || !roleNames) {
return false;

@ -1,3 +1,5 @@
import _ from 'underscore';
Meteor.methods({
'authorization:addUserToRole'(roleName, username, scope) {
if (!Meteor.userId() || !RocketChat.authz.hasPermission(Meteor.userId(), 'access-permissions')) {

@ -1,3 +1,5 @@
import _ from 'underscore';
Meteor.methods({
'authorization:removeUserFromRole'(roleName, username, scope) {
if (!Meteor.userId() || !RocketChat.authz.hasPermission(Meteor.userId(), 'access-permissions')) {

@ -1,3 +1,5 @@
import _ from 'underscore';
RocketChat.models._Base.prototype.roleBaseQuery = function(/*userId, scope*/) {
return;
};

@ -1,3 +1,5 @@
import _ from 'underscore';
RocketChat.models.Subscriptions.roleBaseQuery = function(userId, scope) {
if (scope == null) {
return;

@ -1,9 +1,10 @@
{
"lockfileVersion": 1,
"dependencies": {
"autolinker": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/autolinker/-/autolinker-1.4.0.tgz",
"from": "autolinker@1.4.0"
"integrity": "sha1-oVjpDIL8V/gSMv0ZwSsQ61ON6IE="
}
}
}

@ -1,3 +1,5 @@
import s from 'underscore.string';
//
// AutoLinker is a named function that will replace links on messages
// @param {Object} message - The message object
@ -6,7 +8,11 @@
import Autolinker from 'autolinker';
function AutoLinker(message) {
if (_.trim(message.html)) {
if (RocketChat.settings.get('AutoLinker') !== true) {
return message;
}
if (s.trim(message.html)) {
const regUrls = new RegExp(RocketChat.settings.get('AutoLinker_UrlsRegExp'));
const autolinker = new Autolinker({
@ -19,6 +25,7 @@ function AutoLinker(message) {
email: RocketChat.settings.get('AutoLinker_Email'),
phone: RocketChat.settings.get('AutoLinker_Phone'),
twitter: false,
stripTrailingSlash: false,
replaceFn(match) {
if (match.getType() === 'url') {
if (regUrls.test(match.matchedText)) {

@ -1,9 +1,16 @@
Meteor.startup(function() {
RocketChat.settings.add('AutoLinker_StripPrefix', false, {type: 'boolean', group: 'Message', section: 'AutoLinker', public: true, i18nDescription: 'AutoLinker_StripPrefix_Description'});
RocketChat.settings.add('AutoLinker_Urls_Scheme', true, {type: 'boolean', group: 'Message', section: 'AutoLinker', public: true});
RocketChat.settings.add('AutoLinker_Urls_www', true, {type: 'boolean', group: 'Message', section: 'AutoLinker', public: true});
RocketChat.settings.add('AutoLinker_Urls_TLD', true, {type: 'boolean', group: 'Message', section: 'AutoLinker', public: true});
RocketChat.settings.add('AutoLinker_UrlsRegExp', '(://|www\\.).+', {type: 'string', group: 'Message', section: 'AutoLinker', public: true});
RocketChat.settings.add('AutoLinker_Email', true, {type: 'boolean', group: 'Message', section: 'AutoLinker', public: true});
RocketChat.settings.add('AutoLinker_Phone', true, {type: 'boolean', group: 'Message', section: 'AutoLinker', public: true, i18nDescription: 'AutoLinker_Phone_Description'});
const enableQuery = {
_id: 'AutoLinker',
value: true
};
RocketChat.settings.add('AutoLinker', true, {type: 'boolean', group: 'Message', section: 'AutoLinker', public: true, i18nLabel: 'Enabled'});
RocketChat.settings.add('AutoLinker_StripPrefix', false, {type: 'boolean', group: 'Message', section: 'AutoLinker', public: true, i18nDescription: 'AutoLinker_StripPrefix_Description', enableQuery});
RocketChat.settings.add('AutoLinker_Urls_Scheme', true, {type: 'boolean', group: 'Message', section: 'AutoLinker', public: true, enableQuery});
RocketChat.settings.add('AutoLinker_Urls_www', true, {type: 'boolean', group: 'Message', section: 'AutoLinker', public: true, enableQuery});
RocketChat.settings.add('AutoLinker_Urls_TLD', true, {type: 'boolean', group: 'Message', section: 'AutoLinker', public: true, enableQuery});
RocketChat.settings.add('AutoLinker_UrlsRegExp', '(://|www\\.).+', {type: 'string', group: 'Message', section: 'AutoLinker', public: true, enableQuery});
RocketChat.settings.add('AutoLinker_Email', true, {type: 'boolean', group: 'Message', section: 'AutoLinker', public: true, enableQuery});
RocketChat.settings.add('AutoLinker_Phone', true, {type: 'boolean', group: 'Message', section: 'AutoLinker', public: true, i18nDescription: 'AutoLinker_Phone_Description', enableQuery});
});

@ -1,3 +1,5 @@
import _ from 'underscore';
RocketChat.AutoTranslate = {
messageIdsToWait: {},
supportedLanguages: [],

@ -1,4 +1,5 @@
/* globals ChatSubscription */
import _ from 'underscore';
import toastr from 'toastr';
Template.autoTranslateFlexTab.helpers({

@ -1,3 +1,6 @@
import _ from 'underscore';
import s from 'underscore.string';
class AutoTranslate {
constructor() {
this.languages = [];

@ -7,7 +7,6 @@ Package.describe({
Package.onUse(function(api) {
api.use('ecmascript');
api.use('underscore');
api.use('rocketchat:lib');
api.use('accounts-base');
// api.mainModule('server/index.js', 'server'); // when 1.3

@ -1,3 +1,5 @@
import _ from 'underscore';
/**
* BotHelpers helps bots
* "private" properties use meteor collection cursors, so they stay reactive

@ -1,113 +1,113 @@
{
"lockfileVersion": 1,
"dependencies": {
"boolbase": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
"from": "boolbase@>=1.0.0 <1.1.0"
"integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24="
},
"cas": {
"version": "0.0.5",
"resolved": "https://github.com/kcbanner/node-cas/tarball/fcd27dad333223b3b75a048bce27973fb3ca0f62",
"from": "https://github.com/kcbanner/node-cas/tarball/fcd27dad333223b3b75a048bce27973fb3ca0f62"
"version": "https://github.com/kcbanner/node-cas/tarball/fcd27dad333223b3b75a048bce27973fb3ca0f62",
"integrity": "sha1-AL8m1JYV/7kMEdlJ0sKtJ18YXg4="
},
"cheerio": {
"version": "0.19.0",
"resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.19.0.tgz",
"from": "cheerio@0.19.0"
"integrity": "sha1-dy5wFfLuKZZQltcepBdbdas1SSU="
},
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"from": "core-util-is@>=1.0.0 <1.1.0"
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"css-select": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/css-select/-/css-select-1.0.0.tgz",
"from": "css-select@>=1.0.0 <1.1.0"
"integrity": "sha1-sRIcpRhI3SZOIkTQWM7iVN7rRLA="
},
"css-what": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/css-what/-/css-what-1.0.0.tgz",
"from": "css-what@>=1.0.0 <1.1.0"
"integrity": "sha1-18wt9FGAZm+Z0rFEYmOUaeAPc2w="
},
"dom-serializer": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz",
"from": "dom-serializer@>=0.1.0 <0.2.0",
"integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=",
"dependencies": {
"domelementtype": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz",
"from": "domelementtype@>=1.1.1 <1.2.0"
"integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs="
}
}
},
"domelementtype": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz",
"from": "domelementtype@>=1.0.0 <2.0.0"
"integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI="
},
"domhandler": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz",
"from": "domhandler@>=2.3.0 <2.4.0"
"integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg="
},
"domutils": {
"version": "1.4.3",
"resolved": "https://registry.npmjs.org/domutils/-/domutils-1.4.3.tgz",
"from": "domutils@>=1.4.0 <1.5.0"
"integrity": "sha1-CGVRN5bGswYDGFDhdVFrr4C3Km8="
},
"entities": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz",
"from": "entities@>=1.1.1 <1.2.0"
"integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA="
},
"htmlparser2": {
"version": "3.8.3",
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz",
"from": "htmlparser2@>=3.8.1 <3.9.0",
"integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=",
"dependencies": {
"domutils": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz",
"from": "domutils@>=1.5.0 <1.6.0"
"integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8="
},
"entities": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz",
"from": "entities@>=1.0.0 <1.1.0"
"integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY="
}
}
},
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"from": "inherits@>=2.0.1 <2.1.0"
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"isarray": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
"from": "isarray@0.0.1"
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"lodash": {
"version": "3.10.1",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
"from": "lodash@>=3.2.0 <4.0.0"
"integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y="
},
"nth-check": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz",
"from": "nth-check@>=1.0.0 <1.1.0"
"integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ="
},
"readable-stream": {
"version": "1.1.14",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
"from": "readable-stream@>=1.1.0 <1.2.0"
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk="
},
"string_decoder": {
"version": "0.10.31",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
"from": "string_decoder@>=0.10.0 <0.11.0"
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
}
}
}

@ -14,12 +14,12 @@ Package.onUse(function(api) {
api.use('webapp', 'server');
api.use('accounts-base', 'server');
api.use('underscore');
api.use('ecmascript');
// Server files
api.add_files('server/cas_rocketchat.js', 'server');
api.add_files('server/cas_server.js', 'server');
api.add_files('server/models/CredentialTokens.js', 'server');
// Client files
api.add_files('client/cas_client.js', 'client');

@ -1,12 +1,11 @@
/* globals RoutePolicy, logger */
/* jshint newcap: false */
import _ from 'underscore';
const fiber = Npm.require('fibers');
const url = Npm.require('url');
const CAS = Npm.require('cas');
const _casCredentialTokens = {};
RoutePolicy.declare('/_cas/', 'network');
const closePopup = function(res) {
@ -37,7 +36,7 @@ const casTicket = function(req, token, callback) {
service: `${ appUrl }/_cas/${ token }`
});
cas.validate(ticketId, function(err, status, username, details) {
cas.validate(ticketId, Meteor.bindEnvironment(function(err, status, username, details) {
if (err) {
logger.error(`error when trying to validate: ${ err.message }`);
} else if (status) {
@ -48,14 +47,14 @@ const casTicket = function(req, token, callback) {
if (details && details.attributes) {
_.extend(user_info, { attributes: details.attributes });
}
_casCredentialTokens[token] = user_info;
RocketChat.models.CredentialTokens.create(token, user_info);
} else {
logger.error(`Unable to validate ticket: ${ ticketId }`);
}
//logger.debug("Receveied response: " + JSON.stringify(details, null , 4));
callback();
});
}));
return;
};
@ -101,19 +100,6 @@ WebApp.connectHandlers.use(function(req, res, next) {
}).run();
});
const _hasCredential = function(credentialToken) {
return _.has(_casCredentialTokens, credentialToken);
};
/*
* Retrieve token and delete it to avoid replaying it.
*/
const _retrieveCredential = function(credentialToken) {
const result = _casCredentialTokens[credentialToken];
delete _casCredentialTokens[credentialToken];
return result;
};
/*
* Register a server-side login handle.
* It is call after Accounts.callLoginMethod() is call from client.
@ -125,12 +111,13 @@ Accounts.registerLoginHandler(function(options) {
return undefined;
}
if (!_hasCredential(options.cas.credentialToken)) {
const credentials = RocketChat.models.CredentialTokens.findOneById(options.cas.credentialToken);
if (credentials === undefined) {
throw new Meteor.Error(Accounts.LoginCancelledError.numericError,
'no matching login attempt found');
}
const result = _retrieveCredential(options.cas.credentialToken);
const result = credentials.userInfo;
const syncUserDataFieldMap = RocketChat.settings.get('CAS_Sync_User_Data_FieldMap').trim();
const cas_version = parseFloat(RocketChat.settings.get('CAS_version'));
const sync_enabled = RocketChat.settings.get('CAS_Sync_User_Data_Enabled');

@ -0,0 +1,28 @@
RocketChat.models.CredentialTokens = new class extends RocketChat.models._Base {
constructor() {
super('credential_tokens');
this.tryEnsureIndex({ 'expireAt': 1 }, { sparse: 1, expireAfterSeconds: 0 });
}
create(_id, userInfo) {
const validForMilliseconds = 60000; // Valid for 60 seconds
const token = {
_id,
userInfo,
expireAt: new Date(Date.now() + validForMilliseconds)
};
this.insert(token);
return token;
}
findOneById(_id) {
const query = {
_id,
expireAt: { $gt: new Date() }
};
return this.findOne(query);
}
};

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save