Merge pull request #13040 from RocketChat/release-0.73.0

Release 0.73.0
pull/13050/head 0.73.0
Rodrigo Nascimento 7 years ago committed by GitHub
commit 8442666b51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .circleci/setartname.sh
  2. 6
      .circleci/snap.sh
  3. 3
      .circleci/update-releases.sh
  4. 2
      .docker/Dockerfile.rhel
  5. 56
      .eslintrc
  6. 116
      .github/changelog.js
  7. 2764
      .github/history.json
  8. 40
      .github/templates/commit.hbs
  9. 11
      .github/templates/footer.hbs
  10. 26
      .github/templates/header.hbs
  11. 22
      .github/templates/template.hbs
  12. 7
      .meteor/packages
  13. 2
      .meteor/release
  14. 29
      .meteor/versions
  15. 4
      .sandstorm/sandstorm-pkgdef.capnp
  16. 2
      .scripts/set-version.js
  17. 2
      .scripts/version.js
  18. 4
      .snapcraft/resources/Caddyfile
  19. 49
      .snapcraft/resources/initcaddy
  20. 16
      .snapcraft/resources/startRocketChat
  21. 122
      .snapcraft/snap/hooks/configure
  22. 16
      .snapcraft/snap/hooks/install
  23. 14
      .snapcraft/snap/snapcraft.yaml
  24. 2
      .travis/snap.sh
  25. 206
      HISTORY.md
  26. 19
      LIMITATION_OF_RESPONSIBILITY.md
  27. 15
      README.md
  28. 1
      client/methods/updateMessage.js
  29. 2
      client/notifications/notification.js
  30. 2
      client/notifications/updateAvatar.js
  31. 2
      client/notifications/updateUserState.js
  32. 2
      client/routes/router.js
  33. 2
      client/startup/i18n.js
  34. 3
      client/startup/startup.js
  35. 6
      client/startup/unread.js
  36. 2
      imports/message-read-receipt/client/room.js
  37. 1
      imports/personal-access-tokens/client/personalAccessTokens.js
  38. 14395
      package-lock.json
  39. 104
      package.json
  40. 1
      packages/chatpal-search/client/index.js
  41. 2
      packages/chatpal-search/client/route.js
  42. 4
      packages/chatpal-search/package.js
  43. 1
      packages/meteor-accounts-saml/client/saml_client.js
  44. 4
      packages/meteor-accounts-saml/server/saml_server.js
  45. 1
      packages/meteor-autocomplete/client/index.js
  46. 3
      packages/meteor-autocomplete/package.js
  47. 3
      packages/rocketchat-2fa/client/TOTPPassword.js
  48. 3
      packages/rocketchat-2fa/client/accountSecurity.js
  49. 1
      packages/rocketchat-2fa/package.js
  50. 1
      packages/rocketchat-action-links/client/index.js
  51. 1
      packages/rocketchat-action-links/package.js
  52. 3
      packages/rocketchat-api/server/helpers/parseJsonQuery.js
  53. 1
      packages/rocketchat-api/server/index.js
  54. 33
      packages/rocketchat-api/server/v1/chat.js
  55. 3
      packages/rocketchat-api/server/v1/emoji-custom.js
  56. 42
      packages/rocketchat-api/server/v1/import.js
  57. 39
      packages/rocketchat-api/server/v1/permissions.js
  58. 19
      packages/rocketchat-api/server/v1/users.js
  59. 4
      packages/rocketchat-apps/client/admin/appManage.html
  60. 3
      packages/rocketchat-apps/client/admin/apps.js
  61. 1
      packages/rocketchat-apps/package.js
  62. 12
      packages/rocketchat-apps/server/bridges/environmental.js
  63. 1
      packages/rocketchat-authorization/client/index.js
  64. 2
      packages/rocketchat-authorization/client/route.js
  65. 5
      packages/rocketchat-authorization/client/views/permissionsRole.html
  66. 4
      packages/rocketchat-authorization/client/views/permissionsRole.js
  67. 3
      packages/rocketchat-authorization/package.js
  68. 3
      packages/rocketchat-authorization/server/functions/canAccessRoom.js
  69. 2
      packages/rocketchat-authorization/server/methods/saveRole.js
  70. 6
      packages/rocketchat-authorization/server/models/Roles.js
  71. 2
      packages/rocketchat-authorization/server/startup.js
  72. 1
      packages/rocketchat-autotranslate/client/index.js
  73. 2
      packages/rocketchat-autotranslate/client/lib/actionButton.js
  74. 3
      packages/rocketchat-autotranslate/client/views/autoTranslateFlexTab.js
  75. 2
      packages/rocketchat-autotranslate/package.js
  76. 3
      packages/rocketchat-channel-settings-mail-messages/client/views/mailMessagesInstructions.js
  77. 1
      packages/rocketchat-channel-settings-mail-messages/package.js
  78. 1
      packages/rocketchat-channel-settings/client/index.js
  79. 2
      packages/rocketchat-channel-settings/client/startup/messageTypes.js
  80. 4
      packages/rocketchat-channel-settings/client/views/channelSettings.js
  81. 3
      packages/rocketchat-channel-settings/package.js
  82. 10
      packages/rocketchat-channel-settings/server/methods/saveRoomSettings.js
  83. 1
      packages/rocketchat-colors/client/index.js
  84. 1
      packages/rocketchat-colors/package.js
  85. 3
      packages/rocketchat-custom-oauth/client/custom_oauth_client.js
  86. 1
      packages/rocketchat-custom-oauth/package.js
  87. 4
      packages/rocketchat-custom-oauth/server/custom_oauth_server.js
  88. 2
      packages/rocketchat-custom-sounds/client/admin/soundEdit.js
  89. 3
      packages/rocketchat-custom-sounds/client/admin/soundInfo.js
  90. 1
      packages/rocketchat-custom-sounds/client/index.js
  91. 3
      packages/rocketchat-custom-sounds/package.js
  92. 1
      packages/rocketchat-dolphin/client/index.js
  93. 1
      packages/rocketchat-dolphin/package.js
  94. 1
      packages/rocketchat-drupal/client/index.js
  95. 1
      packages/rocketchat-drupal/package.js
  96. 4
      packages/rocketchat-e2e/.eslintrc
  97. 4
      packages/rocketchat-e2e/client/accountEncryption.js
  98. 4
      packages/rocketchat-e2e/client/rocketchat.e2e.js
  99. 5
      packages/rocketchat-e2e/package.js
  100. 2
      packages/rocketchat-emoji-custom/client/admin/emojiEdit.js
  101. Some files were not shown because too many files have changed in this diff Show More

