Skip to content

Commit

Permalink
Merge pull request #12299 from RocketChat/release-0.70.4
Browse files Browse the repository at this point in the history
Release 0.70.4
  • Loading branch information
sampaiodiego authored Oct 9, 2018
2 parents 09521ca + b5df530 commit dbff6ee
Show file tree
Hide file tree
Showing 13 changed files with 79 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .docker/Dockerfile.rhel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM registry.access.redhat.com/rhscl/nodejs-8-rhel7

ENV RC_VERSION 0.70.3
ENV RC_VERSION 0.70.4

MAINTAINER buildmaster@rocket.chat

Expand Down
22 changes: 22 additions & 0 deletions .github/history.json
Original file line number Diff line number Diff line change
Expand Up @@ -19871,6 +19871,28 @@
]
}
]
},
"0.70.4": {
"node_version": "8.11.3",
"npm_version": "5.6.0",
"pull_requests": [
{
"pr": "12283",
"title": "[FIX] Modal confirm on enter",
"userLogin": "sampaiodiego",
"contributors": [
"sampaiodiego"
]
},
{
"pr": "12298",
"title": "Fix: Add wizard opt-in fields",
"userLogin": "sampaiodiego",
"contributors": [
"sampaiodiego"
]
}
]
}
}
}
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 = 109, # Increment this for every release.
appVersion = 110, # Increment this for every release.

appMarketingVersion = (defaultText = "0.70.3"),
appMarketingVersion = (defaultText = "0.70.4"),
# 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 .travis/snap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ elif [[ $TRAVIS_TAG ]]; then
RC_VERSION=$TRAVIS_TAG
else
CHANNEL=edge
RC_VERSION=0.70.3
RC_VERSION=0.70.4
fi

echo "Preparing to trigger a snap release for $CHANNEL channel"
Expand Down
22 changes: 22 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@

# 0.70.4
`2018-10-09 · 1 🐛 · 1 🔍 · 1 👩‍💻👨‍💻`

### Engine versions
- Node: `8.11.3`
- NPM: `5.6.0`

### 🐛 Bug fixes

- Modal confirm on enter ([#12283](https://github.com/RocketChat/Rocket.Chat/pull/12283))

<details>
<summary>🔍 Minor changes</summary>

- Fix: Add wizard opt-in fields ([#12298](https://github.com/RocketChat/Rocket.Chat/pull/12298))

</details>

### 👩‍💻👨‍💻 Core Team 🤓

- [@sampaiodiego](https://github.com/sampaiodiego)

# 0.70.3
`2018-10-08 · 1 🔍 · 2 👩‍💻👨‍💻`

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Rocket.Chat",
"description": "The Ultimate Open Source WebChat Platform",
"version": "0.70.3",
"version": "0.70.4",
"author": {
"name": "Rocket.Chat",
"url": "https://rocket.chat/"
Expand Down
1 change: 1 addition & 0 deletions packages/rocketchat-i18n/i18n/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,7 @@
"Encrypted": "Encrypted",
"Encrypted_channel_Description": "End to end encrypted channel. Search will not work with encrypted channels and notifications may not show the messages content.",
"Encrypted_message": "Encrypted message",
"Encrypted_setting_changed_successfully": "Encrypted setting changed successfully",
"EncryptionKey_Change_Disabled": "You can't set a password for your encryption key because your private key is not present on this client. In order to set a new password you need load your private key using your existing password or use a client where the key is already loaded.",
"Encryption_key_saved_successfully": "Your encryption key was saved successfully.",
"End_OTR": "End OTR",
Expand Down
2 changes: 1 addition & 1 deletion packages/rocketchat-lib/rocketchat.info
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "0.70.3"
"version": "0.70.4"
}
17 changes: 17 additions & 0 deletions packages/rocketchat-lib/server/models/Users.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,23 @@ class ModelUsers extends RocketChat.models._Base {
return this.find(query, options);
}

getOldest(fields = { _id: 1 }) {
const query = {
_id: {
$ne: 'rocket.cat',
},
};

const options = {
fields,
sort: {
createdAt: 1,
},
};

return this.findOne(query, options);
}

// UPDATE
addImportIds(_id, importIds) {
importIds = [].concat(importIds);
Expand Down
6 changes: 6 additions & 0 deletions packages/rocketchat-statistics/server/functions/get.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ RocketChat.statistics.get = function _getStatistics() {
}
});

if (statistics.wizard.allowMarketingEmails) {
const firstUser = RocketChat.models.Users.getOldest({ name: 1, emails: 1 });
statistics.wizard.contactName = firstUser && firstUser.name;
statistics.wizard.contactEmail = firstUser && firstUser.emails[0].address;
}

// Version
statistics.uniqueId = RocketChat.settings.get('uniqueID');
if (RocketChat.models.Settings.findOne('uniqueID')) {
Expand Down
6 changes: 3 additions & 3 deletions packages/rocketchat-ui/client/views/app/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ this.modal = {
config.closeOnConfirm = config.closeOnConfirm == null ? true : config.closeOnConfirm;
config.showConfirmButton = config.showConfirmButton == null ? true : config.showConfirmButton;
config.showFooter = config.showConfirmButton === true || config.showCancelButton === true;
config.confirmOnEnter = config.confirmOnEnter || true;
config.confirmOnEnter = config.confirmOnEnter == null ? true : config.confirmOnEnter;

if (config.type === 'input') {
config.input = true;
Expand Down Expand Up @@ -70,7 +70,7 @@ this.modal = {
errorEl.style.display = 'block';
},
onKeydown(e) {
if (this.config.confirmOnEnter && e.key === 'Enter') {
if (modal.config.confirmOnEnter && e.key === 'Enter') {
e.preventDefault();
e.stopPropagation();

Expand Down Expand Up @@ -106,7 +106,7 @@ Template.rc_modal.onRendered(function() {
$('.js-modal-input').focus();
}

document.addEventListener('keydown', modal.onKeydown.bind(this));
document.addEventListener('keydown', modal.onKeydown);
});

Template.rc_modal.onDestroyed(function() {
Expand Down
1 change: 1 addition & 0 deletions packages/rocketchat-webdav/startup/messageBoxActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ RocketChat.messageBox.actions.add('WebDAV', 'Add Server', {
showFooter: false,
closeOnCancel: true,
html: true,
confirmOnEnter: false,
});
},
});
Expand Down
13 changes: 1 addition & 12 deletions server/startup/initialData.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,7 @@ Meteor.startup(function() {
}

if (_.isEmpty(RocketChat.authz.getUsersInRole('admin').fetch())) {
const oldestUser = RocketChat.models.Users.findOne({
_id: {
$ne: 'rocket.cat',
},
}, {
fields: {
username: 1,
},
sort: {
createdAt: 1,
},
});
const oldestUser = RocketChat.models.Users.getOldest({ _id: 1, username: 1, name: 1 });

if (oldestUser) {
RocketChat.authz.addUserRoles(oldestUser._id, 'admin');
Expand Down

0 comments on commit dbff6ee

Please sign in to comment.