Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/RocketChat/Rocket.Chat i…
Browse files Browse the repository at this point in the history
…nto clarapy-v4

* 'develop' of https://github.com/RocketChat/Rocket.Chat: (102 commits)
  Fix forbidden error on setAvatar REST endpoint (RocketChat#7159)
  Fix migration version
  Switch logic of artifact name (RocketChat#7158)
  fix reactions
  Remove missing CoffeeScript dependencies
  Update server.js
  Update server.js
  Update server.js
  [FIX] Fix highlightjs bug (RocketChat#6991)
  Convert hipchat importer to js
  Convert file unsubscribe.coffee to js
  Fix migration if email already exists
  [NEW] Internal Hubot load scripts from custom folders (RocketChat#7095)
  Unit: Fix mentions tests
  Unit: Fix mentions tests
  Fix tests
  remove the missing coffee files
  fix eslint
  Bump
  Update oauth2-client.js
  ...

# Conflicts:
#	packages/rocketchat-ui-master/.npm/package/npm-shrinkwrap.json
  • Loading branch information
John Hand authored and John Hand committed Jun 5, 2017
2 parents eadeef6 + 28366df commit dd6df73
Show file tree
Hide file tree
Showing 208 changed files with 4,450 additions and 3,553 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
"EJSON" : false,
"Email" : false,
"FlowRouter" : false,
"FileUpload" : false,
"HTTP" : false,
"getNextAgent" : false,
"handleError" : false,
Expand All @@ -132,7 +133,6 @@
"ReactiveVar" : false,
"RocketChat" : true,
"RocketChatFile" : false,
"RocketChatFileAvatarInstance": false,
"RoomHistoryManager" : false,
"RoomManager" : false,
"s" : false,
Expand Down
1 change: 0 additions & 1 deletion .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ accounts-password@1.3.6
accounts-twitter@1.2.1
blaze-html-templates
check@1.2.5
coffeescript@1.11.1_4
ddp-rate-limiter@1.0.7
ecmascript@0.7.3
ejson@1.0.13
Expand Down
2 changes: 0 additions & 2 deletions .meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ ordered-dict@1.0.9
ostrio:cookies@2.2.1
pauli:accounts-linkedin@2.1.2
pauli:linkedin-oauth@1.1.0
peerlibrary:aws-sdk@2.4.9_1
peerlibrary:blocking@0.5.2
percolate:synced-cron@1.3.2
promise@0.8.8
raix:eventemitter@0.1.3
Expand Down
6 changes: 3 additions & 3 deletions .travis/setartname.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
if [[ $TRAVIS_BRANCH ]]
if [[ $TRAVIS_TAG ]]
then
export ARTIFACT_NAME="$(meteor npm run version --silent).$TRAVIS_BUILD_NUMBER"
else
export ARTIFACT_NAME="$(meteor npm run version --silent)"
else
export ARTIFACT_NAME="$(meteor npm run version --silent).$TRAVIS_BUILD_NUMBER"
fi
10 changes: 8 additions & 2 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<a name="0.56.0"></a>
# NEXT

### Breaking Changes

- [#7095](https://github.com/RocketChat/Rocket.Chat/pull/7095) Internal hubot does not load [hubot-scripts](https://github.com/github/hubot-scripts) anymore.

# 0.56.0 (2017-05-15)

### New Features
Expand Down Expand Up @@ -51,7 +57,7 @@
- [#6780](https://github.com/RocketChat/Rocket.Chat/pull/6780) Convert Mailer Package to Js
- [#6694](https://github.com/RocketChat/Rocket.Chat/pull/6694) Convert markdown to js
- [#6689](https://github.com/RocketChat/Rocket.Chat/pull/6689) Convert Mentions-Flextab Package to Js
- [#6781](https://github.com/RocketChat/Rocket.Chat/pull/6781) Convert Message-Star Package to js
- [#6781](https://github.com/RocketChat/Rocket.Chat/pull/6781) Convert Message-Star Package to js
- [#6688](https://github.com/RocketChat/Rocket.Chat/pull/6688) Convert Oembed Package to Js
- [#6672](https://github.com/RocketChat/Rocket.Chat/pull/6672) Converted rocketchat-lib 3
- [#6654](https://github.com/RocketChat/Rocket.Chat/pull/6654) disable proxy configuration
Expand Down Expand Up @@ -168,7 +174,7 @@
- [#6780](https://github.com/RocketChat/Rocket.Chat/pull/6780) Convert Mailer Package to Js
- [#6694](https://github.com/RocketChat/Rocket.Chat/pull/6694) Convert markdown to js
- [#6689](https://github.com/RocketChat/Rocket.Chat/pull/6689) Convert Mentions-Flextab Package to Js
- [#6781](https://github.com/RocketChat/Rocket.Chat/pull/6781) Convert Message-Star Package to js
- [#6781](https://github.com/RocketChat/Rocket.Chat/pull/6781) Convert Message-Star Package to js
- [#6688](https://github.com/RocketChat/Rocket.Chat/pull/6688) Convert Oembed Package to Js
- [#6672](https://github.com/RocketChat/Rocket.Chat/pull/6672) Converted rocketchat-lib 3
- [#6654](https://github.com/RocketChat/Rocket.Chat/pull/6654) disable proxy configuration
Expand Down
12 changes: 12 additions & 0 deletions client/notifications/UsersNameChanged.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ Meteor.startup(function() {
multi: true
});

RocketChat.models.Messages.update({
mentions: {
$elemMatch: { _id }
}
}, {
$set: {
'mentions.$.name': name
}
}, {
multi: true
});

RocketChat.models.Subscriptions.update({
name: username,
t: 'd'
Expand Down
89 changes: 0 additions & 89 deletions lib/fileUpload.js

This file was deleted.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,13 @@
"supertest": "^3.0.0"
},
"dependencies": {
"@google-cloud/storage": "^1.1.1",
"aws-sdk": "^2.55.0",
"babel-runtime": "^6.23.0",
"bcrypt": "^1.0.2",
"codemirror": "^5.26.0",
"file-type": "^4.3.0",
"highlight.js": "^9.11.0",
"highlight.js": "^9.12.0",
"jquery": "^3.2.1",
"mime-db": "^1.28.0",
"mime-type": "^3.0.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/rocketchat-api/server/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class API extends Restivus {
try {
result = originalAction.apply(this);
} catch (e) {
this.logger.debug(`${ method } ${ route } threw an error:`, e);
this.logger.debug(`${ method } ${ route } threw an error:`, e.stack);
return RocketChat.API.v1.failure(e.message, e.error);
}

Expand Down
22 changes: 22 additions & 0 deletions packages/rocketchat-api/server/v1/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,28 @@ RocketChat.API.v1.addRoute('chat.delete', { authRequired: true }, {
}
});

RocketChat.API.v1.addRoute('chat.getMessage', { authRequired: true }, {
get() {
if (!this.queryParams.msgId) {
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);
});

if (!msg) {
return RocketChat.API.v1.failure();
}

return RocketChat.API.v1.success({
message: msg
});
}
});

RocketChat.API.v1.addRoute('chat.postMessage', { authRequired: true }, {
post() {
const messageReturn = processWebhookMessage(this.bodyParams, this.user)[0];
Expand Down
50 changes: 26 additions & 24 deletions packages/rocketchat-api/server/v1/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,32 +229,34 @@ RocketChat.API.v1.addRoute('users.setAvatar', { authRequired: true }, {
return RocketChat.API.v1.unauthorized();
}

if (this.bodyParams.avatarUrl) {
RocketChat.setUserAvatar(user, this.bodyParams.avatarUrl, '', 'url');
} else {
const Busboy = Npm.require('busboy');
const busboy = new Busboy({ headers: this.request.headers });

Meteor.wrapAsync((callback) => {
busboy.on('file', Meteor.bindEnvironment((fieldname, file, filename, encoding, mimetype) => {
if (fieldname !== 'image') {
return callback(new Meteor.Error('invalid-field'));
}

const imageData = [];
file.on('data', Meteor.bindEnvironment((data) => {
imageData.push(data);
}));
Meteor.runAsUser(user._id, () => {
if (this.bodyParams.avatarUrl) {
RocketChat.setUserAvatar(user, this.bodyParams.avatarUrl, '', 'url');
} else {
const Busboy = Npm.require('busboy');
const busboy = new Busboy({ headers: this.request.headers });

Meteor.wrapAsync((callback) => {
busboy.on('file', Meteor.bindEnvironment((fieldname, file, filename, encoding, mimetype) => {
if (fieldname !== 'image') {
return callback(new Meteor.Error('invalid-field'));
}

const imageData = [];
file.on('data', Meteor.bindEnvironment((data) => {
imageData.push(data);
}));

file.on('end', Meteor.bindEnvironment(() => {
RocketChat.setUserAvatar(user, Buffer.concat(imageData), mimetype, 'rest');
callback();
}));

file.on('end', Meteor.bindEnvironment(() => {
RocketChat.setUserAvatar(user, Buffer.concat(imageData), mimetype, 'rest');
callback();
}));

}));
this.request.pipe(busboy);
})();
}
this.request.pipe(busboy);
})();
}
});

return RocketChat.API.v1.success();
}
Expand Down
65 changes: 0 additions & 65 deletions packages/rocketchat-file-upload/client/lib/FileUploadAmazonS3.js

This file was deleted.

Loading

0 comments on commit dd6df73

Please sign in to comment.