diff --git a/.docker/Dockerfile.rhel b/.docker/Dockerfile.rhel index 05a902d361b5..dbc1bd418c3b 100644 --- a/.docker/Dockerfile.rhel +++ b/.docker/Dockerfile.rhel @@ -1,6 +1,6 @@ FROM registry.access.redhat.com/ubi8/nodejs-12 -ENV RC_VERSION 3.11.0 +ENV RC_VERSION 3.11.1 MAINTAINER buildmaster@rocket.chat diff --git a/.github/history.json b/.github/history.json index ef3d598155de..aa889cac9931 100644 --- a/.github/history.json +++ b/.github/history.json @@ -55243,6 +55243,71 @@ "4.0" ], "pull_requests": [] + }, + "3.11.1": { + "node_version": "12.18.4", + "npm_version": "6.14.8", + "apps_engine_version": "1.22.2", + "mongo_versions": [ + "3.4", + "3.6", + "4.0" + ], + "pull_requests": [ + { + "pr": "20653", + "title": "[FIX] Livechat bridge permission checkers", + "userLogin": "d-gubert", + "description": "Update to latest patch version of the Apps-Engine with a fix for the Livechat bridge, as seen in https://github.com/RocketChat/Rocket.Chat.Apps-engine/pull/379", + "milestone": "3.11.1", + "contributors": [ + "d-gubert", + "lolimay", + "web-flow" + ] + }, + { + "pr": "20662", + "title": "[FIX] Omnichannel Routing System not assigning chats to Bot agents", + "userLogin": "renatobecker", + "description": "The `Omnichannel Routing System` is no longer assigning chats to `bot` agents when the `bot` agent is the default agent of the inquiry.", + "milestone": "3.11.1", + "contributors": [ + "renatobecker", + "web-flow" + ] + }, + { + "pr": "20585", + "title": "[FIX] Attachment download from title fixed", + "userLogin": "yash-rajpal", + "description": "Added target = '_self' to attachment link, this seems to fix the problem, without this attribute, error page is displayed.", + "milestone": "3.11.1", + "contributors": [ + "yash-rajpal", + "tiagoevanp", + "web-flow" + ] + }, + { + "pr": "20654", + "title": "[FIX] Gif images aspect ratio on preview", + "userLogin": "tiagoevanp", + "milestone": "3.11.1", + "contributors": [ + "tiagoevanp" + ] + }, + { + "pr": "20611", + "title": "[FIX] Update NPS banner when changing score", + "userLogin": "sampaiodiego", + "milestone": "3.11.1", + "contributors": [ + "sampaiodiego" + ] + } + ] } } } \ No newline at end of file diff --git a/.snapcraft/resources/prepareRocketChat b/.snapcraft/resources/prepareRocketChat index 6976db323141..8388f031d5c5 100755 --- a/.snapcraft/resources/prepareRocketChat +++ b/.snapcraft/resources/prepareRocketChat @@ -1,6 +1,6 @@ #!/bin/bash -curl -SLf "https://releases.rocket.chat/3.11.0/download/" -o rocket.chat.tgz +curl -SLf "https://releases.rocket.chat/3.11.1/download/" -o rocket.chat.tgz tar xf rocket.chat.tgz --strip 1 diff --git a/.snapcraft/snap/snapcraft.yaml b/.snapcraft/snap/snapcraft.yaml index d5421e734e9d..19e9d98c5f81 100644 --- a/.snapcraft/snap/snapcraft.yaml +++ b/.snapcraft/snap/snapcraft.yaml @@ -7,7 +7,7 @@ # 5. `snapcraft snap` name: rocketchat-server -version: 3.11.0 +version: 3.11.1 summary: Rocket.Chat server description: Have your own Slack like online chat, built with Meteor. https://rocket.chat/ confinement: strict diff --git a/HISTORY.md b/HISTORY.md index fde576deab13..ae6f7fccf532 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,4 +1,44 @@ +# 3.11.1 +`2021-02-10 ยท 5 ๐Ÿ› ยท 6 ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป` + +### Engine versions +- Node: `12.18.4` +- NPM: `6.14.8` +- MongoDB: `3.4, 3.6, 4.0` +- Apps-Engine: `1.22.2` + +### ๐Ÿ› Bug fixes + + +- Attachment download from title fixed ([#20585](https://github.com/RocketChat/Rocket.Chat/pull/20585) by [@yash-rajpal](https://github.com/yash-rajpal)) + + Added target = '_self' to attachment link, this seems to fix the problem, without this attribute, error page is displayed. + +- Gif images aspect ratio on preview ([#20654](https://github.com/RocketChat/Rocket.Chat/pull/20654)) + +- Livechat bridge permission checkers ([#20653](https://github.com/RocketChat/Rocket.Chat/pull/20653)) + + Update to latest patch version of the Apps-Engine with a fix for the Livechat bridge, as seen in https://github.com/RocketChat/Rocket.Chat.Apps-engine/pull/379 + +- Omnichannel Routing System not assigning chats to Bot agents ([#20662](https://github.com/RocketChat/Rocket.Chat/pull/20662)) + + The `Omnichannel Routing System` is no longer assigning chats to `bot` agents when the `bot` agent is the default agent of the inquiry. + +- Update NPS banner when changing score ([#20611](https://github.com/RocketChat/Rocket.Chat/pull/20611)) + +### ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป Contributors ๐Ÿ˜ + +- [@yash-rajpal](https://github.com/yash-rajpal) + +### ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป Core Team ๐Ÿค“ + +- [@d-gubert](https://github.com/d-gubert) +- [@lolimay](https://github.com/lolimay) +- [@renatobecker](https://github.com/renatobecker) +- [@sampaiodiego](https://github.com/sampaiodiego) +- [@tiagoevanp](https://github.com/tiagoevanp) + # 3.11.0 `2021-01-31 ยท 8 ๐ŸŽ‰ ยท 9 ๐Ÿš€ ยท 52 ๐Ÿ› ยท 44 ๐Ÿ” ยท 32 ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป` diff --git a/app/file-upload/server/lib/FileUpload.js b/app/file-upload/server/lib/FileUpload.js index b6e2d36bd770..b109b9b0836f 100644 --- a/app/file-upload/server/lib/FileUpload.js +++ b/app/file-upload/server/lib/FileUpload.js @@ -266,7 +266,7 @@ export const FileUpload = { }, uploadsOnValidate(file) { - if (!/^image\/((x-windows-)?bmp|p?jpeg|png)$/.test(file.type)) { + if (!/^image\/((x-windows-)?bmp|p?jpeg|png|gif)$/.test(file.type)) { return; } diff --git a/app/livechat/server/lib/RoutingManager.js b/app/livechat/server/lib/RoutingManager.js index 566741ed1b77..49aec01b625a 100644 --- a/app/livechat/server/lib/RoutingManager.js +++ b/app/livechat/server/lib/RoutingManager.js @@ -10,6 +10,7 @@ import { forwardRoomToDepartment, removeAgentFromSubscription, updateChatDepartment, + allowAgentSkipQueue, } from './Helper'; import { callbacks } from '../../../callbacks/server'; import { LivechatRooms, Rooms, Messages, Users, LivechatInquiry } from '../../../models/server'; @@ -44,7 +45,7 @@ export const RoutingManager = { async delegateInquiry(inquiry, agent) { const { department, rid } = inquiry; - if (!agent || (agent.username && !Users.findOneOnlineAgentByUsername(agent.username))) { + if (!agent || (agent.username && !Users.findOneOnlineAgentByUsername(agent.username) && !allowAgentSkipQueue(agent))) { agent = await this.getNextAgent(department); } diff --git a/app/utils/rocketchat.info b/app/utils/rocketchat.info index 1b25bff6df6c..510b977ecfb6 100644 --- a/app/utils/rocketchat.info +++ b/app/utils/rocketchat.info @@ -1,3 +1,3 @@ { - "version": "3.11.0" + "version": "3.11.1" } diff --git a/client/components/Message/Attachments/Files/GenericFileAttachment.tsx b/client/components/Message/Attachments/Files/GenericFileAttachment.tsx index e93b56a27866..2dc7889f3d3d 100644 --- a/client/components/Message/Attachments/Files/GenericFileAttachment.tsx +++ b/client/components/Message/Attachments/Files/GenericFileAttachment.tsx @@ -24,7 +24,7 @@ export const GenericFileAttachment: FC = ({ { description && } - {title} + {title} {size && } {/* {collapse} */} {hasDownload && link && } diff --git a/client/components/Message/Attachments/components/Image.tsx b/client/components/Message/Attachments/components/Image.tsx index b236ae332e4f..c5898bbb389d 100644 --- a/client/components/Message/Attachments/components/Image.tsx +++ b/client/components/Message/Attachments/components/Image.tsx @@ -60,10 +60,10 @@ const getDimensions = (width: Dimensions['width'], height: Dimensions['height'], const ratio = height / width; if (height >= width || Math.min(width, limits.width) * ratio > limits.height) { - return { width: width * Math.min(height, limits.height) / height, height: Math.min(height, limits.height) }; + return { width: width * Math.min(height, limits.height) / height, height: 'auto' }; } - return { width: Math.min(width, limits.width), height: height * Math.min(width, limits.width) / width }; + return { width: Math.min(width, limits.width), height: 'auto' }; }; const Image: FC = ({ previewUrl, loadImage = true, setLoadImage, src, ...size }) => { diff --git a/package-lock.json b/package-lock.json index 1ad4c5294229..5460deb76d50 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "Rocket.Chat", - "version": "3.11.0", + "version": "3.11.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -6000,9 +6000,9 @@ } }, "@rocket.chat/apps-engine": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/@rocket.chat/apps-engine/-/apps-engine-1.22.1.tgz", - "integrity": "sha512-i1F0fvPegTmYrDdDY/XgW6SC6ez69QjkbN13rGVpzOmTXeAJAXovdMDMCTD4UaV3WNo+9ghMfsIlRbMIHeM6/g==", + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/@rocket.chat/apps-engine/-/apps-engine-1.22.2.tgz", + "integrity": "sha512-wmFy/YOF5nZRxgMvTPE4zAAGidIrePndEPFuslZc+ocsZeO3zDl6i8MT0WN0vVLM6htEOe4/O4XS2H28XCAwnw==", "requires": { "adm-zip": "^0.4.9", "cryptiles": "^4.1.3", @@ -20273,7 +20273,7 @@ }, "chownr": { "version": "1.1.1", - "resolved": false, + "resolved": "", "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", "dev": true, "optional": true @@ -20308,7 +20308,7 @@ }, "debug": { "version": "4.1.1", - "resolved": false, + "resolved": "", "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "optional": true, @@ -20339,7 +20339,7 @@ }, "fs-minipass": { "version": "1.2.5", - "resolved": false, + "resolved": "", "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", "dev": true, "optional": true, @@ -20373,7 +20373,7 @@ }, "glob": { "version": "7.1.3", - "resolved": false, + "resolved": "", "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", "dev": true, "optional": true, @@ -20405,7 +20405,7 @@ }, "ignore-walk": { "version": "3.0.1", - "resolved": false, + "resolved": "", "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", "dev": true, "optional": true, @@ -20426,7 +20426,7 @@ }, "inherits": { "version": "2.0.3", - "resolved": false, + "resolved": "", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true, "optional": true @@ -20474,7 +20474,7 @@ }, "minipass": { "version": "2.3.5", - "resolved": false, + "resolved": "", "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", "dev": true, "optional": true, @@ -20485,7 +20485,7 @@ }, "minizlib": { "version": "1.2.1", - "resolved": false, + "resolved": "", "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", "dev": true, "optional": true, @@ -20505,7 +20505,7 @@ }, "ms": { "version": "2.1.1", - "resolved": false, + "resolved": "", "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "dev": true, "optional": true @@ -20519,7 +20519,7 @@ }, "needle": { "version": "2.3.0", - "resolved": false, + "resolved": "", "integrity": "sha512-QBZu7aAFR0522EyaXZM0FZ9GLpq6lvQ3uq8gteiDUp7wKdy0lSd2hPlgFwVuW1CBkfEs9PfDQsQzZghLs/psdg==", "dev": true, "optional": true, @@ -20531,7 +20531,7 @@ }, "node-pre-gyp": { "version": "0.12.0", - "resolved": false, + "resolved": "", "integrity": "sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A==", "dev": true, "optional": true, @@ -20561,14 +20561,14 @@ }, "npm-bundled": { "version": "1.0.6", - "resolved": false, + "resolved": "", "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==", "dev": true, "optional": true }, "npm-packlist": { "version": "1.4.1", - "resolved": false, + "resolved": "", "integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==", "dev": true, "optional": true, @@ -20648,7 +20648,7 @@ }, "process-nextick-args": { "version": "2.0.0", - "resolved": false, + "resolved": "", "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "dev": true, "optional": true @@ -20693,7 +20693,7 @@ }, "rimraf": { "version": "2.6.3", - "resolved": false, + "resolved": "", "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "dev": true, "optional": true, @@ -20724,7 +20724,7 @@ }, "semver": { "version": "5.7.0", - "resolved": false, + "resolved": "", "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", "dev": true, "optional": true @@ -20784,7 +20784,7 @@ }, "tar": { "version": "4.4.8", - "resolved": false, + "resolved": "", "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", "dev": true, "optional": true, @@ -20824,7 +20824,7 @@ }, "yallist": { "version": "3.0.3", - "resolved": false, + "resolved": "", "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", "dev": true, "optional": true diff --git a/package.json b/package.json index 5628602d29eb..65532b6346a2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "Rocket.Chat", "description": "The Ultimate Open Source WebChat Platform", - "version": "3.11.0", + "version": "3.11.1", "author": { "name": "Rocket.Chat", "url": "https://rocket.chat/" @@ -135,7 +135,7 @@ "@nivo/heatmap": "^0.61.0", "@nivo/line": "^0.61.1", "@nivo/pie": "^0.61.1", - "@rocket.chat/apps-engine": "1.22.1", + "@rocket.chat/apps-engine": "1.22.2", "@rocket.chat/css-in-js": "^0.21.0", "@rocket.chat/emitter": "^0.21.0", "@rocket.chat/fuselage": "^0.21.0", diff --git a/server/modules/core-apps/nps.module.ts b/server/modules/core-apps/nps.module.ts index 5e5b9d311228..42107c20bfca 100644 --- a/server/modules/core-apps/nps.module.ts +++ b/server/modules/core-apps/nps.module.ts @@ -8,8 +8,9 @@ export class Nps implements IUiKitCoreApp { async blockAction(payload: any): Promise { const { triggerId, + actionId, container: { - id: bannerId, + id: viewId, }, payload: { value: score, @@ -18,10 +19,13 @@ export class Nps implements IUiKitCoreApp { user, } = payload; + const bannerId = viewId.replace(`${ npsId }-`, ''); + return createModal({ + type: actionId === 'nps-score' ? 'modal.update' : 'modal.open', + id: `${ npsId }-${ bannerId }`, appId: this.appId, npsId, - bannerId, triggerId, score, user, @@ -37,7 +41,7 @@ export class Nps implements IUiKitCoreApp { payload: { view: { state, - id: bannerId, + id: viewId, }, }, user: { @@ -48,9 +52,11 @@ export class Nps implements IUiKitCoreApp { const [npsId] = Object.keys(state); + const bannerId = viewId.replace(`${ npsId }-`, ''); + const { [npsId]: { - score, + 'nps-score': score, comment, }, } = state; diff --git a/server/modules/core-apps/nps/createModal.ts b/server/modules/core-apps/nps/createModal.ts index 8dd95a3b1ce0..a530d34c522f 100644 --- a/server/modules/core-apps/nps/createModal.ts +++ b/server/modules/core-apps/nps/createModal.ts @@ -5,25 +5,26 @@ import { settings } from '../../../../app/settings/server'; import { IUser } from '../../../../definition/IUser'; export type ModalParams = { + id: string; + type: string; appId: string; npsId: string; - bannerId: string; triggerId: string; score: string; user: IUser; } -export const createModal = Meteor.bindEnvironment(({ appId, npsId, bannerId, triggerId, score, user }: ModalParams): any => { +export const createModal = Meteor.bindEnvironment(({ type = 'modal.open', id, appId, npsId, triggerId, score, user }: ModalParams): any => { const language = user.language || settings.get('Language') || 'en'; return { - type: 'modal.open', + type, triggerId, appId, view: { appId, type: 'modal', - id: bannerId, + id, title: { type: 'plain_text', text: TAPi18n.__('We_appreciate_your_feedback', { lng: language }), @@ -49,14 +50,14 @@ export const createModal = Meteor.bindEnvironment(({ appId, npsId, bannerId, tri }, blocks: [{ blockId: npsId, - type: 'input', - element: { + type: 'actions', + elements: [{ type: 'linear_scale', initialValue: score, - actionId: 'score', + actionId: 'nps-score', preLabel: { type: 'plain_text', text: TAPi18n.__('Not_likely', { lng: language }) }, postLabel: { type: 'plain_text', text: TAPi18n.__('Extremely_likely', { lng: language }) }, - }, + }], label: { type: 'plain_text', text: TAPi18n.__('Score', { lng: language }), diff --git a/server/services/nps/service.ts b/server/services/nps/service.ts index 56fbc9a9e7dc..fc17fec31156 100644 --- a/server/services/nps/service.ts +++ b/server/services/nps/service.ts @@ -110,6 +110,7 @@ export class NPSService extends ServiceClass implements INPSService { }, }, { projection: { + _id: 0, identifier: 1, roles: 1, score: 1,