Skip to content
Snippets Groups Projects
Commit 9ddbd73e authored by Martin Schoeler's avatar Martin Schoeler
Browse files

Merge remote-tracking branch 'origin/develop' into markdown-unit-tests

parents 1817dd05 28366df0
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -105,8 +105,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
......
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
......@@ -197,32 +197,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();
}
......
......@@ -29,12 +29,3 @@ Package.onUse(function(api) {
api.addAssets(fontFiles, 'client');
});
Package.onTest(function(api) {
api.use('coffeescript');
api.use('sanjo:jasmine@0.20.2');
api.use('rocketchat:lib');
api.use('rocketchat:katex');
api.addFiles('tests/jasmine/client/unit/katex.spec.coffee', 'client');
});
......@@ -215,10 +215,3 @@ Package.onUse(function(api) {
api.imply('tap:i18n');
});
Package.onTest(function(api) {
api.use('coffeescript');
api.use('sanjo:jasmine@0.20.2');
api.use('rocketchat:lib');
api.addFiles('tests/jasmine/server/unit/models/_Base.spec.coffee', 'server');
});
......@@ -9,7 +9,6 @@ Package.onUse(function(api) {
api.use([
'templating',
'ecmascript',
'coffeescript',
'underscore',
'rocketchat:lib',
'less'
......
......@@ -9,7 +9,6 @@ Package.onUse(function(api) {
api.use([
'ecmascript',
'coffeescript',
'check',
'rocketchat:lib'
]);
......
......@@ -206,7 +206,7 @@ Template.message.helpers({
return Object.keys(this.reactions||{}).map(emoji => {
const reaction = this.reactions[emoji];
const total = reaction.usernames.length;
let usernames = reaction.usernames.slice(0, 15).map(username => username === userUsername ? t('You').toLowerCase() : `@${ userUsername }`).join(', ');
let usernames = reaction.usernames.slice(0, 15).map(username => username === userUsername ? t('You').toLowerCase() : `@${ username }`).join(', ');
if (total > 15) {
usernames = `${ usernames } ${ t('And_more', {
length: total - 15
......
......@@ -20,7 +20,6 @@ Package.onUse(function(api) {
'reactive-var',
'ecmascript',
'templating',
'coffeescript',
'underscore',
'rocketchat:lib',
'raix:push',
......
......@@ -2,7 +2,7 @@ import fs from 'fs';
import path from 'path';
RocketChat.Migrations.add({
version: 96,
version: 97,
up() {
const query = {
$or: [{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment