diff --git a/.meteor/packages b/.meteor/packages index 53bb923dfa9..5d932b0a4ae 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -9,27 +9,42 @@ accounts-google accounts-meteor-developer accounts-password accounts-twitter +blaze-html-templates +check coffeescript +ddp-rate-limiter +ejson email fastclick http jquery less +logging +meteor-base +mobile-experience +mongo +random reactive-dict reactive-var +reload service-configuration +session +spacebars +standard-minifiers +tracker arunoda:streams rocketchat:lib +rocketchat:authorization rocketchat:autolinker rocketchat:colors rocketchat:custom-oauth rocketchat:emojione rocketchat:favico rocketchat:file +rocketchat:github-enterprise rocketchat:gitlab -rocketchat:wordpress rocketchat:highlight rocketchat:ldap rocketchat:logger @@ -43,11 +58,14 @@ rocketchat:slashcommands-join rocketchat:slashcommands-leave rocketchat:spotify rocketchat:statistics +rocketchat:theme rocketchat:webrtc +rocketchat:wordpress #rocketchat:chatops -#rocketchat:livechat #rocketchat:hubot #rocketchat:irc +#rocketchat:livechat +#rocketchat:soundcloud konecty:change-case konecty:delayed-task @@ -75,6 +93,7 @@ mystor:device-detection nimble:restivus nooitaf:colors pauli:accounts-linkedin +perak:codemirror percolate:migrations percolate:synced-cron raix:handlebar-helpers @@ -88,22 +107,5 @@ todda00:friendly-slugs underscorestring:underscore.string yasaricli:slugify yasinuslu:blaze-meta -rocketchat:theme -rocketchat:authorization -perak:codemirror -standard-minifiers -meteor-base -mobile-experience -mongo -blaze-html-templates -session -tracker -logging -reload -random -ejson -spacebars -check -rocketchat:github-enterprise -rocketchat:chatops -ddp-rate-limiter +# sanjo:jasmine +# velocity:html-reporter diff --git a/.meteor/versions b/.meteor/versions index 7b6d95dfd8a..c726382e74f 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -51,13 +51,13 @@ htmljs@1.0.5 http@1.1.1 id-map@1.0.4 idorecall:email-normalize@1.0.0 -jalik:ufs@0.2.9 -jalik:ufs-gridfs@0.1.0 +jalik:ufs@0.3.0 +jalik:ufs-gridfs@0.1.1 jparker:crypto-core@0.1.0 jparker:crypto-md5@0.1.1 jparker:gravatar@0.4.1 jquery@1.11.4 -kadira:blaze-layout@2.1.0 +kadira:blaze-layout@2.2.0 kadira:flow-router@2.7.0 kevohagan:sweetalert@1.0.0 konecty:autolinker@1.0.3 @@ -122,7 +122,6 @@ reload@1.1.4 retry@1.0.4 rocketchat:authorization@0.0.1 rocketchat:autolinker@0.0.1 -rocketchat:chatops@0.0.1 rocketchat:colors@0.0.1 rocketchat:custom-oauth@1.0.0 rocketchat:emojione@0.0.1 diff --git a/.travis.yml b/.travis.yml index b26209f6966..220c79dbeb3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,18 +28,14 @@ script: - cd .travis - sh ./namefiles.sh - cd .. -- meteor add rocketchat:livechat -- meteor add rocketchat:hubot -- meteor add sanjo:jasmine@0.20.2 velocity:console-reporter -- ./node_modules/velocity-cli/bin/velocity test-packages --ci -- ./node_modules/velocity-cli/bin/velocity test-app --ci -- meteor --test --once +- meteor add-platform ios +- meteor add rocketchat:livechat rocketchat:hubot - meteor build --server demo.rocket.chat ../build - cd .travis - sh ./namedemo.sh - cd .. after_deploy: -- "curl -H \"Content-Type: application/json\" --data \"{'build': true}\" -X POST https://registry.hub.docker.com/u/singli/rocket.chat/trigger/$PUSHTOKEN/" +- "curl -H \"Content-Type: application/json\" --data \"{'build': true}\" -X POST https://registry.hub.docker.com/u/rocketchat/rocket.chat/trigger/$PUSHTOKEN/" deploy: provider: s3 access_key_id: "AKIAIKIA7H7D47KUHYCA" diff --git a/.travis/setbuildinfo.js b/.travis/setbuildinfo.js index 221e7a3b415..ffef83bd3bc 100644 --- a/.travis/setbuildinfo.js +++ b/.travis/setbuildinfo.js @@ -1,44 +1,39 @@ var BUILD_INFO_PATH = '../public/buildinfo/buildinfo.txt'; -var PACKAGES_PATH = '../.meteor/packages'; +var PACKAGES_PATH = '../.meteor/versions'; var BUILD_PATH = '../../build'; -var LineByLineReader = require('line-by-line'), - mkdirp = require('mkdirp'), - fs = require('fs'), - lr = new LineByLineReader(BUILD_INFO_PATH); +var LineByLineReader = require('line-by-line'); +var mkdirp = require('mkdirp'); +var fs = require('fs'); +var lr = new LineByLineReader(BUILD_INFO_PATH); var firstline = ""; - if (process.env.TRAVIS_BUILD_NUMBER) { - var transformVersion = function (firstline) { - var versions = firstline.split("."); + var versions = firstline.split("."); - return versions[0] + '.' + versions[1] + '.' + process.env.TRAVIS_BUILD_NUMBER + '\n'; + return versions[0] + '.' + versions[1] + '.' + process.env.TRAVIS_BUILD_NUMBER + '\n'; }; lr.on('error', function (err) { - // 'err' contains error object + // 'err' contains error object }); lr.on('line', function (line) { - if (firstline == "") - firstline = line; - + if (firstline == "") { + firstline = line; + } }); lr.on('end', function () { - - var packages = fs.readFileSync(PACKAGES_PATH); - var verinfo = transformVersion(firstline); - var content = verinfo + packages; - mkdirp.sync(BUILD_PATH); - fs.writeFileSync(BUILD_PATH + "/version.txt", verinfo); - fs.writeFileSync(BUILD_INFO_PATH, content); - console.log('Version is ' + verinfo); - + var packages = fs.readFileSync(PACKAGES_PATH); + var verinfo = transformVersion(firstline); + var content = verinfo + packages; + mkdirp.sync(BUILD_PATH); + fs.writeFileSync(BUILD_PATH + "/version.txt", verinfo); + fs.writeFileSync(BUILD_INFO_PATH, content); + console.log('Version is ' + verinfo); }); - } diff --git a/README.md b/README.md index f956bce96ba..c3181d68fe8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![Rocket.Chat logo](https://rocket.chat/images/logo/logo-dark.svg?v3) -The Complete Open Source Chat Solution +The Ultimate Open Source WebChat Platform ## Demo @@ -28,11 +28,8 @@ Try it on Ubuntu: Try it with docker: -``` -docker-compose up -``` +[Deploy with docker](https://github.com/RocketChat/Rocket.Chat/wiki/Deploy-with-Docker) -and check it out at http://localhost:80 Download the Native Cross-Platform Desktop Application at [Rocket.Chat.Electron](https://github.com/RocketChat/Rocket.Chat.Electron/releases) @@ -81,45 +78,52 @@ It is a great solution for communities and companies wanting to privately host t - Avatars - Markdown - Emojis +- Media Embeds +- Link Previews - Sent Message Edit and Deletion - Transcripts / History - File Upload / Sharing - Full text search +- Live chat / Messaging call center +- LDAP Authentication - Support for Okta SSO through SAML v2 -- Live chat / Messaging call center - Alpha testing now! [Issue #519](https://github.com/RocketChat/Rocket.Chat/issues/519) -- I18n - Supports 22 Languages [Internationalization with Lingohub](https://translate.lingohub.com/engelgabriel/rocket-dot-chat/dashboard) -- Hubot Friendly - [Hubot Integration Project](https://github.com/RocketChat/hubot-rocketchat) -- Media Embeds -- Link Previews -- LDAP Authentication - [LDAP Authentication on Rocket.Chat Wiki](https://github.com/RocketChat/Rocket.Chat/wiki/LDAP-Authentication) -- Face to Face Video Conferencing aka WebRTC (Alpha) - [How to video chat](https://github.com/RocketChat/Rocket.Chat/wiki/Using-Face-to-face-video-conference-%28aka-webrtc%29) -- REST APIs - [Ready for testing ...](https://github.com/RocketChat/Rocket.Chat/wiki/REST-APIs) -- Remote Locations Video Monitoring - [Early access ...](https://github.com/RocketChat/Rocket.Chat/wiki/Remote-Video-Monitoring) -- Native Cross-Platform Desktop Application [Rocket.Chat.Electron - HELP WANTED](https://github.com/RocketChat/Rocket.Chat.Electron/releases) +- I18n - Supports 22 Languages +- Hubot Friendly +- Face to Face Video Conferencing (aka WebRTC) +- Multi-users Video Group Chat +- Audio calls +- Multi-users Audio Conference +- Screensharing +- REST APIs +- Remote Locations Video Monitoring +- Chat-ops powered by Hubot: scalable horizontal app integration (early access) +- 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) +- Sandstorm.io instant Rocket.Chat server [Now on Sandstorm App Store](https://apps.sandstorm.io/app/vfnwptfn02ty21w715snyyczw0nqxkv3jvawcah10c6z7hj1hnu0) ### Roadmap #### In Progress +- Support multiple teams on the same instance / same VPS infrastructure: [Issue #658](https://github.com/RocketChat/Rocket.Chat/issues/658), [Issue #630](https://github.com/RocketChat/Rocket.Chat/issues/630) - Support for PostgreSQL: [Issue #533](https://github.com/RocketChat/Rocket.Chat/issues/533), [Issue #822](https://github.com/RocketChat/Rocket.Chat/issues/822) - Native iOS Application [Issue #270](https://github.com/RocketChat/Rocket.Chat/issues/270), [Rocket.Chat.iOS - HELP WANTED](https://github.com/RocketChat/Rocket.Chat.iOS) - Native Android Application [Issue #271 - HELP WANTED](https://github.com/RocketChat/Rocket.Chat/issues/271) - Off-the-Record (OTR) Messaging [Issue #36](https://github.com/RocketChat/Rocket.Chat/issues/36), [Issue #268 - HELP WANTED](https://github.com/RocketChat/Rocket.Chat/issues/268) - API-enabled methods: [Issue #202](https://github.com/RocketChat/Rocket.Chat/issues/202), [Issue #454](https://github.com/RocketChat/Rocket.Chat/issues/454), [Issue #455](https://github.com/RocketChat/Rocket.Chat/issues/455), [Issue #759](https://github.com/RocketChat/Rocket.Chat/issues/759) -- Voice calls: [Issue #542](https://github.com/RocketChat/Rocket.Chat/issues/542) -- Screensharing: [Issue #418](https://github.com/RocketChat/Rocket.Chat/issues/418) +- Scalable WebRTC broadcaster / media-server integration, [Issue #1118 - HELP WANTED](https://github.com/RocketChat/Rocket.Chat/issues/1118) + #### Planned - Kerberos Authentication: [Issue #839](https://github.com/RocketChat/Rocket.Chat/issues/839) - XMPP Multi-user chat (MUC): [Issue #404](https://github.com/RocketChat/Rocket.Chat/issues/404) - More webhooks: GitLab, Confluence, Jira, Piwik, Wordpress: [Issue #233](https://github.com/RocketChat/Rocket.Chat/issues/233), [Issue #525](https://github.com/RocketChat/Rocket.Chat/issues/525), [Issue #637](https://github.com/RocketChat/Rocket.Chat/issues/637), [Issue #638](https://github.com/RocketChat/Rocket.Chat/issues/638), [Issue #747](https://github.com/RocketChat/Rocket.Chat/issues/747) -- Support multiple teams on the same instance / same VPS infrastructure: [Issue #658](https://github.com/RocketChat/Rocket.Chat/issues/658), [Issue #630](https://github.com/RocketChat/Rocket.Chat/issues/630) - Clusterize / Descentralize: [Issue #520](https://github.com/RocketChat/Rocket.Chat/issues/520), [Issue #601](https://github.com/RocketChat/Rocket.Chat/issues/601) - Anonymous use of Rocket.Chat: [Issue #604](https://github.com/RocketChat/Rocket.Chat/issues/604) - File Sharing via P2P and Scalable Multicast: [Issue #369](https://github.com/RocketChat/Rocket.Chat/issues/369), [Issue #370](https://github.com/RocketChat/Rocket.Chat/issues/370) - Anti-virus checking on file uploads: [Issue #757](https://github.com/RocketChat/Rocket.Chat/issues/757) +- Massively scalable hosting and provisioning ### Issues @@ -133,6 +137,13 @@ The docker image is ready. Everyone can start hacking the adapter code, or launch his/her own bot within a few minutes now. Please head over to the [Hubot Integration Project](https://github.com/RocketChat/hubot-rocketchat) for more information. + +#### Chat-ops integrations powered by Hubot + +Integrate your application with fly-in panels today! Early access is available for developers. + +![Sample integration of a Drones Fleet Management System](https://raw.githubusercontent.com/Sing-Li/bbug/master/images/dronechatops.png) + #### Many, many, many more to come! We are developing the APIs based on the competition, so stay tuned and you will see a lot happening here. diff --git a/build-old.sh b/build-old.sh new file mode 100755 index 00000000000..90b3c5b8eb8 --- /dev/null +++ b/build-old.sh @@ -0,0 +1,10 @@ +#!/bin/bash +source ./build-info.sh +export METEOR_SETTINGS=$(cat settings.json) +meteor add rocketchat:livechat +meteor add rocketchat:hubot +meteor build --server https://demo.rocket.chat --directory /var/www/rocket.chat +cd /var/www/rocket.chat/bundle/programs/server +npm install +cd /var/www/rocket.chat/current +pm2 startOrRestart /var/www/rocket.chat/current/pm2.json diff --git a/build.sh b/build.sh index f9bdc2f451e..ebaad4d327c 100755 --- a/build.sh +++ b/build.sh @@ -1,8 +1,15 @@ #!/bin/bash -cd /var/www/rocket.chat -https://s3.amazonaws.com/rocketchatbuild/demo.rocket.chat-v.latest.tgz" -o rocket.chat.tgz + +ROOTPATH=/var/www/rocket.chat +PM2FILE=pm2.json +if [ "$1" == "development" ]; then + ROOTPATH=/var/www/rocket.chat.dev + PM2FILE=pm2.dev.json +fi + +cd $ROOTPATH +curl -fSL "https://s3.amazonaws.com/rocketchatbuild/demo.rocket.chat-v.latest.tgz" -o rocket.chat.tgz tar zxvf rocket.chat.tgz && rm rocket.chat.tgz -cd /var/www/rocket.chat/bundle/programs/server +cd $ROOTPATH/bundle/programs/server npm install -cd /var/www/rocket.chat/current -pm2 startOrRestart /var/www/rocket.chat/current/pm2.json +pm2 startOrRestart $ROOTPATH/current/$PM2FILE diff --git a/client/lib/accountBox.coffee b/client/lib/accountBox.coffee index 86f1c483eb9..b546eb87e62 100644 --- a/client/lib/accountBox.coffee +++ b/client/lib/accountBox.coffee @@ -13,13 +13,13 @@ SideNav.closeFlex() return; status = 1 - self.options.removeClass("_hidden") + self.options.removeClass("animated-hidden") self.box.addClass("active") SideNav.toggleArrow 1 close = -> status = 0 - self.options.addClass("_hidden") + self.options.addClass("animated-hidden") self.box.removeClass("active") SideNav.toggleArrow -1 @@ -32,4 +32,4 @@ open: open close: close init: init -)() \ No newline at end of file +)() diff --git a/client/lib/fileUpload.coffee b/client/lib/fileUpload.coffee index 533f20a70b3..1cfba202797 100644 --- a/client/lib/fileUpload.coffee +++ b/client/lib/fileUpload.coffee @@ -24,6 +24,8 @@ readAsArrayBuffer = (file, callback) -> return readAsDataURL file.file, (fileContent) -> + return unless fileUploadIsValidContentType file.file.type + text = '' if file.type is 'audio' diff --git a/client/lib/sideNav.coffee b/client/lib/sideNav.coffee index 76334d22b0e..d55a61c6b6e 100644 --- a/client/lib/sideNav.coffee +++ b/client/lib/sideNav.coffee @@ -48,12 +48,12 @@ animating = true if status is -1 or (status isnt 1 and flexNav.opened) flexNav.opened = false - flexNav.addClass "hidden" + flexNav.addClass "animated-hidden" else flexNav.opened = true # added a delay to make sure the template is already rendered before animating it setTimeout -> - flexNav.removeClass "hidden" + flexNav.removeClass "animated-hidden" , 50 setTimeout -> animating = false diff --git a/client/views/admin/users/adminUsers.coffee b/client/views/admin/users/adminUsers.coffee index 63882d48097..3883baba47d 100644 --- a/client/views/admin/users/adminUsers.coffee +++ b/client/views/admin/users/adminUsers.coffee @@ -25,6 +25,12 @@ Template.adminUsers.helpers adminClass: -> return 'admin' if RocketChat.authz.hasRole(Meteor.userId(), 'admin') + username: -> + return '@' + @username if @username? + + emailAddress: -> + return _.map(@emails, (e) -> e.address).join(', ') + Template.adminUsers.onCreated -> instance = @ @limit = new ReactiveVar 50 diff --git a/client/views/admin/users/adminUsers.html b/client/views/admin/users/adminUsers.html index e85242b85f5..b2eeb6c1d83 100644 --- a/client/views/admin/users/adminUsers.html +++ b/client/views/admin/users/adminUsers.html @@ -21,22 +21,32 @@ {{{_ "Showing_results" users.length}}}
- {{#each users}} -
-
  • - {{> avatar username=username}} -

    {{name}}

    -
  • - -
    - {{/each}} + + + + + + + + + + + {{#each users}} + + + + + + + {{/each}} + +
     {{_ "Name"}}{{_ "Username"}}{{_ "E-mail"}}
    {{#if hasMore}} -
  • - -
  • + {{/if}}
    {{/unless}} diff --git a/client/views/app/messagePopup.coffee b/client/views/app/messagePopup.coffee index cbfa585796f..e154bd0c876 100644 --- a/client/views/app/messagePopup.coffee +++ b/client/views/app/messagePopup.coffee @@ -44,13 +44,13 @@ Template.messagePopup.onCreated -> template.suffix = val(template.data.suffix, ' ') if template.triggerAnywhere is true - template.matchSelectorRegex = val(template.data.matchSelectorRegex, new RegExp "(?:^| )#{template.trigger}[A-Za-z0-9-_.]*$") + template.matchSelectorRegex = val(template.data.matchSelectorRegex, new RegExp "(?:^| )#{template.trigger}[^\s]*$") else - template.matchSelectorRegex = val(template.data.matchSelectorRegex, new RegExp "(?:^)#{template.trigger}[A-Za-z0-9-_.]*$") + template.matchSelectorRegex = val(template.data.matchSelectorRegex, new RegExp "(?:^)#{template.trigger}[^\s]*$") - template.selectorRegex = val(template.data.selectorRegex, new RegExp "#{template.trigger}([A-Za-z0-9-_.]*)$") + template.selectorRegex = val(template.data.selectorRegex, new RegExp "#{template.trigger}([^\s]*)$") - template.replaceRegex = val(template.data.replaceRegex, new RegExp "#{template.trigger}[A-Za-z0-9-_.]*$") + template.replaceRegex = val(template.data.replaceRegex, new RegExp "#{template.trigger}[^\s]*$") template.getValue = val template.data.getValue, (_id) -> return _id diff --git a/client/views/app/room.coffee b/client/views/app/room.coffee index db74d4a9b22..32c57de48d5 100644 --- a/client/views/app/room.coffee +++ b/client/views/app/room.coffee @@ -221,6 +221,9 @@ Template.room.helpers compactView: -> return 'compact' if Meteor.user()?.settings?.preferences?.compactView + fileUploadAllowedMediaTypes: -> + return RocketChat.settings.get('FileUpload_MediaTypeWhiteList') + Template.room.events "touchstart .message": (e, t) -> message = this._arguments[1] diff --git a/client/views/app/room.html b/client/views/app/room.html index ff971c070aa..fd3b053b498 100644 --- a/client/views/app/room.html +++ b/client/views/app/room.html @@ -81,7 +81,7 @@
    - +
    {{> messagePopupConfig getPupupConfig}} @@ -152,4 +152,4 @@ {{> Template.dynamic template=flexTemplate data=flexData}}
    - + \ No newline at end of file diff --git a/client/views/app/sideNav/sideNav.html b/client/views/app/sideNav/sideNav.html index 89f7112635d..eaec5eb3c0d 100644 --- a/client/views/app/sideNav/sideNav.html +++ b/client/views/app/sideNav/sideNav.html @@ -23,7 +23,7 @@ - -