diff --git a/.docker/Dockerfile.rhel b/.docker/Dockerfile.rhel index 7766fd5f7155..7abbbd4f9847 100644 --- a/.docker/Dockerfile.rhel +++ b/.docker/Dockerfile.rhel @@ -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 diff --git a/.github/history.json b/.github/history.json index 6cc89786628c..5113ce28f65f 100644 --- a/.github/history.json +++ b/.github/history.json @@ -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" + ] + } + ] } } } \ No newline at end of file diff --git a/.sandstorm/sandstorm-pkgdef.capnp b/.sandstorm/sandstorm-pkgdef.capnp index 3a410b261d6b..a4bef3751335 100644 --- a/.sandstorm/sandstorm-pkgdef.capnp +++ b/.sandstorm/sandstorm-pkgdef.capnp @@ -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. diff --git a/.travis/snap.sh b/.travis/snap.sh index 2bf3e341809c..80507f5b2a76 100755 --- a/.travis/snap.sh +++ b/.travis/snap.sh @@ -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" diff --git a/HISTORY.md b/HISTORY.md index 965872048af0..6130fd6b0d07 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -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)) + +
+๐Ÿ” Minor changes + +- Fix: Add wizard opt-in fields ([#12298](https://github.com/RocketChat/Rocket.Chat/pull/12298)) + +
+ +### ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป Core Team ๐Ÿค“ + +- [@sampaiodiego](https://github.com/sampaiodiego) + # 0.70.3 `2018-10-08 ยท 1 ๐Ÿ” ยท 2 ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป` diff --git a/package.json b/package.json index a59051676189..c629784e6273 100644 --- a/package.json +++ b/package.json @@ -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/" diff --git a/packages/rocketchat-i18n/i18n/en.i18n.json b/packages/rocketchat-i18n/i18n/en.i18n.json index 04e33259f09f..ab294d7e47c8 100644 --- a/packages/rocketchat-i18n/i18n/en.i18n.json +++ b/packages/rocketchat-i18n/i18n/en.i18n.json @@ -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", diff --git a/packages/rocketchat-lib/rocketchat.info b/packages/rocketchat-lib/rocketchat.info index 53041841a070..0e0af4f40332 100644 --- a/packages/rocketchat-lib/rocketchat.info +++ b/packages/rocketchat-lib/rocketchat.info @@ -1,3 +1,3 @@ { - "version": "0.70.3" + "version": "0.70.4" } diff --git a/packages/rocketchat-lib/server/models/Users.js b/packages/rocketchat-lib/server/models/Users.js index c8ee1912fde1..70381872451c 100644 --- a/packages/rocketchat-lib/server/models/Users.js +++ b/packages/rocketchat-lib/server/models/Users.js @@ -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); diff --git a/packages/rocketchat-statistics/server/functions/get.js b/packages/rocketchat-statistics/server/functions/get.js index e8422b669ede..372aac151799 100644 --- a/packages/rocketchat-statistics/server/functions/get.js +++ b/packages/rocketchat-statistics/server/functions/get.js @@ -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')) { diff --git a/packages/rocketchat-ui/client/views/app/modal.js b/packages/rocketchat-ui/client/views/app/modal.js index a8f03c819be7..22630fef4e3e 100644 --- a/packages/rocketchat-ui/client/views/app/modal.js +++ b/packages/rocketchat-ui/client/views/app/modal.js @@ -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; @@ -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(); @@ -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() { diff --git a/packages/rocketchat-webdav/startup/messageBoxActions.js b/packages/rocketchat-webdav/startup/messageBoxActions.js index 8e03f97eabd5..d92167e28f5d 100644 --- a/packages/rocketchat-webdav/startup/messageBoxActions.js +++ b/packages/rocketchat-webdav/startup/messageBoxActions.js @@ -12,6 +12,7 @@ RocketChat.messageBox.actions.add('WebDAV', 'Add Server', { showFooter: false, closeOnCancel: true, html: true, + confirmOnEnter: false, }); }, }); diff --git a/server/startup/initialData.js b/server/startup/initialData.js index e37049d0c893..331f2e17a647 100644 --- a/server/startup/initialData.js +++ b/server/startup/initialData.js @@ -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');