@ -15,7 +15,7 @@ elif [[ $CIRCLE_TAG =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
else
SNAP_CHANNEL=edge
RC_RELEASE=develop
RC_VERSION=0.66.0-develop
RC_VERSION="$(npm run version --silent)"
fi
export SNAP_CHANNEL

@ -16,12 +16,12 @@ echo -e "Tag: $CIRCLE_TAG\r\nBranch: $CIRCLE_BRANCH\r\nBuild: $CIRCLE_BUILD_NUM\
git clone -b $SNAP_CHANNEL git+ssh://rocket.chat.buildmaster@git.launchpad.net/rocket.chat launchpad
# Rarely will change, but just incase we copy it all
cp -r resources buildinfo launchpad/
sed s/#{RC_VERSION}/$RC_VERSION/ snapcraft.yaml > launchpad/snapcraft.yaml
cp -r resources buildinfo snap launchpad/
sed s/#{RC_VERSION}/$RC_VERSION/ snap/snapcraft.yaml > launchpad/snap/snapcraft.yaml
sed s/#{RC_VERSION}/$RC_VERSION/ resources/prepareRocketChat > launchpad/resources/prepareRocketChat
cd launchpad
git add resources snapcraft.yaml buildinfo
git add resources snap buildinfo
# Set commit author details
git config user.email "buildmaster@rocket.chat"

@ -5,3 +5,6 @@ IFS=$'\n\t'
curl -X POST \
-H "X-Update-Token: ${UPDATE_TOKEN}" \
https://releases.rocket.chat/update
# Makes build fail if the release isn't there
curl --fail https://releases.rocket.chat/$RC_VERSION/info

@ -1,6 +1,6 @@
FROM registry.access.redhat.com/rhscl/nodejs-8-rhel7
ENV RC_VERSION 0.72.3
ENV RC_VERSION 0.73.0
MAINTAINER buildmaster@rocket.chat

@ -2,45 +2,61 @@
"extends": ["@rocket.chat/eslint-config"],
"parser": "babel-eslint",
"globals": {
"__meteor_bootstrap__" : false,
"__meteor_runtime_config__" : false,
"AccountBox" : false,
"AgentUsers" : false,
"alerts" : false,
"Apps" : false,
"Assets" : false,
"browser" : false,
"AudioRecorder" : false,
"CachedChatSubscription" : false,
"ChatMessage" : false,
"ChatMessages" : false,
"chatMessages" : false,
"ChatRoom" : false,
"ChatSubscription" : false,
"Department" : false,
"chrome" : false,
"cordova" : false,
"device" : false,
"DynamicCss" : false,
"facebookConnectPlugin" : false,
"FileUpload" : false,
"getNextAgent" : false,
"fileUpload" : false,
"fileUploadHandler" : false,
"fireGlobalEvent" : false,
"handleError" : false,
"getAvatarUrlFromUsername" : false,
"LivechatCustomField" : false,
"LivechatDepartment" : false,
"LivechatDepartmentAgents" : false,
"livechatManagerRoutes" : true,
"LivechatMonitoring" : false,
"LivechatPageVisited" : false,
"LivechatTrigger" : false,
"Logger" : false,
"getAvatarSuggestionForUser" : false,
"globals" : true,
"JitsiMeetExternalAPI" : false,
"jscolor" : false,
"KonchatNotification" : false,
"language_names" : true,
"msgStream" : false,
"MsgTyping" : false,
"modal" : false,
"Modernizr" : false,
"menu" : false,
"Npm" : false,
"openRoom" : false,
"OnePassword" : false,
"Package" : false,
"parentCall" : false,
"popout" : false,
"popover" : false,
"readMessage" : false,
"RocketChat" : true,
"roomExit" : true,
"RoomHistoryManager" : false,
"RoomManager" : false,
"ServiceConfiguration" : false,
"RoomRoles" : false,
"Servers" : false,
"Settings" : false,
"SideNav" : false,
"t" : false,
"TimeSync" : false,
"toastr" : false,
"Trigger" : false,
"Triggers" : false,
"visitor" : false,
"TAPi18next" : false,
"toolbarSearch" : false,
"TwitterConnect" : false,
"updateAvatarOfUsername" : false,
"UserRoles" : false,
"VideoRecorder" : false,
"VRecDialog" : false
}

@ -1,116 +0,0 @@
/* eslint no-var: 0, object-shorthand: 0, prefer-template: 0 */
'use strict';
var readFile = require('fs').readFileSync;
var resolve = require('path').resolve;
var gitUrl = 'https://github.com/RocketChat/Rocket.Chat';
var parserOpts = {
headerPattern: /^(\[([A-z]+)\] )?(.*)$/m,
headerCorrespondence: [
'stype',
'type',
'subject'
],
mergePattern: /^Merge pull request #(.*) from .*$/,
mergeCorrespondence: ['pr']
// noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES'],
// revertPattern: /^revert:\s([\s\S]*?)\s*This reverts commit (\w*)\./,
// revertCorrespondence: ['header', 'hash'],
// mergePattern: /^Merge pull request #(\d+) from (.*)$/,
// mergeCorrespondence: ['id', 'source']
};
var LABELS = {
BREAK: {
title: 'BREAKING CHANGES',
collapse: false
},
NEW: {
title: 'New Features',
collapse: false
},
FIX: {
title: 'Bug Fixes',
collapse: false
},
DOC: {
title: 'Documentation',
collapse: true
},
OTHER: {
title: 'Others',
collapse: true
}
};
var sort = Object.keys(LABELS);
var writerOpts = {
transform: function(commit) {
if (!commit.pr) {
return;
}
// console.log(commit);
commit.type = (commit.type || 'OTHER').toUpperCase();
if (LABELS[commit.type] == null) {
return;
}
commit.pr_url = gitUrl + '/pull/' + commit.pr;
var issues = [];
if (typeof commit.hash === 'string') {
commit.hash = commit.hash.substring(0, 7);
}
if (typeof commit.subject === 'string') {
// GitHub issue URLs.
commit.subject = commit.subject.replace(/#([0-9]+)/g, function(_, issue) {
issues.push(issue);
return '[#' + issue + '](' + gitUrl + '/issues/' + issue + ')';
});
// GitHub user URLs.
commit.subject = commit.subject.replace(/@([a-zA-Z0-9_]+)/g, '[@$1](https://github.com/$1)');
}
// remove references that already appear in the subject
commit.references = commit.references.filter(function(reference) {
if (issues.indexOf(reference.issue) === -1) {
return true;
}
return false;
});
return commit;
},
groupBy: 'type',
commitGroupsSort: function(a, b) {
return sort.indexOf(a.title) > sort.indexOf(b.title);
},
finalizeContext: function(context) {
context.commitGroups.forEach(function(group) {
Object.assign(group, LABELS[group.title.toUpperCase()]);
});
// console.log(context);
return context;
},
commitsSort: ['subject']
};
writerOpts.mainTemplate = readFile(resolve(__dirname, 'templates/template.hbs'), 'utf-8');
writerOpts.headerPartial = readFile(resolve(__dirname, 'templates/header.hbs'), 'utf-8');
writerOpts.commitPartial = readFile(resolve(__dirname, 'templates/commit.hbs'), 'utf-8');
writerOpts.footerPartial = readFile(resolve(__dirname, 'templates/footer.hbs'), 'utf-8');
module.exports = {
gitRawCommitsOpts: {
merges: null
},
parserOpts: parserOpts,
writerOpts: writerOpts
};

File diff suppressed because it is too large Load Diff

@ -1,40 +0,0 @@
{{!-- pr reference --}}- {{#if pr}}[#{{pr}}]({{pr_url}}){{/if}}
{{~!-- subject --}} {{subject}}
{{~!-- commit references --}}
{{~#if references~}}
, closes
{{~#each references}} {{#if @root.linkReferences~}}
[
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}#{{this.issue}}](
{{~#if @root.repository}}
{{~#if @root.host}}
{{~@root.host}}/
{{~/if}}
{{~#if this.repository}}
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}
{{~else}}
{{~#if @root.owner}}
{{~@root.owner}}/
{{~/if}}
{{~@root.repository}}
{{~/if}}
{{~else}}
{{~@root.repoUrl}}
{{~/if}}/
{{~@root.issue}}/{{this.issue}})
{{~else}}
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}#{{this.issue}}
{{~/if}}{{/each}}
{{~/if}}

@ -1,11 +0,0 @@
{{#if noteGroups}}
{{#each noteGroups}}
### {{title}}
{{#each notes}}
* {{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{text}}
{{/each}}
{{/each}}
{{/if}}

@ -1,26 +0,0 @@
<a name="{{version}}"></a>
{{#if isPatch~}}
##
{{~else~}}
#
{{~/if}} {{#if @root.linkCompare~}}
[{{version}}](
{{~#if @root.repository~}}
{{~#if @root.host}}
{{~@root.host}}/
{{~/if}}
{{~#if @root.owner}}
{{~@root.owner}}/
{{~/if}}
{{~@root.repository}}
{{~else}}
{{~@root.repoUrl}}
{{~/if~}}
/compare/{{previousTag}}...{{currentTag}})
{{~else}}
{{~version}}
{{~/if}}
{{~#if title}} "{{title}}"
{{~/if}}
{{~#if date}} ({{date}})
{{/if}}

@ -1,22 +0,0 @@
{{> header}}
{{#each commitGroups}}
{{#if collapse}}
<details>
<summary>{{title}}</summary>
{{else}}
### {{title}}
{{/if}}
{{#each commits}}
{{> commit root=@root}}
{{/each}}
{{#if collapse}}
</details>
{{/if}}
{{/each}}
{{> footer}}

@ -16,7 +16,7 @@ check@1.3.1
ddp-rate-limiter@1.0.7
ddp-common@1.4.0
dynamic-import@0.5.0
ecmascript@0.12.0
ecmascript@0.12.3
ejson@1.1.0
email@1.2.3
fastclick@1.0.13
@ -32,7 +32,7 @@ reactive-dict@1.2.1
reactive-var@1.0.11
reload@1.2.0
service-configuration@1.0.11
session@1.1.8
session@1.2.0
shell-server@0.4.0
spacebars
standard-minifier-js@2.4.0
@ -82,7 +82,6 @@ rocketchat:importer-hipchat-enterprise
rocketchat:importer-slack
rocketchat:importer-slack-users
rocketchat:integrations
rocketchat:internal-hubot
rocketchat:irc
rocketchat:issuelinks
rocketchat:katex
@ -139,7 +138,6 @@ rocketchat:streamer
rocketchat:theme
rocketchat:tokenpass
rocketchat:tooltip
rocketchat:tutum
rocketchat:ui
rocketchat:ui-account
rocketchat:ui-admin
@ -202,3 +200,4 @@ rocketchat:bigbluebutton
rocketchat:mailmessages
juliancwirko:postcss
littledata:synced-cron
rocketchat:utils

@ -1 +1 @@
METEOR@1.8
METEOR@1.8.0.1

@ -9,7 +9,7 @@ accounts-twitter@1.4.2
aldeed:simple-schema@1.5.4
allow-deny@1.1.0
autoupdate@1.5.0
babel-compiler@7.2.1
babel-compiler@7.2.3
babel-runtime@1.3.0
base64@1.0.11
binary-heap@1.0.11
@ -17,7 +17,7 @@ blaze@2.3.3
blaze-html-templates@1.1.2
blaze-tools@1.0.10
boilerplate-generator@1.6.0
caching-compiler@1.2.0
caching-compiler@1.2.1
caching-html-compiler@1.1.3
callback-hook@1.1.0
cfs:http-methods@0.0.32
@ -32,10 +32,10 @@ ddp-rate-limiter@1.0.7
ddp-server@2.2.0
deepwell:bootstrap-datepicker2@1.3.0
deps@1.0.12
diff-sequence@1.1.0
diff-sequence@1.1.1
dispatch:run-as-user@1.1.1
dynamic-import@0.5.0
ecmascript@0.12.1
dynamic-import@0.5.1
ecmascript@0.12.3
ecmascript-runtime@0.7.0
ecmascript-runtime-client@0.8.0
ecmascript-runtime-server@0.7.1
@ -54,7 +54,7 @@ google-oauth@1.2.6
hot-code-push@1.0.4
html-tools@1.0.11
htmljs@1.0.11
http@1.4.1
http@1.4.2
id-map@1.1.0
inter-process-messaging@0.1.0
jalik:ufs@0.7.5
@ -73,7 +73,7 @@ konecty:change-case@2.3.0
konecty:delayed-task@1.0.0
konecty:mongo-counter@0.0.5_3
konecty:multiple-instances-status@1.1.0
konecty:user-presence@2.2.0
konecty:user-presence@2.3.0
launch-screen@1.1.1
less@2.8.0
littledata:synced-cron@1.5.1
@ -88,14 +88,14 @@ meteor-developer-oauth@1.2.1
meteorhacks:inject-initial@1.0.4
meteorhacks:meteorx@1.4.1
meteorspark:util@0.2.0
minifier-css@1.4.0
minifier-css@1.4.1
minifier-js@2.4.0
minimongo@1.4.5
mizzao:autocomplete@0.5.1
mizzao:timesync@0.3.4
mobile-experience@1.0.5
mobile-status-bar@1.0.14
modern-browsers@0.1.2
modern-browsers@0.1.3
modules@0.13.0
modules-runtime@0.10.3
mongo@1.6.0
@ -109,8 +109,8 @@ nimble:restivus@0.8.12
nooitaf:colors@1.1.2_1
npm-bcrypt@0.9.3
npm-mongo@3.1.1
oauth@1.2.5
oauth1@1.2.1
oauth@1.2.7
oauth1@1.2.2
oauth2@1.2.1
observe-sequence@1.0.16
ordered-dict@1.1.0
@ -177,7 +177,6 @@ rocketchat:importer-hipchat-enterprise@1.0.0
rocketchat:importer-slack@0.0.1
rocketchat:importer-slack-users@1.0.0
rocketchat:integrations@0.0.1
rocketchat:internal-hubot@0.0.1
rocketchat:irc@0.0.1
rocketchat:issuelinks@0.0.1
rocketchat:katex@0.0.1
@ -240,7 +239,6 @@ rocketchat:streamer@1.0.1
rocketchat:theme@0.0.1
rocketchat:tokenpass@0.0.1
rocketchat:tooltip@0.0.1
rocketchat:tutum@0.0.1
rocketchat:ui@0.1.0
rocketchat:ui-account@0.1.0
rocketchat:ui-admin@0.1.0
@ -252,6 +250,7 @@ rocketchat:ui-message@0.1.0
rocketchat:ui-sidenav@0.1.0
rocketchat:ui-vrecord@0.0.1
rocketchat:user-data-download@1.0.0
rocketchat:utils@0.0.1
rocketchat:version@1.0.0
rocketchat:version-check@0.0.1
rocketchat:videobridge@0.2.0
@ -260,7 +259,7 @@ rocketchat:webrtc@0.0.1
rocketchat:wordpress@0.0.1
routepolicy@1.1.0
service-configuration@1.0.11
session@1.1.8
session@1.2.0
sha@1.0.9
shell-server@0.4.0
simple:json-routes@2.1.0
@ -283,7 +282,7 @@ twitter-oauth@1.2.0
ui@1.0.13
underscore@1.0.10
url@1.2.0
webapp@1.7.0
webapp@1.7.2
webapp-hashing@1.0.9
yasaricli:slugify@0.0.7
yasinuslu:blaze-meta@0.3.3

@ -19,9 +19,9 @@ const pkgdef :Spk.PackageDefinition = (
appTitle = (defaultText = "Rocket.Chat"),
appVersion = 119, # Increment this for every release.
appVersion = 121, # Increment this for every release.
appMarketingVersion = (defaultText = "0.72.3"),
appMarketingVersion = (defaultText = "0.73.0"),
# Human-readable representation of appVersion. Should match the way you
# identify versions of your app in documentation and marketing.

@ -84,8 +84,6 @@ git.status()
.then((data) => writeFile(file, data.replace(pkgJson.version, version)))));
})
.then(() =>
// execSync('conventional-changelog --config .github/changelog.js -i HISTORY.md -s');
inquirer.prompt([{
type: 'confirm',
message: 'Commit files?',

@ -1,5 +1,3 @@
/* eslint object-shorthand: 0, prefer-template: 0 */
const path = require('path');
let pkgJson = {};

@ -1,5 +1,5 @@
http://:8080
proxy / localhost:3000 {
_caddy-url_
proxy / localhost:_port_ {
websocket
transparent
}

@ -1,3 +1,46 @@
#!/bin/sh
cp $SNAP/bin/Caddyfile $SNAP_DATA/Caddyfile
echo "Replace $SNAP_DATA/Caddyfile with your own to customize reverse proxy"
#!/bin/bash
# Config options for Caddyfile
#options="site path port"
options="caddy-url port"
refresh_opt_in_config() {
# replace an option inside the config file.
opt=$1
value="$2"
if $(grep -q "_${opt}_" $Caddyfile); then
sed "s,_${opt}_,$value," $Caddyfile 2>/dev/null > ${Caddyfile}.new
mv -f ${Caddyfile}.new $Caddyfile 2>/dev/null
else
echo "Fail to update $opt in Caddyfile"
fi
}
create_caddyfile(){
# Copy template to config Caddyfile
cp $SNAP/bin/Caddyfile $SNAP_DATA/Caddyfile
}
update_caddyfile(){
# Config file path for Caddyfile
Caddyfile=$SNAP_DATA/Caddyfile
# Iterate through the config options array
for opt in $options
do
# Use snapctl to get the value registered by the snap set command
refresh_opt_in_config $opt $(snapctl get $opt)
done
}
caddy="$(snapctl get caddy)"
if [[ $caddy == "disable" ]]; then
echo "Caddy is not enabled, please set caddy-url=<your_url> and caddy=enable"
exit 1
fi
create_caddyfile
update_caddyfile
echo "Your URL was successfully configured - Please restart rocketchat and caddy services to apply configuration changes"

@ -16,10 +16,20 @@ function start_rocketchat {
export NODE_ENV=production
export BABEL_CACHE_DIR=/tmp
export ROOT_URL=http://localhost
export PORT=3000
export MONGO_URL=mongodb://localhost:27017/parties
export MONGO_OPLOG_URL=mongodb://localhost:27017/local
export PORT="$(snapctl get port)"
export MONGO_URL="$(snapctl get mongo-url)"
export MONGO_OPLOG_URL="$(snapctl get mongo-oplog-url)"
export Accounts_AvatarStorePath=$SNAP_COMMON/uploads
siteurl="$(snapctl get siteurl)"
if [ -n "$siteurl" ]; then
export OVERWRITE_SETTING_Site_Url=$siteurl
fi
for filename in $SNAP_COMMON/*.env; do
while read env_var; do
export "$env_var"
done < $filename
done
node $SNAP/main.js
}

@ -0,0 +1,122 @@
#!/bin/bash
export PATH="$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$PATH"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/lib:$SNAP/usr/lib:$SNAP/lib/x86_64-linux-gnu:$SNAP/usr/lib/x86_64-linux-gnu"
export LD_LIBRARY_PATH=$SNAP_LIBRARY_PATH:$LD_LIBRARY_PATH
# Obtain caddyurl value
caddyurl="$(snapctl get caddy-url)"
# Validate it
#caddyurl_regex='^https?:\/\/([0-9A-Za-z\.-]+){1,}(\.[a-z\.]{2,6})?([\/\da-z\.-]+)?$' #(supporting path)
caddyurl_regex='^https?:\/\/([0-9A-Za-z\.-]+){1,}(\.[a-z\.]{2,6})?$'
if [ -n "$caddyurl" ]; then
if ! [[ $caddyurl =~ $caddyurl_regex ]]; then
echo "\"$caddyurl\" is not a valid url" >&2
exit 1
fi
#else
# if [[ $siteurl =~ ^http: ]] && [[ $siteurl =~ ^http:\/\/([0-9A-Za-z\.-]+){1,}?(\.[a-z\.]{2,6})?\/([\/\da-z\.-]+){1,}$ ]]; then
# path=${siteurl#http://*/}
# site=${siteurl#"http://"}
# site=${site%%/*}
# site=http://$site
# elif [[ $siteurl =~ ^https: ]] && [[ $siteurl =~ ^https:\/\/([0-9A-Za-z\.-]+){1,}?(\.[a-z\.]{2,6})?\/([\/\da-z\.-]+){1,}$ ]]; then
# path=${siteurl#https://*/}
# site=${siteurl#"https://"}
# site=${site%%/*}
# site=https://$site
# else
# path=""
# site=$siteurl
# fi
# snapctl set path=$path
# snapctl set site=$site
fi
# Obtain caddy value
caddy="$(snapctl get caddy)"
# Validate it
caddy_regex='((enable)|(disable))'
if ! [[ $caddy =~ $caddy_regex ]]; then
echo "\"$caddy_regex\" is not a valid, set to enable or disable" >&2
exit 1
else
if [[ $caddy == enable ]]; then
caddyurl="$(snapctl get caddy-url)"
if [ -z "$caddyurl" ]; then
echo "You tried to enable caddy but caddy-url is not set yet, please set up caddy-url first and then enable caddy again" >&2
snapctl set caddy=disable
exit 1
else
snapctl set siteurl=$caddyurl
fi
else
siteurl="$(snapctl get siteurl)"
if [ -n "$siteurl" ]; then
snapctl set siteurl=
fi
fi
fi
# Obtain port value
port="$(snapctl get port)"
# Validate it
port_regex='^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$'
if ! [[ $port =~ $port_regex ]]; then
echo "\"$port\" is not a valid port" >&2
exit 1
fi
# Obtain mongourl value
mongourl="$(snapctl get mongo-url)"
# Validate it
mongourl_regex='^mongodb:\/\/([0-9A-Za-z\.\-\_]+){1,}(([a-z\.\-\_]+){2,6})?(:[0-9]{2,5})?\/([0-9A-Za-z\_\-]+)$'
if ! [[ $mongourl =~ $mongourl_regex ]] ; then
echo "\"$mongourl\" is not a valid url" >&2
exit 1
fi
# Obtain mongooplogurl value
mongooplogurl="$(snapctl get mongo-oplog-url)"
# Validate it
mongooplogurl_regex='^mongodb:\/\/([0-9A-Za-z\.\-\_]+){1,}(([a-z\.\-\_]+){2,6})?(:[0-9]{2,5})?\/local$'
if ! [[ $mongooplogurl =~ $mongooplogurl_regex ]] ; then
echo "\"$mongooplogurl\" is not a valid url" >&2
exit 1
fi
# Obtain site protocol
https="$(snapctl get https)"
# Validate it
https_regex='((enable)|(disable))'
if ! [[ $https =~ $https_regex ]]; then
echo "\"$https\" should be enable or disable" >&2
exit 1
else
if [[ $https == enable ]] && [[ $caddyurl =~ ^http: ]]; then
echo "Error: You enabled https but your site URL starts with http, disabling https ..."
snapctl set https=disable
exit 1
elif [[ $https == enable ]] && [[ $caddyurl =~ ^https: ]]; then
domain=${caddyurl#"https://"}
domain=${domain%%/*}
pubip=$(dig $domain |grep -A1 ";; ANSWER SECTION:" |tail -1 | awk '{print $5}')
if [ -z "$pubip" ]; then
echo "Error: Can't resove DNS query for $domain, check your DNS configuration, disabling https ..."
snapctl set https=disable
exit 1
else
ip=$(curl ipinfo.io/ip 2>/dev/null)
if [[ $ip != $pubip ]]; then
echo "Error: Your public IP doesn't match the one resolved for caddy-url, disabling https ..."
snapctl set https=disable
exit 1
fi
fi
elif [[ $https == enable ]] && [ -z "$caddyurl" ]; then
echo "Error: You enabled https but your site URL is empty, please set caddy-url=<your_site_url>, disabling https ..."
snapctl set https=disable
exit 1
fi
fi

@ -0,0 +1,16 @@
#!/bin/bash
# Initialize the CADDY_URL to a default
snapctl set caddy=disable
# Initialize the PORT to a default
snapctl set port=3000
# Initialize the MONGO_URL to a default
snapctl set mongo-url=mongodb://localhost:27017/parties
# Initialize the MONGO_OPLOG_URL to a default
snapctl set mongo-oplog-url=mongodb://localhost:27017/local
# Initialize the protocol to a default
snapctl set https=disable

@ -22,7 +22,7 @@ apps:
daemon: simple
plugs: [network, network-bind]
rocketchat-caddy:
command: env LC_ALL=C caddy -conf=$SNAP_DATA/Caddyfile -host=localhost:8080
command: env LC_ALL=C caddy -conf=$SNAP_DATA/Caddyfile
daemon: simple
plugs: [network, network-bind]
mongo:
@ -36,6 +36,9 @@ apps:
plugs: [network]
initcaddy:
command: env LC_ALL=C initcaddy
hooks:
configure:
plugs: [network]
parts:
node:
plugin: dump
@ -95,3 +98,12 @@ parts:
organize:
caddy: bin/caddy
after: [mongodb]
hooks:
plugin: nil
stage-packages:
- dnsutils
- curl
prime:
- usr
- lib

@ -17,7 +17,7 @@ elif [[ $TRAVIS_TAG ]]; then
RC_VERSION=$TRAVIS_TAG
else
CHANNEL=edge
RC_VERSION=0.72.3
RC_VERSION=0.73.0
fi
echo "Preparing to trigger a snap release for $CHANNEL channel"

@ -1,9 +1,59 @@
# 0.72.3
`2018-12-12 · 8 🐛 · 5 👩💻👨💻`
# 0.73.0
`2018-12-27 · 10 🎉 · 9 🚀 · 34 🐛 · 84 🔍 · 26 👩💻👨💻`
### Engine versions
- Node: `8.11.4`
- NPM: `6.4.1`
### 🎉 New features
- Create new permission.listAll endpoint to be able to use updatedSince parameter ([#12748](https://github.com/RocketChat/Rocket.Chat/pull/12748))
- Mandatory 2fa for role ([#9748](https://github.com/RocketChat/Rocket.Chat/pull/9748) by [@karlprieb](https://github.com/karlprieb))
- Add query parameter support to emoji-custom endpoint ([#12754](https://github.com/RocketChat/Rocket.Chat/pull/12754))
- Added a link to contributing.md ([#12856](https://github.com/RocketChat/Rocket.Chat/pull/12856) by [@sanketsingh24](https://github.com/sanketsingh24))
- Added chat.getDeletedMessages since specific date ([#13010](https://github.com/RocketChat/Rocket.Chat/pull/13010))
- Download button for each file in fileslist ([#12874](https://github.com/RocketChat/Rocket.Chat/pull/12874) by [@alexbartsch](https://github.com/alexbartsch))
- Syncloud deploy option ([#12867](https://github.com/RocketChat/Rocket.Chat/pull/12867) by [@cyberb](https://github.com/cyberb))
- Config hooks for snap ([#12351](https://github.com/RocketChat/Rocket.Chat/pull/12351))
- Livechat registration form message ([#12597](https://github.com/RocketChat/Rocket.Chat/pull/12597))
- Include message type & id in push notification payload ([#12771](https://github.com/RocketChat/Rocket.Chat/pull/12771))
### 🚀 Improvements
- Hipchat Enterprise Importer ([#12985](https://github.com/RocketChat/Rocket.Chat/pull/12985))
- Add missing translation keys. ([#12722](https://github.com/RocketChat/Rocket.Chat/pull/12722) by [@ura14h](https://github.com/ura14h))
- Accept Slash Commands via Action Buttons when `msg_in_chat_window: true` ([#13009](https://github.com/RocketChat/Rocket.Chat/pull/13009))
- Allow transfer Livechats to online agents only ([#13008](https://github.com/RocketChat/Rocket.Chat/pull/13008))
- Adding debugging instructions in README ([#12989](https://github.com/RocketChat/Rocket.Chat/pull/12989) by [@hypery2k](https://github.com/hypery2k))
- Do not emit settings if there are no changes ([#12904](https://github.com/RocketChat/Rocket.Chat/pull/12904))
- Returning an open room object in the Livechat config endpoint ([#12865](https://github.com/RocketChat/Rocket.Chat/pull/12865))
- Use MongoBD aggregation to get users from a room ([#12566](https://github.com/RocketChat/Rocket.Chat/pull/12566))
- Username suggestion logic ([#12779](https://github.com/RocketChat/Rocket.Chat/pull/12779))
### 🐛 Bug fixes
- Avoiding links with highlighted words ([#12123](https://github.com/RocketChat/Rocket.Chat/pull/12123) by [@rssilva](https://github.com/rssilva))
- Pin and unpin message were not checking permissions ([#12739](https://github.com/RocketChat/Rocket.Chat/pull/12739))
- Fix users.setPreferences endpoint, set language correctly ([#12734](https://github.com/RocketChat/Rocket.Chat/pull/12734))
- Fix set avatar http call, to avoid SSL errors ([#12790](https://github.com/RocketChat/Rocket.Chat/pull/12790))
- Webdav integration account settings were being shown even when Webdav was disabled ([#12569](https://github.com/RocketChat/Rocket.Chat/pull/12569) by [@karakayasemi](https://github.com/karakayasemi))
- Provide better Dutch translations 🇳🇱 ([#12792](https://github.com/RocketChat/Rocket.Chat/pull/12792) by [@mathysie](https://github.com/mathysie))
- E2E`s password reaveal text is always `>%S` when language is zh ([#12795](https://github.com/RocketChat/Rocket.Chat/pull/12795) by [@lvyue](https://github.com/lvyue))
- Nested Markdown blocks not parsed properly ([#12998](https://github.com/RocketChat/Rocket.Chat/pull/12998))
- Change JSON to EJSON.parse query to support type Date ([#12706](https://github.com/RocketChat/Rocket.Chat/pull/12706))
- Inherit font family in message user card ([#13004](https://github.com/RocketChat/Rocket.Chat/pull/13004))
- Some deprecation issues for media recording ([#12948](https://github.com/RocketChat/Rocket.Chat/pull/12948))
- Stop click event propagation on mention link or user card ([#12983](https://github.com/RocketChat/Rocket.Chat/pull/12983))
- Change field checks in RocketChat.saveStreamingOptions ([#12973](https://github.com/RocketChat/Rocket.Chat/pull/12973))
- Remove sharp's deprecation warnings on image upload ([#12980](https://github.com/RocketChat/Rocket.Chat/pull/12980))
- Use web.browser.legacy bundle for Livechat script ([#12975](https://github.com/RocketChat/Rocket.Chat/pull/12975))
- Revert Jitsi external API to an asset ([#12954](https://github.com/RocketChat/Rocket.Chat/pull/12954))
- Exception in getSingleMessage ([#12970](https://github.com/RocketChat/Rocket.Chat/pull/12970) by [@tsukiRep](https://github.com/tsukiRep))
- multiple rooms-changed ([#12940](https://github.com/RocketChat/Rocket.Chat/pull/12940))
- Readable validation on the apps engine environment bridge ([#12994](https://github.com/RocketChat/Rocket.Chat/pull/12994))
- Check for object falsehood before referencing properties in saveRoomSettings ([#12972](https://github.com/RocketChat/Rocket.Chat/pull/12972))
- Spotlight being called while in background ([#12957](https://github.com/RocketChat/Rocket.Chat/pull/12957))
- Padding for message box in embedded layout ([#12556](https://github.com/RocketChat/Rocket.Chat/pull/12556))
- Crowd sync was being stopped when a user was not found ([#12930](https://github.com/RocketChat/Rocket.Chat/pull/12930) by [@piotrkochan](https://github.com/piotrkochan))
- Some icons were missing ([#12913](https://github.com/RocketChat/Rocket.Chat/pull/12913))
@ -12,6 +62,143 @@
- Stream of my_message wasn't sending the room information ([#12914](https://github.com/RocketChat/Rocket.Chat/pull/12914))
- cannot reset password ([#12903](https://github.com/RocketChat/Rocket.Chat/pull/12903))
- Version check update notification ([#12905](https://github.com/RocketChat/Rocket.Chat/pull/12905))
- Data Import not working ([#12866](https://github.com/RocketChat/Rocket.Chat/pull/12866))
- Incorrect parameter name in Livechat stream ([#12851](https://github.com/RocketChat/Rocket.Chat/pull/12851))
- Autotranslate icon on message action menu ([#12585](https://github.com/RocketChat/Rocket.Chat/pull/12585))
- Google Cloud Storage storage provider ([#12843](https://github.com/RocketChat/Rocket.Chat/pull/12843))
- Download files without extension wasn't possible ([#13033](https://github.com/RocketChat/Rocket.Chat/pull/13033))
<details>
<summary>🔍 Minor changes</summary>
- LingoHub based on develop ([#13014](https://github.com/RocketChat/Rocket.Chat/pull/13014))
- Move isFirefox and isChrome functions to rocketchat-utils ([#13011](https://github.com/RocketChat/Rocket.Chat/pull/13011))
- Move tapi18n t and isRtl functions from ui to utils ([#13005](https://github.com/RocketChat/Rocket.Chat/pull/13005))
- Remove /* globals */ wave 4 ([#12999](https://github.com/RocketChat/Rocket.Chat/pull/12999))
- Remove /* globals */ wave 3 ([#12997](https://github.com/RocketChat/Rocket.Chat/pull/12997))
- Convert rocketchat-logger to main module structure and remove Logger from eslintrc ([#12995](https://github.com/RocketChat/Rocket.Chat/pull/12995))
- Remove /* globals */ wave 2 ([#12988](https://github.com/RocketChat/Rocket.Chat/pull/12988))
- Remove /* globals */ from files wave-1 ([#12984](https://github.com/RocketChat/Rocket.Chat/pull/12984))
- Move globals of test to a specific eslintrc file ([#12959](https://github.com/RocketChat/Rocket.Chat/pull/12959))
- Remove global ServiceConfiguration ([#12960](https://github.com/RocketChat/Rocket.Chat/pull/12960))
- Remove global toastr ([#12961](https://github.com/RocketChat/Rocket.Chat/pull/12961))
- Convert rocketchat-livechat to main module structure ([#12942](https://github.com/RocketChat/Rocket.Chat/pull/12942))
- changed maxRoomsOpen ([#12949](https://github.com/RocketChat/Rocket.Chat/pull/12949))
- Revert imports of css, reAdd them to the addFiles function ([#12934](https://github.com/RocketChat/Rocket.Chat/pull/12934))
- Convert rocketchat-theme to main module structure ([#12896](https://github.com/RocketChat/Rocket.Chat/pull/12896))
- Convert rocketchat-katex to main module structure ([#12895](https://github.com/RocketChat/Rocket.Chat/pull/12895))
- Convert rocketchat-webdav to main module structure ([#12886](https://github.com/RocketChat/Rocket.Chat/pull/12886))
- Convert rocketchat-ui-message to main module structure ([#12871](https://github.com/RocketChat/Rocket.Chat/pull/12871))
- Convert rocketchat-videobridge to main module structure ([#12881](https://github.com/RocketChat/Rocket.Chat/pull/12881))
- Convert rocketchat-reactions to main module structure ([#12888](https://github.com/RocketChat/Rocket.Chat/pull/12888))
- Convert rocketchat-wordpress to main module structure ([#12887](https://github.com/RocketChat/Rocket.Chat/pull/12887))
- Fix: snap push from ci ([#12883](https://github.com/RocketChat/Rocket.Chat/pull/12883))
- Convert rocketchat-version-check to main module structure ([#12879](https://github.com/RocketChat/Rocket.Chat/pull/12879))
- Convert rocketchat-user-data-dowload to main module structure ([#12877](https://github.com/RocketChat/Rocket.Chat/pull/12877))
- Convert rocketchat-ui-vrecord to main module structure ([#12875](https://github.com/RocketChat/Rocket.Chat/pull/12875))
- Convert rocketchat-ui-login to main module structure ([#12861](https://github.com/RocketChat/Rocket.Chat/pull/12861))
- Convert rocketchat-ui-flextab to main module structure ([#12859](https://github.com/RocketChat/Rocket.Chat/pull/12859))
- German translation typo fix for Reacted_with ([#12761](https://github.com/RocketChat/Rocket.Chat/pull/12761) by [@localguru](https://github.com/localguru))
- Convert rocketchat-ui-account to main module structure ([#12842](https://github.com/RocketChat/Rocket.Chat/pull/12842))
- Convert rocketchat-ui-clean-history to main module structure ([#12846](https://github.com/RocketChat/Rocket.Chat/pull/12846))
- Convert rocketchat-ui-admin to main module structure ([#12844](https://github.com/RocketChat/Rocket.Chat/pull/12844))
- Convert rocketchat-tokenpass to main module structure ([#12838](https://github.com/RocketChat/Rocket.Chat/pull/12838))
- Remove rocketchat-tutum package ([#12840](https://github.com/RocketChat/Rocket.Chat/pull/12840))
- Convert rocketchat-tooltip to main module structure ([#12839](https://github.com/RocketChat/Rocket.Chat/pull/12839))
- Convert rocketchat-token-login to main module structure ([#12837](https://github.com/RocketChat/Rocket.Chat/pull/12837))
- Convert rocketchat-statistics to main module structure ([#12833](https://github.com/RocketChat/Rocket.Chat/pull/12833))
- Convert rocketchat-spotify to main module structure ([#12832](https://github.com/RocketChat/Rocket.Chat/pull/12832))
- Convert rocketchat-sms to main module structure ([#12831](https://github.com/RocketChat/Rocket.Chat/pull/12831))
- Convert rocketchat-search to main module structure ([#12801](https://github.com/RocketChat/Rocket.Chat/pull/12801))
- Convert rocketchat-message-pin to main module structure ([#12767](https://github.com/RocketChat/Rocket.Chat/pull/12767))
- Convert rocketchat-message-star to main module structure ([#12770](https://github.com/RocketChat/Rocket.Chat/pull/12770))
- Convert rocketchat-slashcommands-msg to main module structure ([#12823](https://github.com/RocketChat/Rocket.Chat/pull/12823))
- Convert rocketchat-smarsh-connector to main module structure ([#12830](https://github.com/RocketChat/Rocket.Chat/pull/12830))
- Convert rocketchat-slider to main module structure ([#12828](https://github.com/RocketChat/Rocket.Chat/pull/12828))
- Convert rocketchat-slashcommands-unarchiveroom to main module structure ([#12827](https://github.com/RocketChat/Rocket.Chat/pull/12827))
- Dependencies update ([#12624](https://github.com/RocketChat/Rocket.Chat/pull/12624))
- Convert rocketchat-slashcommands-topic to main module structure ([#12826](https://github.com/RocketChat/Rocket.Chat/pull/12826))
- Convert rocketchat-slashcommands-open to main module structure ([#12825](https://github.com/RocketChat/Rocket.Chat/pull/12825))
- Convert rocketchat-slashcommands-mute to main module structure ([#12824](https://github.com/RocketChat/Rocket.Chat/pull/12824))
- Convert rocketchat-slashcommands-me to main module structure ([#12822](https://github.com/RocketChat/Rocket.Chat/pull/12822))
- Convert rocketchat-slashcommands-leave to main module structure ([#12821](https://github.com/RocketChat/Rocket.Chat/pull/12821))
- Convert rocketchat-slashcommands-kick to main module structure ([#12817](https://github.com/RocketChat/Rocket.Chat/pull/12817))
- Convert rocketchat-slashcommands-join to main module structure ([#12816](https://github.com/RocketChat/Rocket.Chat/pull/12816))
- Convert rocketchat-slashcommands-inviteall to main module structure ([#12815](https://github.com/RocketChat/Rocket.Chat/pull/12815))
- Convert rocketchat-slashcommands-invite to main module structure ([#12814](https://github.com/RocketChat/Rocket.Chat/pull/12814))
- Convert rocketchat-slashcommands-hide to main module structure ([#12813](https://github.com/RocketChat/Rocket.Chat/pull/12813))
- Convert rocketchat-slashcommands-help to main module structure ([#12812](https://github.com/RocketChat/Rocket.Chat/pull/12812))
- Convert rocketchat-slashcommands-create to main module structure ([#12811](https://github.com/RocketChat/Rocket.Chat/pull/12811))
- Convert rocketchat-slashcomands-archiveroom to main module structure ([#12810](https://github.com/RocketChat/Rocket.Chat/pull/12810))
- Convert rocketchat-slashcommands-asciiarts to main module structure ([#12808](https://github.com/RocketChat/Rocket.Chat/pull/12808))
- Convert rocketchat-slackbridge to main module structure ([#12807](https://github.com/RocketChat/Rocket.Chat/pull/12807))
- Convert rocketchat-setup-wizard to main module structure ([#12806](https://github.com/RocketChat/Rocket.Chat/pull/12806))
- Convert rocketchat-sandstorm to main module structure ([#12799](https://github.com/RocketChat/Rocket.Chat/pull/12799))
- Convert rocketchat-oauth2-server-config to main module structure ([#12773](https://github.com/RocketChat/Rocket.Chat/pull/12773))
- Convert rocketchat-message-snippet to main module structure ([#12768](https://github.com/RocketChat/Rocket.Chat/pull/12768))
- Fix CI deploy job ([#12803](https://github.com/RocketChat/Rocket.Chat/pull/12803))
- Convert rocketchat-retention-policy to main module structure ([#12797](https://github.com/RocketChat/Rocket.Chat/pull/12797))
- Convert rocketchat-push-notifications to main module structure ([#12778](https://github.com/RocketChat/Rocket.Chat/pull/12778))
- Convert rocketchat-otr to main module structure ([#12777](https://github.com/RocketChat/Rocket.Chat/pull/12777))
- Convert rocketchat-oembed to main module structure ([#12775](https://github.com/RocketChat/Rocket.Chat/pull/12775))
- Convert rocketchat-migrations to main-module structure ([#12772](https://github.com/RocketChat/Rocket.Chat/pull/12772))
- Convert rocketchat-message-mark-as-unread to main module structure ([#12766](https://github.com/RocketChat/Rocket.Chat/pull/12766))
- Remove conventional changelog cli, we are using our own cli now (Houston) ([#12798](https://github.com/RocketChat/Rocket.Chat/pull/12798))
- Convert rocketchat-message-attachments to main module structure ([#12760](https://github.com/RocketChat/Rocket.Chat/pull/12760))
- Convert rocketchat-message-action to main module structure ([#12759](https://github.com/RocketChat/Rocket.Chat/pull/12759))
- Convert rocketchat-mentions-flextab to main module structure ([#12757](https://github.com/RocketChat/Rocket.Chat/pull/12757))
- Convert rocketchat-mentions to main module structure ([#12756](https://github.com/RocketChat/Rocket.Chat/pull/12756))
- Convert rocketchat-markdown to main module structure ([#12755](https://github.com/RocketChat/Rocket.Chat/pull/12755))
- Convert rocketchat-mapview to main module structure ([#12701](https://github.com/RocketChat/Rocket.Chat/pull/12701))
- Add check to make sure releases was updated ([#12791](https://github.com/RocketChat/Rocket.Chat/pull/12791))
- Merge master into develop & Set version to 0.73.0-develop ([#12776](https://github.com/RocketChat/Rocket.Chat/pull/12776))
- Change `chat.getDeletedMessages` to get messages after informed date and return only message's _id ([#13021](https://github.com/RocketChat/Rocket.Chat/pull/13021))
- Improve Importer code quality ([#13020](https://github.com/RocketChat/Rocket.Chat/pull/13020))
- Regression: List of custom emojis wasn't working ([#13031](https://github.com/RocketChat/Rocket.Chat/pull/13031))
</details>
### 👩💻👨💻 Contributors 😍
- [@alexbartsch](https://github.com/alexbartsch)
- [@cyberb](https://github.com/cyberb)
- [@hypery2k](https://github.com/hypery2k)
- [@karakayasemi](https://github.com/karakayasemi)
- [@karlprieb](https://github.com/karlprieb)
- [@localguru](https://github.com/localguru)
- [@lvyue](https://github.com/lvyue)
- [@mathysie](https://github.com/mathysie)
- [@piotrkochan](https://github.com/piotrkochan)
- [@rssilva](https://github.com/rssilva)
- [@sanketsingh24](https://github.com/sanketsingh24)
- [@tsukiRep](https://github.com/tsukiRep)
- [@ura14h](https://github.com/ura14h)
### 👩💻👨💻 Core Team 🤓
- [@Hudell](https://github.com/Hudell)
- [@LuluGO](https://github.com/LuluGO)
- [@MarcosSpessatto](https://github.com/MarcosSpessatto)
- [@cardoso](https://github.com/cardoso)
- [@d-gubert](https://github.com/d-gubert)
- [@engelgabriel](https://github.com/engelgabriel)
- [@geekgonecrazy](https://github.com/geekgonecrazy)
- [@ggazzo](https://github.com/ggazzo)
- [@marceloschmidt](https://github.com/marceloschmidt)
- [@renatobecker](https://github.com/renatobecker)
- [@rodrigok](https://github.com/rodrigok)
- [@sampaiodiego](https://github.com/sampaiodiego)
- [@tassoevan](https://github.com/tassoevan)
# 0.72.3
`2018-12-12 · 1 🔍 · 5 👩💻👨💻`
<details>
<summary>🔍 Minor changes</summary>
- Release 0.72.3 ([#12932](https://github.com/RocketChat/Rocket.Chat/pull/12932) by [@piotrkochan](https://github.com/piotrkochan))
</details>
### 👩💻👨💻 Contributors 😍
@ -25,19 +212,27 @@
- [@tassoevan](https://github.com/tassoevan)
# 0.72.2
`2018-12-10 · 2 🐛 · 1 👩💻👨💻`
`2018-12-10 · 2 🐛 · 1 🔍 · 2 👩💻👨💻`
### 🐛 Bug fixes
- line-height for unread bar buttons (jump to first and mark as read) ([#12900](https://github.com/RocketChat/Rocket.Chat/pull/12900))
- PDF view loading indicator ([#12882](https://github.com/RocketChat/Rocket.Chat/pull/12882))
<details>
<summary>🔍 Minor changes</summary>
- Release 0.72.2 ([#12901](https://github.com/RocketChat/Rocket.Chat/pull/12901))
</details>
### 👩💻👨💻 Core Team 🤓
- [@sampaiodiego](https://github.com/sampaiodiego)
- [@tassoevan](https://github.com/tassoevan)
# 0.72.1
`2018-12-05 · 4 🐛 · 2 🔍 · 6 👩💻👨💻`
`2018-12-05 · 4 🐛 · 3 🔍 · 8 👩💻👨💻`
### 🐛 Bug fixes
@ -49,6 +244,7 @@
<details>
<summary>🔍 Minor changes</summary>
- Release 0.72.1 ([#12850](https://github.com/RocketChat/Rocket.Chat/pull/12850) by [@ohmonster](https://github.com/ohmonster) & [@piotrkochan](https://github.com/piotrkochan))
- Bump Apps-Engine version ([#12848](https://github.com/RocketChat/Rocket.Chat/pull/12848))
- Change file order in rocketchat-cors ([#12804](https://github.com/RocketChat/Rocket.Chat/pull/12804))
@ -64,6 +260,8 @@
- [@Hudell](https://github.com/Hudell)
- [@MarcosSpessatto](https://github.com/MarcosSpessatto)
- [@d-gubert](https://github.com/d-gubert)
- [@rodrigok](https://github.com/rodrigok)
- [@sampaiodiego](https://github.com/sampaiodiego)
- [@tassoevan](https://github.com/tassoevan)
# 0.72.0

@ -0,0 +1,19 @@
## WARNING to ROCKET.CHAT USERS
Rocket.Chat is open source software. Anyone in the world can download and run a Rocket.Chat server at any time.
As a user of Rocket.Chat, someone with a Rocket.Chat account, you need to be aware that you may be using a Rocket.Chat server that is operated by arbitrary businesses, groups or individuals with no relationship to Rocket.Chat Technologies Corp.
In particular:
- Rocket.Chat Technologies Corp. do not have access to these servers.
- Rocket.Chat Technologies Corp. do not and cannot control or regulate how these servers are operated.
- Rocket.Chat Technologies Corp. cannot access, determine or regulate any contents or information flow on these servers.
## IMPORTANT
For total transparency, Rocket.Chat Technologies Corp. owns and operates only ONE publicly available Rocket.Chat server in the world. The server that Rocket.Chat Technologies Corp. operates can only be accessed at:
https://open.rocket.chat
Any other Rocket.Chat server you access is not operated by Rocket.Chat Technologies Corp. and is subjected to the usage warning above.

@ -39,6 +39,7 @@
* [Hyper.sh](#hypersh)
* [WeDeploy](#wedeploy)
* [D2C.io](#d2cio)
* [Syncloud.org](#syncloudorg)
* [About Rocket.Chat](#about-rocketchat)
* [In the News](#in-the-news)
* [Features](#features)
@ -231,6 +232,11 @@ Deploy Rocket.Chat stack to your server with [D2C](https://d2c.io/). Scale with
[![Deploy](https://github.com/mastappl/images/blob/master/deployTo.png)](https://panel.d2c.io/?import=https://github.com/d2cio/rocketchat-stack/archive/master.zip/)
## Syncloud.org
Run Rocket.Chat on your easy to use personal device.
[![Deploy](https://syncloud.org/images/logo_min.svg)](https://syncloud.org)
# About Rocket.Chat
Rocket.Chat is a Web Chat Server, developed in JavaScript, using the [Meteor](https://www.meteor.com/install) fullstack framework.
@ -408,6 +414,13 @@ meteor npm install
meteor npm start
```
In order to debug the server part use [meteor debugging](https://docs.meteor.com/commandline.html#meteordebug). You should use Chrome for best debugging experience:
```sh
meteor debug
```
You'll find a nodejs icon in the developer console.
If you are not a developer and just want to run the server - see [deployment methods](https://rocket.chat/docs/installation/paas-deployments/).
## Branching Model
@ -424,7 +437,7 @@ If you want to help, send an email to support at rocket.chat to be invited to th
## How to Contribute
Already a JavaScript developer? Familiar with Meteor? [Pick an issue](https://github.com/RocketChat/Rocket.Chat/labels/contrib%3A%20easy), push a PR and instantly become a member of Rocket.Chat's international contributors community.
Already a JavaScript developer? Familiar with Meteor? [Pick an issue](https://github.com/RocketChat/Rocket.Chat/labels/contrib%3A%20easy), push a PR and instantly become a member of Rocket.Chat's international contributors community. For more information, check out our [Contributing Guide](.github/CONTRIBUTING.md) and our [Official Documentation for Contributors](https://rocket.chat/docs/contributing/).
A lot of work has already gone into Rocket.Chat, but we have much bigger plans for it!

@ -1,6 +1,7 @@
import { Meteor } from 'meteor/meteor';
import { Tracker } from 'meteor/tracker';
import { TimeSync } from 'meteor/mizzao:timesync';
import { t } from 'meteor/rocketchat:utils';
import _ from 'underscore';
import moment from 'moment';
import toastr from 'toastr';

@ -1,8 +1,8 @@
/* globals KonchatNotification, fireGlobalEvent, readMessage, CachedChatSubscription */
import { Meteor } from 'meteor/meteor';
import { Tracker } from 'meteor/tracker';
import { FlowRouter } from 'meteor/kadira:flow-router';
import { Session } from 'meteor/session';
import { KonchatNotification, fireGlobalEvent, readMessage, CachedChatSubscription } from 'meteor/rocketchat:ui';
// Show notifications and play a sound for new messages.
// We trust the server to only send notifications for interesting messages, e.g. direct messages or

@ -1,5 +1,5 @@
/* globals updateAvatarOfUsername */
import { Meteor } from 'meteor/meteor';
import { updateAvatarOfUsername } from 'meteor/rocketchat:ui';
Meteor.startup(function() {
RocketChat.Notifications.onLogged('updateAvatar', function(data) {

@ -1,5 +1,5 @@
/* globals fireGlobalEvent */
import { Meteor } from 'meteor/meteor';
import { fireGlobalEvent } from 'meteor/rocketchat:ui';
/* fire user state change globally, to listen on desktop electron client */
Meteor.startup(function() {

@ -1,4 +1,3 @@
/* globals KonchatNotification */
import { Meteor } from 'meteor/meteor';
import { Accounts } from 'meteor/accounts-base';
import { Tracker } from 'meteor/tracker';
@ -6,6 +5,7 @@ import { Blaze } from 'meteor/blaze';
import { FlowRouter } from 'meteor/kadira:flow-router';
import { BlazeLayout } from 'meteor/kadira:blaze-layout';
import { Session } from 'meteor/session';
import { KonchatNotification } from 'meteor/rocketchat:ui';
import s from 'underscore.string';
Blaze.registerHelper('pathFor', function(path, kw) {

@ -1,8 +1,8 @@
/* globals isRtl */
import { Meteor } from 'meteor/meteor';
import { ReactiveVar } from 'meteor/reactive-var';
import { Tracker } from 'meteor/tracker';
import { TAPi18n } from 'meteor/tap:i18n';
import { isRtl } from 'meteor/rocketchat:utils';
import moment from 'moment';
const currentLanguage = new ReactiveVar();

@ -1,8 +1,9 @@
/* globals UserPresence, fireGlobalEvent */
import { Meteor } from 'meteor/meteor';
import { Tracker } from 'meteor/tracker';
import { Session } from 'meteor/session';
import { TimeSync } from 'meteor/mizzao:timesync';
import { UserPresence } from 'meteor/konecty:user-presence';
import { fireGlobalEvent } from 'meteor/rocketchat:ui';
import toastr from 'toastr';
import hljs from 'highlight.js';
import 'highlight.js/styles/github.css';

@ -1,9 +1,9 @@
/* globals fireGlobalEvent, readMessage, favico, menu */
import { Meteor } from 'meteor/meteor';
import { Tracker } from 'meteor/tracker';
import { FlowRouter } from 'meteor/kadira:flow-router';
import { Session } from 'meteor/session';
import { Favico } from 'meteor/rocketchat:favico';
import { fireGlobalEvent, readMessage } from 'meteor/rocketchat:ui';
Meteor.startup(function() {
Tracker.autorun(function() {
@ -77,8 +77,8 @@ Meteor.startup(function() {
const unread = Session.get('unread');
fireGlobalEvent('unread-changed', unread);
if (favico) {
favico.badge(unread, {
if (window.favico) {
window.favico.badge(unread, {
bgColor: typeof unread !== 'number' ? '#3d8a3a' : '#ac1b1b',
});
}

@ -1,3 +1,5 @@
import { t } from 'meteor/rocketchat:utils';
RocketChat.MessageAction.addButton({
id: 'receipt-detail',
icon: 'info-circled',

@ -3,6 +3,7 @@ import { Mongo } from 'meteor/mongo';
import { ReactiveVar } from 'meteor/reactive-var';
import { Tracker } from 'meteor/tracker';
import { Template } from 'meteor/templating';
import { t } from 'meteor/rocketchat:utils';
import toastr from 'toastr';
import moment from 'moment';

14395
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -1,7 +1,7 @@
{
"name": "Rocket.Chat",
"description": "The Ultimate Open Source WebChat Platform",
"version": "0.72.3",
"version": "0.73.0",
"author": {
"name": "Rocket.Chat",
"url": "https://rocket.chat/"
@ -89,66 +89,66 @@
"email": "support@rocket.chat"
},
"devDependencies": {
"@octokit/rest": "^15.15.1",
"@octokit/rest": "^16.1.0",
"@rocket.chat/eslint-config": "^0.1.2",
"autoprefixer": "^8.6.5",
"autoprefixer": "^9.4.1",
"babel-eslint": "^10.0.1",
"babel-mocha-es6-compiler": "^0.1.0",
"babel-plugin-array-includes": "^2.0.3",
"chimp": "^0.51.1",
"conventional-changelog-cli": "^2.0.5",
"eslint": "^4.19.1",
"husky": "^0.14.3",
"eslint": "^5.9.0",
"husky": "^1.2.0",
"mocha": "^5.2.0",
"mock-require": "^3.0.2",
"postcss": "^6.0.22",
"postcss-custom-properties": "^7.0.0",
"postcss-easy-import": "^1.0.1",
"postcss-import": "^12.0.0",
"postcss-load-config": "^1.2.0",
"postcss-media-minmax": "^3.0.0",
"postcss-nested": "^3.0.0",
"postcss-selector-not": "^3.0.1",
"progress": "^2.0.1",
"postcss": "^7.0.6",
"postcss-custom-properties": "^8.0.9",
"postcss-easy-import": "^3.0.0",
"postcss-import": "^12.0.1",
"postcss-load-config": "^2.0.0",
"postcss-media-minmax": "^4.0.0",
"postcss-nested": "^4.1.0",
"postcss-selector-not": "^4.0.0",
"progress": "^2.0.2",
"proxyquire": "^2.1.0",
"simple-git": "^1.106.0",
"stylelint": "^9.7.0",
"stylelint-order": "^0.8.1",
"simple-git": "^1.107.0",
"stylelint": "^9.9.0",
"stylelint-order": "^2.0.0",
"supertest": "^3.3.0"
},
"dependencies": {
"@babel/runtime": "^7.1.2",
"@google-cloud/language": "^1.2.0",
"@google-cloud/storage": "^1.7.0",
"@google-cloud/vision": "^0.19.0",
"@babel/runtime": "^7.2.0",
"@google-cloud/language": "^2.0.0",
"@google-cloud/storage": "^2.3.1",
"@google-cloud/vision": "^0.23.0",
"@rocket.chat/apps-engine": "1.3.2",
"@slack/client": "^4.8.0",
"adm-zip": "^0.4.11",
"archiver": "^2.1.1",
"adm-zip": "^0.4.13",
"archiver": "^3.0.0",
"arraybuffer-to-string": "^1.0.2",
"atlassian-crowd": "^0.5.0",
"autolinker": "^1.7.1",
"aws-sdk": "^2.344.0",
"bad-words": "^1.6.5",
"bcrypt": "^2.0.1",
"blockstack": "18.0.4",
"bson": "^2.0.8",
"autolinker": "^1.8.1",
"aws-sdk": "^2.368.0",
"bad-words": "^3.0.0",
"bcrypt": "^3.0.2",
"blockstack": "18.1.0",
"body-parser": "1.18.3",
"bson": "^4.0.0",
"bugsnag": "^2.4.3",
"bunyan": "^1.8.12",
"busboy": "^0.2.14",
"bytebuffer": "5.0.1",
"cas": "https://github.com/kcbanner/node-cas/tarball/fcd27dad333223b3b75a048bce27973fb3ca0f62",
"chart.js": "^2.7.3",
"clipboard": "^2.0.1",
"codemirror": "^5.41.0",
"coffeescript": "^1.12.7",
"connect": "^2.7.10",
"clipboard": "^2.0.4",
"codemirror": "^5.42.0",
"coffeescript": "^2.3.2",
"connect": "^3.6.6",
"core-js": "^2.5.7",
"csv-parse": "^2.5.0",
"csv-parse": "^4.0.1",
"emailreplyparser": "^0.0.5",
"express": "^4.16.4",
"fibers": "^3.0.0",
"file-type": "^8.1.0",
"fibers": "^3.1.1",
"file-type": "^10.6.0",
"filesize": "^3.6.1",
"grapheme-splitter": "^1.0.4",
"gridfs-stream": "^1.1.1",
@ -160,45 +160,45 @@
"ip-range-check": "^0.0.2",
"jquery": "^3.3.1",
"jschardet": "^1.6.0",
"juice": "^4.3.2",
"juice": "^5.0.1",
"ldapjs": "^1.0.2",
"less": "https://github.com/meteor/less.js/tarball/8130849eb3d7f0ecf0ca8d0af7c4207b0442e3f6",
"less-plugin-autoprefix": "^1.5.1",
"less-plugin-autoprefix": "^2.0.0",
"localforage": "^1.7.3",
"lokijs": "^1.5.5",
"lru-cache": "^4.1.3",
"mailparser": "^2.4.0",
"marked": "^0.4.0",
"meteor-node-stubs": "^0.3.2",
"lru-cache": "^5.1.1",
"mailparser": "^2.4.3",
"marked": "^0.5.2",
"meteor-node-stubs": "^0.4.1",
"mime-db": "^1.37.0",
"mime-type": "^3.0.5",
"mime-type": "^3.0.7",
"mkdirp": "^0.5.1",
"moment": "^2.22.2",
"moment-timezone": "^0.5.23",
"node-dogstatsd": "^0.0.7",
"object-path": "^0.11.4",
"pdfjs-dist": "^2.0.550",
"pdfjs-dist": "^2.0.943",
"photoswipe": "^4.1.2",
"poplib": "^0.1.7",
"prom-client": "^11.1.3",
"prom-client": "^11.2.0",
"querystring": "^0.2.0",
"queue-fifo": "^0.2.4",
"queue-fifo": "^0.2.5",
"redis": "^2.8.0",
"semver": "^5.6.0",
"sharp": "^0.20.8",
"sharp": "^0.21.0",
"speakeasy": "^2.0.0",
"tar-stream": "^1.6.2",
"toastr": "^2.1.4",
"turndown": "^5.0.1",
"twilio": "^3.23.2",
"twilio": "^3.25.0",
"twit": "^2.2.11",
"ua-parser-js": "^0.7.19",
"underscore": "^1.9.1",
"underscore.string": "^3.3.5",
"webdav": "^1.6.1",
"webdav": "^2.0.0",
"wolfy87-eventemitter": "^5.2.5",
"xml-crypto": "^0.10.1",
"xml2js": "0.2.0",
"xml-crypto": "^1.0.2",
"xml2js": "0.4.19",
"xmlbuilder": "^10.1.1",
"xmldom": "^0.1.27",
"yaqrcode": "^0.2.1"

@ -1,4 +1,3 @@
import './style.css';
import './template/admin.html';
import './template/result.html';
import './template/suggestion.html';

@ -1,6 +1,6 @@
import { FlowRouter } from 'meteor/kadira:flow-router';
import { BlazeLayout } from 'meteor/kadira:blaze-layout';
import { t } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';
FlowRouter.route('/admin/chatpal', {
name: 'chatpal-admin',

@ -9,13 +9,13 @@ Package.onUse(function(api) {
api.use([
'ecmascript',
'templating',
'rocketchat:utils',
]);
api.addAssets([
'server/asset/chatpal-enter.svg',
'server/asset/chatpal-logo-icon-darkblue.svg',
], 'server');
api.addFiles('client/style.css', 'client');
api.mainModule('client/index.js', 'client');
api.mainModule('server/index.js', 'server');
});

@ -1,4 +1,3 @@
/* globals cordova */
import { Meteor } from 'meteor/meteor';
import { Accounts } from 'meteor/accounts-base';
import { Random } from 'meteor/random';

@ -4,6 +4,7 @@ import { Random } from 'meteor/random';
import { WebApp } from 'meteor/webapp';
import { RocketChat } from 'meteor/rocketchat:lib';
import { RoutePolicy } from 'meteor/routepolicy';
import bodyParser from 'body-parser';
import { SAML } from './saml_utils';
import _ from 'underscore';
@ -18,7 +19,6 @@ if (!Accounts.saml) {
}
import fiber from 'fibers';
import connect from 'connect';
RoutePolicy.declare('/_saml/', 'network');
/**
@ -373,7 +373,7 @@ const middleware = function(req, res, next) {
};
// Listen to incoming SAML http requests
WebApp.connectHandlers.use(connect.bodyParser()).use(function(req, res, next) {
WebApp.connectHandlers.use(bodyParser.json()).use(function(req, res, next) {
// Need to create a fiber since we're using synchronous http calls and nothing
// else is wrapping this in a fiber automatically
fiber(function() {

@ -1,4 +1,3 @@
import './autocomplete.css';
import './inputs.html';
import './templates';
import AutoComplete from './autocomplete-client';

@ -11,14 +11,13 @@ Package.onUse(function(api) {
'mongo',
'ddp',
]);
api.use([
'blaze',
'templating',
'jquery',
'dandv:caret-position@2.1.0-3',
], 'client');
api.addFiles('client/autocomplete.css', 'client');
api.mainModule('client/index.js', 'client');
api.mainModule('server/index.js', 'server');
});

@ -1,6 +1,7 @@
import { Meteor } from 'meteor/meteor';
import { Accounts } from 'meteor/accounts-base';
import { t, modal } from 'meteor/rocketchat:ui';
import { modal } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';
import toastr from 'toastr';
function reportError(error, callback) {

@ -1,8 +1,9 @@
import { Meteor } from 'meteor/meteor';
import { ReactiveVar } from 'meteor/reactive-var';
import { Template } from 'meteor/templating';
import { t, modal } from 'meteor/rocketchat:ui';
import { modal } from 'meteor/rocketchat:ui';
import { RocketChat } from 'meteor/rocketchat:lib';
import { t } from 'meteor/rocketchat:utils';
import toastr from 'toastr';
import qrcode from 'yaqrcode';

@ -15,6 +15,7 @@ Package.onUse(function(api) {
'sha',
'random',
'rocketchat:ui',
'rocketchat:utils',
]);
api.mainModule('client/index.js', 'client');

@ -1,4 +1,3 @@
import '../both/lib/actionLinks';
import './stylesheets/actionLinks.css';
import './lib/actionLinks';
import './init';

@ -13,6 +13,7 @@ Package.onUse(function(api) {
'rocketchat:theme',
'rocketchat:ui',
]);
api.addFiles('client/stylesheets/actionLinks.css', 'client');
api.mainModule('client/index.js', 'client');
api.mainModule('server/index.js', 'server');
});

@ -1,5 +1,6 @@
import { Meteor } from 'meteor/meteor';
import { RocketChat } from 'meteor/rocketchat:lib';
import { EJSON } from 'meteor/ejson';
RocketChat.API.helperMethods.set('parseJsonQuery', function _parseJsonQuery() {
let sort;
@ -50,7 +51,7 @@ RocketChat.API.helperMethods.set('parseJsonQuery', function _parseJsonQuery() {
let query = {};
if (this.queryParams.query) {
try {
query = JSON.parse(this.queryParams.query);
query = EJSON.parse(this.queryParams.query);
} catch (e) {
this.logger.warn(`Invalid query parameter provided "${ this.queryParams.query }":`, e);
throw new Meteor.Error('error-invalid-query', `Invalid query parameter provided: "${ this.queryParams.query }"`, { helperMethod: 'parseJsonQuery' });

@ -20,6 +20,7 @@ import './v1/emoji-custom';
import './v1/groups';
import './v1/im';
import './v1/integrations';
import './v1/import';
import './v1/misc';
import './v1/permissions';
import './v1/push';

@ -342,3 +342,36 @@ RocketChat.API.v1.addRoute('chat.ignoreUser', { authRequired: true }, {
return RocketChat.API.v1.success();
},
});
RocketChat.API.v1.addRoute('chat.getDeletedMessages', { authRequired: true }, {
get() {
const { roomId, since } = this.queryParams;
const { offset, count } = this.getPaginationItems();
if (!roomId) {
throw new Meteor.Error('The required "roomId" query param is missing.');
}
if (!since) {
throw new Meteor.Error('The required "since" query param is missing.');
} else if (isNaN(Date.parse(since))) {
throw new Meteor.Error('The "since" query parameter must be a valid date.');
}
const cursor = RocketChat.models.Messages.trashFindDeletedAfter(new Date(since), { rid: roomId }, {
skip: offset,
limit: count,
fields: { _id: 1 },
});
const total = cursor.count();
const messages = cursor.fetch();
return RocketChat.API.v1.success({
messages,
count: messages.length,
offset,
total,
});
},
});

@ -3,7 +3,8 @@ import { RocketChat } from 'meteor/rocketchat:lib';
RocketChat.API.v1.addRoute('emoji-custom', { authRequired: true }, {
get() {
const emojis = Meteor.call('listEmojiCustom');
const { query } = this.parseJsonQuery();
const emojis = Meteor.call('listEmojiCustom', query);
return RocketChat.API.v1.success({ emojis });
},

@ -0,0 +1,42 @@
import { Meteor } from 'meteor/meteor';
import { RocketChat } from 'meteor/rocketchat:lib';
RocketChat.API.v1.addRoute('uploadImportFile', { authRequired: true }, {
post() {
const { binaryContent, contentType, fileName, importerKey } = this.bodyParams;
Meteor.runAsUser(this.userId, () => {
RocketChat.API.v1.success(Meteor.call('uploadImportFile', binaryContent, contentType, fileName, importerKey));
});
return RocketChat.API.v1.success();
},
});
RocketChat.API.v1.addRoute('downloadPublicImportFile', { authRequired: true }, {
post() {
const { fileUrl, importerKey } = this.bodyParams;
Meteor.runAsUser(this.userId, () => {
RocketChat.API.v1.success(Meteor.call('downloadPublicImportFile', fileUrl, importerKey));
});
return RocketChat.API.v1.success();
},
});
RocketChat.API.v1.addRoute('getImportFileData', { authRequired: true }, {
get() {
const { importerKey } = this.requestParams();
let result;
Meteor.runAsUser(this.userId, () => {
result = Meteor.call('getImportFileData', importerKey);
});
return RocketChat.API.v1.success(result);
},
});

@ -20,13 +20,46 @@ RocketChat.API.v1.addRoute('permissions', { authRequired: true }, {
},
});
// DEPRECATED
// TODO: Remove this after three versions have been released. That means at 0.85 this should be gone.
RocketChat.API.v1.addRoute('permissions.list', { authRequired: true }, {
get() {
const result = Meteor.runAsUser(this.userId, () => Meteor.call('permissions/get'));
return RocketChat.API.v1.success({
permissions: result,
});
return RocketChat.API.v1.success(this.deprecationWarning({
endpoint: 'permissions.list',
versionWillBeRemove: '0.85',
response: {
permissions: result,
},
}));
},
});
RocketChat.API.v1.addRoute('permissions.listAll', { authRequired: true }, {
get() {
const { updatedSince } = this.queryParams;
let updatedSinceDate;
if (updatedSince) {
if (isNaN(Date.parse(updatedSince))) {
throw new Meteor.Error('error-roomId-param-invalid', 'The "updatedSince" query parameter must be a valid date.');
} else {
updatedSinceDate = new Date(updatedSince);
}
}
let result;
Meteor.runAsUser(this.userId, () => result = Meteor.call('permissions/get', updatedSinceDate));
if (Array.isArray(result)) {
result = {
update: result,
remove: [],
};
}
return RocketChat.API.v1.success(result);
},
});

@ -422,7 +422,6 @@ RocketChat.API.v1.addRoute('users.setPreferences', { authRequired: true }, {
muteFocusedConversations: Match.Optional(Boolean),
}),
});
const userId = this.bodyParams.userId ? this.bodyParams.userId : this.userId;
const userData = {
_id: userId,
@ -438,13 +437,23 @@ RocketChat.API.v1.addRoute('users.setPreferences', { authRequired: true }, {
}
Meteor.runAsUser(this.userId, () => RocketChat.saveUser(this.userId, userData));
const user = RocketChat.models.Users.findOneById(userId, {
fields: {
'settings.preferences': 1,
language: 1,
},
});
return RocketChat.API.v1.success({
user: RocketChat.models.Users.findOneById(userId, {
fields: {
'settings.preferences': 1,
user: {
_id: user._id,
settings: {
preferences: {
...user.settings.preferences,
language: user.language,
},
},
}),
},
});
},
});

@ -275,8 +275,8 @@
</div>
{{> CodeMirror name=id options=getEditorOptions code=value }}
<div class="buttons">
<button class="button primary button-fullscreen">Full Screen</button>
<button class="button primary button-restore">Exit Full Screen</button>
<button class="button primary button-fullscreen">{{_ "Full_Screen"}}</button>
<button class="button primary button-restore">{{_ "Exit_Full_Screen"}}</button>
</div>
</div>
{{/if}}

@ -2,8 +2,9 @@ import toastr from 'toastr';
import { ReactiveVar } from 'meteor/reactive-var';
import { FlowRouter } from 'meteor/kadira:flow-router';
import { Template } from 'meteor/templating';
import { t } from 'meteor/rocketchat:utils';
import { AppEvents } from '../communication';
const ENABLED_STATUS = ['auto_enabled', 'manually_enabled'];
const HOST = 'https://marketplace.rocket.chat';
const enabled = ({ status }) => ENABLED_STATUS.includes(status);

@ -8,6 +8,7 @@ Package.onUse(function(api) {
'ecmascript',
'rocketchat:lib',
'rocketchat:api',
'rocketchat:utils',
'templating',
]);

@ -7,11 +7,11 @@ export class AppEnvironmentalVariableBridge {
async getValueByName(envVarName, appId) {
console.log(`The App ${ appId } is getting the environmental variable value ${ envVarName }.`);
if (this.isReadable(envVarName, appId)) {
return process.env[envVarName];
if (!(await this.isReadable(envVarName, appId))) {
throw new Error(`The environmental variable "${ envVarName }" is not readable.`);
}
throw new Error(`The environmental variable "${ envVarName }" is not readable.`);
return process.env[envVarName];
}
async isReadable(envVarName, appId) {
@ -23,10 +23,10 @@ export class AppEnvironmentalVariableBridge {
async isSet(envVarName, appId) {
console.log(`The App ${ appId } is checking if the environmental variable is set ${ envVarName }.`);
if (this.isReadable(envVarName, appId)) {
return typeof process.env[envVarName] !== 'undefined';
if (!(await this.isReadable(envVarName, appId))) {
throw new Error(`The environmental variable "${ envVarName }" is not readable.`);
}
throw new Error(`The environmental variable "${ envVarName }" is not readable.`);
return typeof process.env[envVarName] !== 'undefined';
}
}

@ -1,4 +1,3 @@
import './stylesheets/permissions.css';
import '../lib/rocketchat';
import './lib/models/Roles';
import './lib/models/Users';

@ -1,6 +1,6 @@
import { FlowRouter } from 'meteor/kadira:flow-router';
import { BlazeLayout } from 'meteor/kadira:blaze-layout';
import { t } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';
FlowRouter.route('/admin/permissions', {
name: 'admin-permissions',

@ -21,6 +21,11 @@
<option value="Users" selected="{{$eq scope 'Users'}}">{{_ "Global"}}</option>
<option value="Subscriptions" selected="{{$eq scope 'Subscriptions'}}">{{_ "Rooms"}}</option>
</select>
<br/>
<label for="mandatory2fa">{{_ "Users must use Two Factor Authentication"}} :</label>
<input type="checkbox" name="mandatory2fa" checked="{{mandatory2fa}}">
<div class="form-buttons">
{{#if editable}}
<button name="delete" class="button danger delete-role">{{_ "Delete"}}</button>

@ -2,7 +2,8 @@ import { Meteor } from 'meteor/meteor';
import { ReactiveVar } from 'meteor/reactive-var';
import { FlowRouter } from 'meteor/kadira:flow-router';
import { Template } from 'meteor/templating';
import { t, modal } from 'meteor/rocketchat:ui';
import { modal } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';
import { RocketChat, handleError } from 'meteor/rocketchat:lib';
import toastr from 'toastr';
@ -145,6 +146,7 @@ Template.permissionsRole.events({
const roleData = {
description: e.currentTarget.elements.description.value,
scope: e.currentTarget.elements.scope.value,
mandatory2fa: e.currentTarget.elements.mandatory2fa.checked,
};
if (this._id) {

@ -11,6 +11,7 @@ Package.onUse(function(api) {
'ecmascript',
'rocketchat:lib',
'mongo',
'rocketchat:utils',
]);
api.use([
'templating',
@ -18,7 +19,7 @@ Package.onUse(function(api) {
'kadira:flow-router',
'kadira:blaze-layout',
], 'client');
api.addFiles('client/stylesheets/permissions.css', 'client');
api.mainModule('client/index.js', 'client');
api.mainModule('server/index.js', 'server');
});

@ -1,4 +1,5 @@
/* globals RocketChat */
import { RocketChat } from 'meteor/rocketchat:lib';
RocketChat.authz.roomAccessValidators = [
function(room, user = {}) {
if (room && room.t === 'c') {

@ -20,7 +20,7 @@ Meteor.methods({
roleData.scope = 'Users';
}
const update = RocketChat.models.Roles.createOrUpdate(roleData.name, roleData.scope, roleData.description);
const update = RocketChat.models.Roles.createOrUpdate(roleData.name, roleData.scope, roleData.description, false, roleData.mandatory2fa);
if (RocketChat.settings.get('UI_DisplayRoles')) {
RocketChat.Notifications.notifyLogged('roles-change', {
type: 'changed',

@ -26,7 +26,7 @@ class ModelRoles extends RocketChat.models._Base {
});
}
createOrUpdate(name, scope = 'Users', description, protectedRole) {
createOrUpdate(name, scope = 'Users', description, protectedRole, mandatory2fa) {
const updateData = {};
updateData.name = name;
updateData.scope = scope;
@ -39,6 +39,10 @@ class ModelRoles extends RocketChat.models._Base {
updateData.protected = protectedRole;
}
if (mandatory2fa != null) {
updateData.mandatory2fa = mandatory2fa;
}
this.upsert({ _id: name }, { $set: updateData });
}

@ -95,6 +95,6 @@ Meteor.startup(function() {
];
for (const role of defaultRoles) {
RocketChat.models.Roles.upsert({ _id: role.name }, { $setOnInsert: { scope: role.scope, description: role.description || '', protected: true } });
RocketChat.models.Roles.upsert({ _id: role.name }, { $setOnInsert: { scope: role.scope, description: role.description || '', protected: true, mandatory2fa: false } });
}
});

@ -1,4 +1,3 @@
import './stylesheets/autotranslate.css';
import './lib/actionButton';
import './lib/autotranslate';
import './lib/tabBar';

@ -7,7 +7,7 @@ Meteor.startup(function() {
if (RocketChat.settings.get('AutoTranslate_Enabled') && RocketChat.authz.hasAtLeastOnePermission(['auto-translate'])) {
RocketChat.MessageAction.addButton({
id: 'toggle-language',
icon: 'icon-language',
icon: 'language',
label: 'Toggle_original_translated',
context: [
'message',

@ -3,7 +3,8 @@ import { ReactiveVar } from 'meteor/reactive-var';
import { Random } from 'meteor/random';
import { Template } from 'meteor/templating';
import { RocketChat } from 'meteor/rocketchat:lib';
import { ChatSubscription, t } from 'meteor/rocketchat:ui';
import { ChatSubscription } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';
import _ from 'underscore';
import toastr from 'toastr';

@ -11,7 +11,9 @@ Package.onUse(function(api) {
'ddp-rate-limiter',
'rocketchat:lib',
'templating',
'rocketchat:utils',
]);
api.addFiles('client/stylesheets/autotranslate.css', 'client');
api.mainModule('client/index.js', 'client');
api.mainModule('server/index.js', 'server');
});

@ -5,7 +5,8 @@ import { Session } from 'meteor/session';
import { Template } from 'meteor/templating';
import { AutoComplete } from 'meteor/mizzao:autocomplete';
import { RocketChat, handleError } from 'meteor/rocketchat:lib';
import { t, ChatRoom } from 'meteor/rocketchat:ui';
import { ChatRoom } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';
import { Deps } from 'meteor/deps';
import toastr from 'toastr';
import resetSelection from '../resetSelection';

@ -15,6 +15,7 @@ Package.onUse(function(api) {
'rocketchat:channel-settings',
'mizzao:autocomplete',
'mongo',
'rocketchat:utils',
]);
api.mainModule('client/index.js', 'client');
api.mainModule('server/index.js', 'server');

@ -1,4 +1,3 @@
import './stylesheets/channel-settings.css';
import './startup/messageTypes';
import './startup/tabBar';
import './startup/trackSettingsChange';

@ -1,6 +1,6 @@
import { Meteor } from 'meteor/meteor';
import { RocketChat } from 'meteor/rocketchat:lib';
import { t } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';
import s from 'underscore.string';
Meteor.startup(function() {

@ -1,4 +1,3 @@
/* globals popover */
import { Meteor } from 'meteor/meteor';
import { ReactiveVar } from 'meteor/reactive-var';
import { Template } from 'meteor/templating';
@ -7,7 +6,8 @@ import toastr from 'toastr';
import moment from 'moment';
import s from 'underscore.string';
import { call, erase, hide, leave, RocketChat, RoomSettingsEnum } from 'meteor/rocketchat:lib';
import { modal, t, ChatRoom } from 'meteor/rocketchat:ui';
import { modal, ChatRoom, popover } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';
const common = {
canLeaveRoom() {

@ -12,7 +12,10 @@ Package.onUse(function(api) {
'tracker',
'templating',
'rocketchat:lib',
'rocketchat:ui',
'rocketchat:utils',
]);
api.addFiles('client/stylesheets/channel-settings.css', 'client');
api.mainModule('client/index.js', 'client');
api.mainModule('server/index.js', 'server');
});

@ -39,16 +39,16 @@ Meteor.methods({
const room = RocketChat.models.Rooms.findOneById(rid);
if (room.broadcast && (settings.readOnly || settings.reactWhenReadOnly)) {
throw new Meteor.Error('error-action-not-allowed', 'Editing readOnly/reactWhenReadOnly are not allowed for broadcast rooms', {
if (!room) {
throw new Meteor.Error('error-invalid-room', 'Invalid room', {
method: 'saveRoomSettings',
action: 'Editing_room',
});
}
if (!room) {
throw new Meteor.Error('error-invalid-room', 'Invalid room', {
if (room.broadcast && (settings.readOnly || settings.reactWhenReadOnly)) {
throw new Meteor.Error('error-action-not-allowed', 'Editing readOnly/reactWhenReadOnly are not allowed for broadcast rooms', {
method: 'saveRoomSettings',
action: 'Editing_room',
});
}

@ -1,2 +1 @@
import './style.css';
import './client';

@ -10,6 +10,7 @@ Package.onUse(function(api) {
'ecmascript',
'rocketchat:lib',
]);
api.addFiles('client/style.css', 'client');
api.mainModule('client/index.js', 'client');
api.mainModule('server/index.js', 'server');
});

@ -1,8 +1,9 @@
/* globals OAuth*/
import { Meteor } from 'meteor/meteor';
import { Match } from 'meteor/check';
import { Accounts } from 'meteor/accounts-base';
import { Random } from 'meteor/random';
import { ServiceConfiguration } from 'meteor/service-configuration';
import { OAuth } from 'meteor/oauth';
import s from 'underscore.string';
// Request custom OAuth credentials for the user

@ -12,6 +12,7 @@ Package.onUse(function(api) {
api.use('ecmascript');
api.use('accounts-oauth');
api.use('service-configuration');
api.use('rocketchat:logger');
api.use('templating', 'client');

@ -1,8 +1,10 @@
/* globals OAuth*/
import { Meteor } from 'meteor/meteor';
import { Match } from 'meteor/check';
import { Accounts } from 'meteor/accounts-base';
import { OAuth } from 'meteor/oauth';
import { HTTP } from 'meteor/http';
import { ServiceConfiguration } from 'meteor/service-configuration';
import { Logger } from 'meteor/rocketchat:logger';
import _ from 'underscore';
const logger = new Logger('CustomOAuth');

@ -1,7 +1,7 @@
import { Meteor } from 'meteor/meteor';
import { Template } from 'meteor/templating';
import { TAPi18n } from 'meteor/tap:i18n';
import { t } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';
import { handleError } from 'meteor/rocketchat:lib';
import toastr from 'toastr';
import s from 'underscore.string';

@ -1,7 +1,8 @@
import { Meteor } from 'meteor/meteor';
import { ReactiveVar } from 'meteor/reactive-var';
import { Template } from 'meteor/templating';
import { t, modal } from 'meteor/rocketchat:ui';
import { modal } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';
import { handleError } from 'meteor/rocketchat:lib';
Template.soundInfo.helpers({

@ -1,4 +1,3 @@
import '../assets/stylesheets/customSoundsAdmin.css';
import './lib/CustomSounds';
import './models/CustomSounds';
import './notifications/deleteCustomSound';

@ -10,13 +10,14 @@ Package.onUse(function(api) {
'ecmascript',
'rocketchat:file',
'rocketchat:lib',
'rocketchat:utils',
'templating',
'reactive-var',
'webapp',
'kadira:flow-router',
'kadira:blaze-layout',
]);
api.addFiles('assets/stylesheets/customSoundsAdmin.css', 'client');
api.mainModule('client/index.js', 'client');
api.mainModule('server/index.js', 'server');
});

@ -1,2 +1 @@
import './login-button.css';
import '../lib/common';

@ -14,6 +14,7 @@ Package.onUse(function(api) {
'rocketchat:custom-oauth',
'templating',
]);
api.addFiles('client/login-button.css', 'client');
api.mainModule('client/index.js', 'client');
api.mainModule('server/index.js', 'server');
});

@ -1,2 +1 @@
import './login-button.css';
import '../lib/common';

@ -13,6 +13,7 @@ Package.onUse(function(api) {
'rocketchat:custom-oauth',
'templating',
]);
api.addFiles('client/login-button.css', 'client');
api.mainModule('client/index.js', 'client');
api.mainModule('server/index.js', 'server');
});

@ -1,4 +0,0 @@
{
"extends": ["@rocket.chat/eslint-config"],
"root": true
}

@ -1,7 +1,9 @@
/* globals Template, t, ReactiveVar */
import { Template } from 'meteor/templating';
import { ReactiveVar } from 'meteor/reactive-var';
import toastr from 'toastr';
import s from 'underscore.string';
import { RocketChat } from 'meteor/rocketchat:lib';
import { t } from 'meteor/rocketchat:utils';
import { e2e } from 'meteor/rocketchat:e2e';
Template.accountEncryption.helpers({

@ -1,7 +1,3 @@
/* globals alerts, modal */
import './stylesheets/e2e';
import { Meteor } from 'meteor/meteor';
import { Random } from 'meteor/random';
import { ReactiveVar } from 'meteor/reactive-var';

@ -1,5 +1,3 @@
/* globals Package: false */
Package.describe({
name: 'rocketchat:e2e',
version: '0.0.1',
@ -13,10 +11,11 @@ Package.onUse(function(api) {
'less',
'mizzao:timesync',
'rocketchat:lib',
'rocketchat:utils',
'templating',
'sha',
]);
api.addFiles('client/stylesheets/e2e.less', 'client');
api.mainModule('client/rocketchat.e2e.js', 'client');
api.mainModule('server/index.js', 'server');
});

@ -2,7 +2,7 @@ import { Meteor } from 'meteor/meteor';
import { Template } from 'meteor/templating';
import { TAPi18n } from 'meteor/tap:i18n';
import { handleError } from 'meteor/rocketchat:lib';
import { t } from 'meteor/rocketchat:ui';
import { t } from 'meteor/rocketchat:utils';
import toastr from 'toastr';
import s from 'underscore.string';

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save