[Site_Name] | | '
diff --git a/server/startup/migrations/v054.js b/server/startup/migrations/v054.js
index 2b955d33316..ef32323c4ea 100644
--- a/server/startup/migrations/v054.js
+++ b/server/startup/migrations/v054.js
@@ -1,6 +1,6 @@
RocketChat.Migrations.add({
version: 54,
- up: function() {
+ up() {
if (RocketChat && RocketChat.models && RocketChat.models.Users) {
// Set default message viewMode to 'normal' or 'cozy' depending on the users' current settings and remove the field 'compactView'
RocketChat.models.Users.update({ 'settings.preferences.compactView': true }, { $set: { 'settings.preferences.viewMode': 1 }, $unset: { 'settings.preferences.compactView': 1 } }, { multi: true });
diff --git a/server/startup/migrations/v055.js b/server/startup/migrations/v055.js
index 30eef917dad..ed1fed5ff9b 100644
--- a/server/startup/migrations/v055.js
+++ b/server/startup/migrations/v055.js
@@ -1,9 +1,9 @@
RocketChat.Migrations.add({
version: 55,
- up: function() {
+ up() {
RocketChat.models.Rooms.find({ 'topic': { $exists: 1, $ne: '' } }, { topic: 1 }).forEach(function(room) {
const topic = s.escapeHTML(room.topic);
- RocketChat.models.Rooms.update({ _id: room._id }, { $set: { topic: topic }});
+ RocketChat.models.Rooms.update({ _id: room._id }, { $set: { topic }});
RocketChat.models.Messages.update({ t: 'room_changed_topic', rid: room._id }, { $set: { msg: topic }});
});
}
diff --git a/server/startup/migrations/v056.js b/server/startup/migrations/v056.js
index 2c20633542c..8dc3333c3f3 100644
--- a/server/startup/migrations/v056.js
+++ b/server/startup/migrations/v056.js
@@ -1,6 +1,6 @@
RocketChat.Migrations.add({
version: 56,
- up: function() {
+ up() {
RocketChat.models.Messages.find({ _id: /\./ }).forEach(function(message) {
const oldId = message._id;
message._id = message._id.replace(/(.*)\.S?(.*)/, 'slack-$1-$2');
diff --git a/server/startup/migrations/v057.js b/server/startup/migrations/v057.js
index 8a18681d853..fa9dcccfb5d 100644
--- a/server/startup/migrations/v057.js
+++ b/server/startup/migrations/v057.js
@@ -1,6 +1,6 @@
RocketChat.Migrations.add({
version: 57,
- up: function() {
+ up() {
RocketChat.models.Messages.find({ _id: /slack-([a-zA-Z0-9]+)S([0-9]+-[0-9]+)/ }).forEach(function(message) {
const oldId = message._id;
message._id = message._id.replace(/slack-([a-zA-Z0-9]+)S([0-9]+-[0-9]+)/, 'slack-$1-$2');
diff --git a/server/startup/migrations/v058.js b/server/startup/migrations/v058.js
index 329900d3d5f..294a9c28fc7 100644
--- a/server/startup/migrations/v058.js
+++ b/server/startup/migrations/v058.js
@@ -1,6 +1,6 @@
RocketChat.Migrations.add({
version: 58,
- up: function() {
+ up() {
RocketChat.models.Settings.update({ _id: 'Push_gateway', value: 'https://rocket.chat' }, {
$set: {
value: 'https://gateway.rocket.chat',
diff --git a/server/startup/migrations/v059.js b/server/startup/migrations/v059.js
index 7f6a5583c66..4fbaebc3ebe 100644
--- a/server/startup/migrations/v059.js
+++ b/server/startup/migrations/v059.js
@@ -1,10 +1,10 @@
RocketChat.Migrations.add({
version: 59,
- up: function() {
+ up() {
const users = RocketChat.models.Users.find({}, { sort: { createdAt: 1 }, limit: 1 }).fetch();
if (users && users.length > 0) {
const createdAt = users[0].createdAt;
- RocketChat.models.Settings.update({ createdAt: { $exists: 0 } }, { $set: { createdAt: createdAt } }, { multi: true });
+ RocketChat.models.Settings.update({ createdAt: { $exists: 0 } }, { $set: { createdAt } }, { multi: true });
RocketChat.models.Statistics.update({ installedAt: { $exists: 0 } }, { $set: { installedAt: createdAt } }, { multi: true });
}
}
diff --git a/server/startup/migrations/v060.js b/server/startup/migrations/v060.js
index 963a6815904..eee784829f9 100644
--- a/server/startup/migrations/v060.js
+++ b/server/startup/migrations/v060.js
@@ -1,6 +1,6 @@
RocketChat.Migrations.add({
version: 60,
- up: function() {
+ up() {
let subscriptions = RocketChat.models.Subscriptions.find({ $or: [ { name: { $exists: 0 } }, { name: { $not: { $type: 2 } } } ] }).fetch();
if (subscriptions && subscriptions.length > 0) {
RocketChat.models.Subscriptions.remove({ _id: { $in: _.pluck(subscriptions, '_id') } });
diff --git a/server/startup/migrations/v061.js b/server/startup/migrations/v061.js
index df8d4383950..766351a2fb8 100644
--- a/server/startup/migrations/v061.js
+++ b/server/startup/migrations/v061.js
@@ -1,6 +1,6 @@
RocketChat.Migrations.add({
version: 61,
- up: function() {
+ up() {
RocketChat.models.Users.find({ active: false }).forEach(function(user) {
RocketChat.models.Subscriptions.setArchivedByUsername(user.username, true);
});
diff --git a/server/startup/migrations/v062.js b/server/startup/migrations/v062.js
index 20d968cec9e..1c51f11b8bc 100644
--- a/server/startup/migrations/v062.js
+++ b/server/startup/migrations/v062.js
@@ -1,6 +1,6 @@
RocketChat.Migrations.add({
version: 62,
- up: function() {
+ up() {
RocketChat.models.Settings.remove({ _id: 'Atlassian Crowd', type: 'group' });
}
});
diff --git a/server/startup/migrations/v063.js b/server/startup/migrations/v063.js
index 086d331a011..af27b43d34f 100644
--- a/server/startup/migrations/v063.js
+++ b/server/startup/migrations/v063.js
@@ -1,6 +1,6 @@
RocketChat.Migrations.add({
version: 63,
- up: function() {
+ up() {
const forward = RocketChat.models.Settings.findOne({ _id:'Livechat_forward_open_chats' });
const timeout = RocketChat.models.Settings.findOne({ _id:'Livechat_forward_open_chats_timeout' });
diff --git a/server/startup/migrations/v064.js b/server/startup/migrations/v064.js
index 854dd315e6f..aae3feff7b5 100644
--- a/server/startup/migrations/v064.js
+++ b/server/startup/migrations/v064.js
@@ -1,9 +1,9 @@
RocketChat.Migrations.add({
version: 64,
- up: function() {
+ up() {
RocketChat.models.Messages.find({ 't': 'room_changed_topic', 'msg': / }, { msg: 1 }).forEach(function(message) {
const msg = s.escapeHTML(message.msg);
- RocketChat.models.Messages.update({ _id: message._id }, { $set: { msg: msg }});
+ RocketChat.models.Messages.update({ _id: message._id }, { $set: { msg }});
});
}
});
diff --git a/server/startup/migrations/v065.js b/server/startup/migrations/v065.js
index 0b0b3d7386e..6dd19010607 100644
--- a/server/startup/migrations/v065.js
+++ b/server/startup/migrations/v065.js
@@ -1,6 +1,6 @@
RocketChat.Migrations.add({
version: 65,
- up: function() {
+ up() {
if (RocketChat && RocketChat.models && RocketChat.models.Settings) {
// New color settings - start with old settings as defaults
diff --git a/server/startup/migrations/v066.js b/server/startup/migrations/v066.js
index aee05226de3..9aa4b6cba83 100644
--- a/server/startup/migrations/v066.js
+++ b/server/startup/migrations/v066.js
@@ -1,6 +1,6 @@
RocketChat.Migrations.add({
version: 66,
- up: function() {
+ up() {
if (RocketChat && RocketChat.models && RocketChat.models.Settings) {
// New color settings - start with old settings as defaults
diff --git a/server/startup/migrations/v067.js b/server/startup/migrations/v067.js
index 86a10fd7417..cbef0d980f2 100644
--- a/server/startup/migrations/v067.js
+++ b/server/startup/migrations/v067.js
@@ -1,6 +1,6 @@
RocketChat.Migrations.add({
version: 67,
- up: function() {
+ up() {
if (RocketChat && RocketChat.models && RocketChat.models.LivechatDepartment) {
RocketChat.models.LivechatDepartment.model.update({}, {
$set: {
diff --git a/server/startup/migrations/v068.js b/server/startup/migrations/v068.js
index 24cb153d50c..68f695065a3 100644
--- a/server/startup/migrations/v068.js
+++ b/server/startup/migrations/v068.js
@@ -1,6 +1,6 @@
RocketChat.Migrations.add({
version: 68,
- up: function() {
+ up() {
const GoogleSiteVerification_id = RocketChat.models.Settings.findOne({ _id: 'GoogleSiteVerification_id' });
if (GoogleSiteVerification_id && GoogleSiteVerification_id.value) {
diff --git a/server/startup/migrations/v069.js b/server/startup/migrations/v069.js
index 8e56b7a932d..ba9a66d8185 100644
--- a/server/startup/migrations/v069.js
+++ b/server/startup/migrations/v069.js
@@ -1,6 +1,6 @@
RocketChat.Migrations.add({
version: 69,
- up: function() {
+ up() {
RocketChat.models.Settings.update({
'_id': 'theme-color-custom-scrollbar-color',
'value': 'rgba(255, 255, 255, 0.05)'
diff --git a/server/startup/migrations/v070.js b/server/startup/migrations/v070.js
index cd4df94d909..8fd11e7d2b2 100644
--- a/server/startup/migrations/v070.js
+++ b/server/startup/migrations/v070.js
@@ -1,13 +1,13 @@
RocketChat.Migrations.add({
version: 70,
- up: function() {
+ up() {
const settings = RocketChat.models.Settings.find({ _id: /^Accounts_OAuth_Custom_.+/ }).fetch();
for (const setting of settings) {
const _id = setting._id;
setting._id = setting._id.replace(/Accounts_OAuth_Custom_([A-Za-z0-9]+)_(.+)/, 'Accounts_OAuth_Custom-$1-$2');
setting._id = setting._id.replace(/Accounts_OAuth_Custom_([A-Za-z0-9]+)/, 'Accounts_OAuth_Custom-$1');
- RocketChat.models.Settings.remove({ _id: _id });
+ RocketChat.models.Settings.remove({ _id });
RocketChat.models.Settings.insert(setting);
}
}
diff --git a/server/startup/migrations/v071.js b/server/startup/migrations/v071.js
index b9dc8259ab9..19aef0607ea 100644
--- a/server/startup/migrations/v071.js
+++ b/server/startup/migrations/v071.js
@@ -1,6 +1,6 @@
RocketChat.Migrations.add({
version: 71,
- up: function() {
+ up() {
//Removes the reactions on messages which are the system type "rm" ;)
RocketChat.models.Messages.find({ 't': 'rm', 'reactions': { $exists: true, $not: {$size: 0} } }, { t: 1 }).forEach(function(message) {
RocketChat.models.Messages.update({ _id: message._id }, { $set: { reactions: [] }});
diff --git a/server/startup/migrations/v072.js b/server/startup/migrations/v072.js
index 01f298b18be..6bda6238adb 100644
--- a/server/startup/migrations/v072.js
+++ b/server/startup/migrations/v072.js
@@ -1,6 +1,6 @@
RocketChat.Migrations.add({
version: 72,
- up: function() {
+ up() {
RocketChat.models.Users.find({ type: 'visitor', 'emails.address': { $exists: true } }, { emails: 1 }).forEach(function(visitor) {
RocketChat.models.Users.update({ _id: visitor._id }, {
$set: {
diff --git a/server/startup/migrations/v073.js b/server/startup/migrations/v073.js
index e279a0b65ae..c255cb5a278 100644
--- a/server/startup/migrations/v073.js
+++ b/server/startup/migrations/v073.js
@@ -1,6 +1,6 @@
RocketChat.Migrations.add({
version: 73,
- up: function() {
+ up() {
RocketChat.models.Users.find({ 'oauth.athorizedClients': { $exists: true } }, { oauth: 1 }).forEach(function(user) {
RocketChat.models.Users.update({ _id: user._id }, {
$set: {
diff --git a/server/startup/migrations/v074.js b/server/startup/migrations/v074.js
index 656b226c4ef..032646e3630 100644
--- a/server/startup/migrations/v074.js
+++ b/server/startup/migrations/v074.js
@@ -1,6 +1,6 @@
RocketChat.Migrations.add({
version: 74,
- up: function() {
+ up() {
if (RocketChat && RocketChat.models && RocketChat.models.Settings) {
RocketChat.models.Settings.remove({_id: 'Assets_favicon_64'});
RocketChat.models.Settings.remove({_id: 'Assets_favicon_96'});
diff --git a/server/startup/migrations/v075.js b/server/startup/migrations/v075.js
index aaf3ba9b74f..b091ea33eb2 100644
--- a/server/startup/migrations/v075.js
+++ b/server/startup/migrations/v075.js
@@ -1,13 +1,13 @@
RocketChat.Migrations.add({
version: 71.1,
- up: function() {
+ up() {
ServiceConfiguration.configurations.remove({});
}
});
RocketChat.Migrations.add({
version: 75,
- up: function() {
+ up() {
ServiceConfiguration.configurations.remove({});
}
});
diff --git a/server/startup/migrations/v076.js b/server/startup/migrations/v076.js
index 4c19f9aaeee..b8945f1b603 100644
--- a/server/startup/migrations/v076.js
+++ b/server/startup/migrations/v076.js
@@ -1,6 +1,6 @@
RocketChat.Migrations.add({
version: 76,
- up: function() {
+ up() {
if (RocketChat && RocketChat.models && RocketChat.models.Settings) {
RocketChat.models.Settings.find({section: 'Colors (alphas)'}).forEach((setting) => {
RocketChat.models.Settings.remove({ _id: setting._id });
diff --git a/server/startup/migrations/v077.js b/server/startup/migrations/v077.js
index a2dc4b13468..7b18f288be9 100644
--- a/server/startup/migrations/v077.js
+++ b/server/startup/migrations/v077.js
@@ -1,6 +1,6 @@
RocketChat.Migrations.add({
version: 77,
- up: function() {
+ up() {
if (RocketChat && RocketChat.models && RocketChat.models.Rooms) {
RocketChat.models.Rooms.find({
t: 'l',
diff --git a/server/startup/migrations/v078.js b/server/startup/migrations/v078.js
index 41f5dbb4a5a..0780924855c 100644
--- a/server/startup/migrations/v078.js
+++ b/server/startup/migrations/v078.js
@@ -1,6 +1,6 @@
RocketChat.Migrations.add({
version: 78,
- up: function() {
+ up() {
RocketChat.models.Permissions.update({ _id: { $in: ['create-c', 'create-d', 'create-p'] }}, { $addToSet: { roles: 'bot' }}, { multi: true });
}
});
diff --git a/server/startup/migrations/v079.js b/server/startup/migrations/v079.js
index a3e4571bab9..ca87271c551 100644
--- a/server/startup/migrations/v079.js
+++ b/server/startup/migrations/v079.js
@@ -1,6 +1,6 @@
RocketChat.Migrations.add({
version: 79,
- up: function() {
+ up() {
const integrations = RocketChat.models.Integrations.find({type: 'webhook-incoming'}).fetch();
for (const integration of integrations) {
diff --git a/server/startup/migrations/v080.js b/server/startup/migrations/v080.js
index 1e2a66706f2..aa3d4e46666 100644
--- a/server/startup/migrations/v080.js
+++ b/server/startup/migrations/v080.js
@@ -1,6 +1,6 @@
RocketChat.Migrations.add({
version: 80,
- up: function() {
+ up() {
const query = {
type: 'webhook-outgoing',
$or: [{
diff --git a/server/startup/migrations/v081.js b/server/startup/migrations/v081.js
index 36f0d5f6f6d..eb751ca70eb 100644
--- a/server/startup/migrations/v081.js
+++ b/server/startup/migrations/v081.js
@@ -1,6 +1,6 @@
RocketChat.Migrations.add({
version: 81,
- up: function() {
+ up() {
RocketChat.models.OAuthApps.update({ _id: 'zapier' }, {
$set: {
active: true,
diff --git a/server/startup/migrations/v082.js b/server/startup/migrations/v082.js
index 93e88d9830e..8dd9ac18c1b 100644
--- a/server/startup/migrations/v082.js
+++ b/server/startup/migrations/v082.js
@@ -1,6 +1,6 @@
RocketChat.Migrations.add({
version: 82,
- up: function() {
+ up() {
const admins = RocketChat.authz.getUsersInRole('admin').fetch();
if (admins.length === 1 && admins[0]._id === 'rocket.cat') {
RocketChat.authz.removeUserFromRoles('rocket.cat', 'admin');
diff --git a/server/startup/migrations/v083.js b/server/startup/migrations/v083.js
index 4b91d08317e..6422665bd1d 100644
--- a/server/startup/migrations/v083.js
+++ b/server/startup/migrations/v083.js
@@ -1,11 +1,11 @@
RocketChat.Migrations.add({
version: 83,
- up: function() {
+ up() {
if (RocketChat && RocketChat.models && RocketChat.models.Settings && RocketChat.models.Users) {
const setting = RocketChat.models.Settings.findOne({ _id: 'InternalHubot_Username' });
if (setting && setting.value) {
const username = setting.value;
- const user = RocketChat.models.Users.findOne({ username: username });
+ const user = RocketChat.models.Users.findOne({ username });
if (!user && setting.value === 'Rocket.Cat') {
RocketChat.models.Settings.update({ _id: 'InternalHubot_Username' }, { $set: { value: 'rocket.cat', packageValue: 'rocket.cat' } });
}
diff --git a/server/startup/migrations/v086.js b/server/startup/migrations/v086.js
index f2f82c65d9e..2d3780cbf28 100644
--- a/server/startup/migrations/v086.js
+++ b/server/startup/migrations/v086.js
@@ -1,6 +1,6 @@
RocketChat.Migrations.add({
version: 86,
- up: function() {
+ up() {
// Disabled this migration for it was not updating any user
}
});
diff --git a/server/startup/migrations/v087.js b/server/startup/migrations/v087.js
index 1c61138c47f..cb7f7d04297 100644
--- a/server/startup/migrations/v087.js
+++ b/server/startup/migrations/v087.js
@@ -1,6 +1,6 @@
RocketChat.Migrations.add({
version: 87,
- up: function() {
+ up() {
if (RocketChat && RocketChat.models && RocketChat.models.Users) {
RocketChat.models.Users.update({ 'settings.preferences.newMessageNotification': false }, { $set: { 'settings.preferences.newMessageNotification': 'none' } }, { multi: true });
RocketChat.models.Users.update({ 'settings.preferences.newMessageNotification': true }, { $unset: { 'settings.preferences.newMessageNotification': 1 } }, { multi: true });
diff --git a/server/startup/migrations/v088.js b/server/startup/migrations/v088.js
index 6accae69dc0..9e52d841ca7 100644
--- a/server/startup/migrations/v088.js
+++ b/server/startup/migrations/v088.js
@@ -1,6 +1,6 @@
RocketChat.Migrations.add({
version: 88,
- up: function() {
+ up() {
if (RocketChat && RocketChat.models && RocketChat.models.Settings) {
const setting = RocketChat.models.Settings.findOne({ _id: 'Layout_Sidenav_Footer' });
if (setting && setting.value && setting.packageValue) {
diff --git a/tests/end-to-end/api/01-users.js b/tests/end-to-end/api/01-users.js
index 423800592e5..396146e05d1 100644
--- a/tests/end-to-end/api/01-users.js
+++ b/tests/end-to-end/api/01-users.js
@@ -29,7 +29,7 @@ describe('Users', function() {
email: apiEmail,
name: apiUsername,
username: apiUsername,
- password: password,
+ password,
active: true,
roles: ['user'],
joinDefaultChannels: true,
@@ -137,7 +137,7 @@ describe('Users', function() {
email: apiEmail,
name: 'edited'+apiUsername,
username: 'edited'+apiUsername,
- password: password,
+ password,
active: true,
roles: ['user']
}
diff --git a/tests/end-to-end/api/02-channels.js b/tests/end-to-end/api/02-channels.js
index 4ef4efb03c0..eea72bdf637 100644
--- a/tests/end-to-end/api/02-channels.js
+++ b/tests/end-to-end/api/02-channels.js
@@ -11,7 +11,7 @@ function getRoomInfo(roomId) {
request.get(api('channels.info'))
.set(credentials)
.query({
- roomId: roomId
+ roomId
})
.end((err, req) => {
resolve(req.body);
diff --git a/tests/end-to-end/api/03-groups.js b/tests/end-to-end/api/03-groups.js
index 462b8f399e9..3452b05ad15 100644
--- a/tests/end-to-end/api/03-groups.js
+++ b/tests/end-to-end/api/03-groups.js
@@ -11,7 +11,7 @@ function getRoomInfo(roomId) {
request.get(api('groups.info'))
.set(credentials)
.query({
- roomId: roomId
+ roomId
})
.end((err, req) => {
resolve(req.body);
diff --git a/tests/pageobjects/global.js b/tests/pageobjects/global.js
index b0a89f39e1d..c0b8ede63c0 100644
--- a/tests/pageobjects/global.js
+++ b/tests/pageobjects/global.js
@@ -14,8 +14,8 @@ class Global {
setWindowSize(width, height) {
browser.windowHandleSize({
- width: width,
- height: height
+ width,
+ height
});
}
|
|
|