diff --git a/packages/rocketchat-livechat/app/package-lock.json b/packages/rocketchat-livechat/app/package-lock.json index ba47b08e4890..271d169de205 100644 --- a/packages/rocketchat-livechat/app/package-lock.json +++ b/packages/rocketchat-livechat/app/package-lock.json @@ -86,7 +86,7 @@ "bcrypt": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-1.0.3.tgz", - "integrity": "sha512-pRyDdo73C8Nim3jwFJ7DWe3TZCgwDfWZ6nHS5LSdU77kWbj1frruvdndP02AOavtD4y8v6Fp2dolbHgp4SDrfg==", + "integrity": "sha1-sC3cbAtS6ha40883XVoy54DatUg=", "requires": { "nan": "2.6.2", "node-pre-gyp": "0.6.36" @@ -314,7 +314,7 @@ "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=", "requires": { "fs.realpath": "1.0.0", "inflight": "1.0.6", @@ -469,7 +469,7 @@ "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", "requires": { "brace-expansion": "1.1.8" } @@ -530,7 +530,7 @@ "npmlog": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "integrity": "sha1-CKfyqL9zRgR3mp76StXMcXq7lUs=", "requires": { "are-we-there-yet": "1.1.4", "console-control-strings": "1.1.0", @@ -626,7 +626,7 @@ "readable-stream": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "integrity": "sha1-No8lEtefnUb9/HE0mueHi7weuVw=", "requires": { "core-util-is": "1.0.2", "inherits": "2.0.3", @@ -640,7 +640,7 @@ "regenerator-runtime": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz", - "integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A==" + "integrity": "sha1-flT+W1zNXWYk6mJVw0c74JC4AuE=" }, "request": { "version": "2.83.0", @@ -682,12 +682,12 @@ "safe-buffer": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + "integrity": "sha1-iTMSr2myEj3vcfV4iQAWce6yyFM=" }, "semver": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" + "integrity": "sha1-4FnAnYVx8FQII3M0M1BdOi8AsY4=" }, "set-blocking": { "version": "2.0.0", @@ -841,7 +841,7 @@ "uuid": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", - "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" + "integrity": "sha1-PdPT55Crwk17DToDT/q6vijrvAQ=" }, "verror": { "version": "1.10.0", @@ -856,7 +856,7 @@ "wide-align": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", - "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", + "integrity": "sha1-Vx4PGwYEY268DfwhsDObvjE0FxA=", "requires": { "string-width": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz" } diff --git a/packages/rocketchat-message-snippet/client/actionButton.js b/packages/rocketchat-message-snippet/client/actionButton.js index 9c588caf5293..2e61fe5ecd00 100644 --- a/packages/rocketchat-message-snippet/client/actionButton.js +++ b/packages/rocketchat-message-snippet/client/actionButton.js @@ -8,6 +8,8 @@ Meteor.startup(function() { 'message', 'message-mobile' ], + order: 10, + group: 'menu', action() { const message = this._arguments[1]; @@ -48,7 +50,7 @@ Meteor.startup(function() { return false; } - RocketChat.authz.hasAtLeastOnePermission('snippet-message', message.rid); + return RocketChat.authz.hasAtLeastOnePermission('snippet-message', message.rid); } }); }); diff --git a/packages/rocketchat-message-snippet/client/tabBar/views/snippetMessage.html b/packages/rocketchat-message-snippet/client/tabBar/views/snippetMessage.html deleted file mode 100644 index 5afbeb99bde4..000000000000 --- a/packages/rocketchat-message-snippet/client/tabBar/views/snippetMessage.html +++ /dev/null @@ -1,63 +0,0 @@ - - diff --git a/packages/rocketchat-message-snippet/client/tabBar/views/snippetMessage.js b/packages/rocketchat-message-snippet/client/tabBar/views/snippetMessage.js deleted file mode 100644 index d7fe82702d7b..000000000000 --- a/packages/rocketchat-message-snippet/client/tabBar/views/snippetMessage.js +++ /dev/null @@ -1,20 +0,0 @@ -import s from 'underscore.string'; - -import moment from 'moment'; - -Template.snippetMessage.helpers({ - time() { - return moment(this.ts).format(RocketChat.settings.get('Message_TimeFormat')); - }, - date() { - return moment(this.ts).format(RocketChat.settings.get('Message_DateFormat')); - }, - own() { - if (this.u !== undefined && this.u && this.u._id === Meteor.userId()) { - return 'own'; - } - }, - body() { - return `${ s.escapeHTML(this.snippetName) }`; - } -}); diff --git a/packages/rocketchat-message-snippet/client/tabBar/views/snippetedMessages.html b/packages/rocketchat-message-snippet/client/tabBar/views/snippetedMessages.html index 984c0b5ab8b4..fe36358e7012 100644 --- a/packages/rocketchat-message-snippet/client/tabBar/views/snippetedMessages.html +++ b/packages/rocketchat-message-snippet/client/tabBar/views/snippetedMessages.html @@ -1,5 +1,5 @@ diff --git a/packages/rocketchat-message-snippet/package.js b/packages/rocketchat-message-snippet/package.js index b8b928ca95ea..71f65b2c94e0 100644 --- a/packages/rocketchat-message-snippet/package.js +++ b/packages/rocketchat-message-snippet/package.js @@ -45,9 +45,7 @@ Package.onUse(function(api) { 'client/page/snippetPage.js', 'client/tabBar/tabBar.js', 'client/tabBar/views/snippetedMessages.html', - 'client/tabBar/views/snippetMessage.html', 'client/tabBar/views/snippetedMessages.js', - 'client/tabBar/views/snippetMessage.js', 'client/page/stylesheets/snippetPage.css' ], 'client');