Skip to content

Commit

Permalink
Merge pull request #1 from RocketChat/develop
Browse files Browse the repository at this point in the history
asd
  • Loading branch information
snaiperskaya96 authored Jan 13, 2017
2 parents e7e666a + 74d1fd0 commit 9d6fc99
Show file tree
Hide file tree
Showing 161 changed files with 4,041 additions and 3,276 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ packages/rocketchat-ui/lib/Modernizr.js
packages/rocketchat-ui/lib/recorderjs/recorder.js
packages/rocketchat-ui/lib/textarea-autogrow.js
packages/rocketchat-videobridge/client/public/external_api.js
packages/rocketchat-theme/client/vendor/
private/moment-locales/
public/livechat/
public/recorderWorker.js
2 changes: 1 addition & 1 deletion .meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ mystor:device-detection@0.2.0
nimble:restivus@0.8.11
nooitaf:colors@1.1.2_1
npm-bcrypt@0.9.2
npm-mongo@2.2.11_2
npm-mongo@2.2.16_1
oauth@1.1.12
oauth1@1.1.11
oauth2@1.1.11
Expand Down
4 changes: 2 additions & 2 deletions .sandstorm/sandstorm-pkgdef.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ const pkgdef :Spk.PackageDefinition = (

appTitle = (defaultText = "Rocket.Chat"),

appVersion = 49, # Increment this for every release.
appVersion = 50, # Increment this for every release.

appMarketingVersion = (defaultText = "0.49.0-develop"),
appMarketingVersion = (defaultText = "0.50.0-develop"),
# Human-readable representation of appVersion. Should match the way you
# identify versions of your app in documentation and marketing.

Expand Down
2 changes: 1 addition & 1 deletion .snapcraft/edge/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# 5. `snapcraft snap`

name: rocketchat-server
version: 0.49.0-develop
version: 0.50.0-develop
summary: Rocket.Chat server
description: Have your own Slack like online chat, built with Meteor. https://rocket.chat/
confinement: strict
Expand Down
2 changes: 1 addition & 1 deletion .snapcraft/stable/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# 5. `snapcraft snap`

name: rocketchat-server
version: 0.49.0-develop
version: 0.50.0-develop
summary: Rocket.Chat server
description: Have your own Slack like online chat, built with Meteor. https://rocket.chat/
confinement: strict
Expand Down
2 changes: 1 addition & 1 deletion .travis/snap.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -x

set -euvo pipefail
IFS=$'\n\t'

Expand Down
39 changes: 39 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,44 @@
# History

## 0.49.0 - 2017-Jan-11

### Now uses NodeJS 4.7.1

- Add basic support for RFC 7233
- Add Button to block direct message
- Add caching layer using LokiDB
- Add custom fields to user's profile
- Add discard and reset button to admin panels
- Add email address validation to livechat offline messages
- Add file name and description on file upload
- Add Livechat domains validations
- Add many API endpoints, see https://rocket.chat/docs/developer-guides/rest-api/
- Add methods from rest api 0.5 to v1
- Add stylelint to CSS and LESS files
- Add the migration for bots to be able to create rooms
- Allow alias, avatar, and emoji in the sendFileMessage.
- Allow query, sort, and fields on the queryParams of the rest api
- Allow to merge users with LDAP on bulk sync
- Bi-directional Sladk message edit, delete and reactions
- Disable animations when TEST_MODE=true
- Do not require .jpg for avatar url and return correct content type
- Enable CDN_PREFIX for avatars
- Fix crash at startup if Slack bridge enabled and slack.com is not reachable #5426
- Fix importer relying on os file type, use file signature. Closes #3050
- Fix issue creating users with username from OAuth
- Fix screen sharing bug when receiving audio call. issue #5286
- Migrate livechat visitors' emails field to visitorEmails
- New livechat layout
- Normalize favicons, tiles and touchicons
- Refactored API endpoints to more closely conform to Slack API conventions and naming conventions
- Remove alpha colors and add disabled buttons style
- Sets default avatar after setting username for the first time by default
- Several performance improvements
- Styles cleanup (#5354) (#5364)
- Support SAML IDP-initiated login mode
- Update docker-compose to version 2
- Use CodeMirror from Npm

## 0.48.2 - 2016-Dec-20

- Add button to refresh aouth services
Expand Down
2 changes: 1 addition & 1 deletion client/notifications/updateAvatar.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* globals updateAvatarOfUsername */

Meteor.startup(function() {
RocketChat.Notifications.onAll('updateAvatar', function(data) {
RocketChat.Notifications.onLogged('updateAvatar', function(data) {
updateAvatarOfUsername(data.username);
});
});
4 changes: 0 additions & 4 deletions client/routes/adminRouter.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
FlowRouter.route('/admin/users', {
name: 'admin-users',
action() {
RocketChat.TabBar.showGroup('adminusers');
BlazeLayout.render('main', {center: 'adminUsers'});
}
});

FlowRouter.route('/admin/rooms', {
name: 'admin-rooms',
action() {
RocketChat.TabBar.showGroup('adminrooms');
BlazeLayout.render('main', {center: 'adminRooms'});
}
});

FlowRouter.route('/admin/info', {
name: 'admin-info',
action() {
RocketChat.TabBar.showGroup('adminInfo');
BlazeLayout.render('main', {center: 'adminInfo'});
}
});
Expand Down Expand Up @@ -46,7 +43,6 @@ FlowRouter.route('/admin/import/progress/:importer', {
FlowRouter.route('/admin/:group?', {
name: 'admin',
action() {
RocketChat.TabBar.showGroup('admin');
BlazeLayout.render('main', {center: 'admin'});
}
});
4 changes: 0 additions & 4 deletions client/routes/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ FlowRouter.route('/home', {
name: 'home',

action(params, queryParams) {
RocketChat.TabBar.showGroup('home');
KonchatNotification.getDesktopPermission();
if (queryParams.saml_idp_credentialToken !== undefined) {
Accounts.callLoginMethod({
Expand All @@ -73,7 +72,6 @@ FlowRouter.route('/changeavatar', {
name: 'changeAvatar',

action() {
RocketChat.TabBar.showGroup('changeavatar');
BlazeLayout.render('main', {center: 'avatarPrompt'});
}
});
Expand All @@ -86,7 +84,6 @@ FlowRouter.route('/account/:group?', {
params.group = 'Preferences';
}
params.group = _.capitalize(params.group, true);
RocketChat.TabBar.showGroup('account');
BlazeLayout.render('main', { center: `account${params.group}` });
}
});
Expand All @@ -100,7 +97,6 @@ FlowRouter.route('/history/private', {

action() {
Session.setDefault('historyFilter', '');
RocketChat.TabBar.showGroup('private-history');
BlazeLayout.render('main', {center: 'privateHistory'});
}
});
Expand Down
154 changes: 77 additions & 77 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,79 +1,79 @@
{
"name": "Rocket.Chat",
"description": "The Ultimate Open Source WebChat Platform",
"version": "0.49.0-develop",
"author": {
"name": "Rocket.Chat",
"url": "https://rocket.chat/"
},
"contributors": [
{
"name": "Aaron Ogle",
"email": "aaron.ogle@rocket.chat"
},
{
"name": "Bradley Hilton",
"email": "bradley.hilton@rocket.chat"
},
{
"name": "Diego Sampaio",
"email": "diego.sampaio@rocket.chat"
},
{
"name": "Gabriel Engel",
"email": "gabriel.engel@rocket.chat"
},
{
"name": "Marcelo Schmidt",
"email": "marcelo.schmidt@rocket.chat"
},
{
"name": "Rodrigo Nascimento",
"email": "rodrigo.nascimento@rocket.chat"
},
{
"name": "Sing Li",
"email": "sing.li@rocket.chat"
}
],
"keywords": [
"rocketchat",
"rocket",
"chat"
],
"scripts": {
"start": "meteor npm i && meteor",
"lint": "eslint .",
"stylelint": "stylelint **/*.less",
"test": "node .scripts/start.js",
"deploy": "npm run build && pm2 startOrRestart pm2.json",
"chimp-watch": "chimp --ddp=http://localhost:3000 --watch --mocha --path=tests/steps",
"chimp-test": "chimp tests/chimp-config.js"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/RocketChat/Rocket.Chat.git"
},
"bugs": {
"url": "https://github.com/RocketChat/Rocket.Chat/issues",
"email": "support@rocket.chat"
},
"devDependencies": {
"chimp": "^0.45.1",
"eslint": "^3.12.2",
"stylelint": "^7.7.1",
"supertest": "^2.0.1"
},
"dependencies": {
"jquery": "^2.1.0",
"babel-runtime": "^6.20.0",
"bcrypt": "^1.0.2",
"moment": "^2.17.1",
"moment-timezone": "^0.5.11",
"toastr": "^2.1.2",
"mime-types": "2.1.13",
"file-type": "4.0.0",
"codemirror": "5.22.0"
}
"name": "Rocket.Chat",
"description": "The Ultimate Open Source WebChat Platform",
"version": "0.50.0-develop",
"author": {
"name": "Rocket.Chat",
"url": "https://rocket.chat/"
},
"contributors": [
{
"name": "Aaron Ogle",
"email": "aaron.ogle@rocket.chat"
},
{
"name": "Bradley Hilton",
"email": "bradley.hilton@rocket.chat"
},
{
"name": "Diego Sampaio",
"email": "diego.sampaio@rocket.chat"
},
{
"name": "Gabriel Engel",
"email": "gabriel.engel@rocket.chat"
},
{
"name": "Marcelo Schmidt",
"email": "marcelo.schmidt@rocket.chat"
},
{
"name": "Rodrigo Nascimento",
"email": "rodrigo.nascimento@rocket.chat"
},
{
"name": "Sing Li",
"email": "sing.li@rocket.chat"
}
],
"keywords": [
"rocketchat",
"rocket",
"chat"
],
"scripts": {
"start": "meteor npm i && meteor",
"lint": "eslint .",
"stylelint": "stylelint **/*.less",
"test": "node .scripts/start.js",
"deploy": "npm run build && pm2 startOrRestart pm2.json",
"chimp-watch": "chimp --ddp=http://localhost:3000 --watch --mocha --path=tests/steps",
"chimp-test": "chimp tests/chimp-config.js"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/RocketChat/Rocket.Chat.git"
},
"bugs": {
"url": "https://github.com/RocketChat/Rocket.Chat/issues",
"email": "support@rocket.chat"
},
"devDependencies": {
"chimp": "^0.45.1",
"eslint": "^3.13.1",
"stylelint": "^7.7.1",
"supertest": "^2.0.1"
},
"dependencies": {
"jquery": "^2.1.0",
"babel-runtime": "^6.20.0",
"bcrypt": "^1.0.2",
"moment": "^2.17.1",
"moment-timezone": "^0.5.11",
"toastr": "^2.1.2",
"mime-types": "2.1.13",
"file-type": "4.0.0",
"codemirror": "5.22.0"
}
}
28 changes: 28 additions & 0 deletions packages/rocketchat-action-links/both/lib/actionLinks.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//Action Links namespace creation.
RocketChat.actionLinks = {
actions: {},
register: function(name, funct) {
RocketChat.actionLinks.actions[name] = funct;
},
getMessage: function(name, messageId) {
if (!Meteor.userId()) {
throw new Meteor.Error('error-invalid-user', 'Invalid user', { function: 'actionLinks.getMessage' });
}

var message = RocketChat.models.Messages.findOne({ _id: messageId });
if (!message) {
throw new Meteor.Error('error-invalid-message', 'Invalid message', { function: 'actionLinks.getMessage' });
}

var room = RocketChat.models.Rooms.findOne({ _id: message.rid });
if (Array.isArray(room.usernames) && room.usernames.indexOf(Meteor.user().username) === -1) {
throw new Meteor.Error('error-not-allowed', 'Not allowed', { function: 'actionLinks.getMessage' });
}

if (!message.actionLinks || !message.actionLinks[name]) {
throw new Meteor.Error('error-invalid-actionlink', 'Invalid action link', { function: 'actionLinks.getMessage' });
}

return message;
}
};
4 changes: 2 additions & 2 deletions packages/rocketchat-action-links/client/init.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* globals fireGlobalEvent */
Template.room.events({
'click .action-link'(event) {
'click .action-link'(event, instance) {
event.preventDefault();
event.stopPropagation();

Expand All @@ -15,7 +15,7 @@ Template.room.events({
}

if (data && data._arguments && data._arguments[1] && data._arguments[1]._id) {
Meteor.call('actionLinkHandler', $(event.currentTarget).data('actionlink'), data._arguments[1]._id, (err) => {
RocketChat.actionLinks.run($(event.currentTarget).data('actionlink'), data._arguments[1]._id, instance, (err) => {
if (err) {
handleError(err);
}
Expand Down
23 changes: 23 additions & 0 deletions packages/rocketchat-action-links/client/lib/actionLinks.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//Action Links Handler. This method will be called off the client.

RocketChat.actionLinks.run = (name, messageId, instance) => {
var message = RocketChat.actionLinks.getMessage(name, messageId);

var actionLink = message.actionLinks[name];

var ranClient = false;

if (RocketChat.actionLinks && RocketChat.actionLinks.actions && RocketChat.actionLinks.actions[actionLink.method_id]) {
// run just on client side
RocketChat.actionLinks.actions[actionLink.method_id](message, actionLink.params, instance);

ranClient = true;
}

// and run on server side
Meteor.call('actionLinkHandler', name, messageId, (err) => {
if (err && !ranClient) {
handleError(err);
}
});
};
Loading

0 comments on commit 9d6fc99

Please sign in to comment.