From 5b4ed317a11c9fdbbd921abdb8737862e7b466a5 Mon Sep 17 00:00:00 2001 From: rocketchat-github-ci Date: Thu, 28 Nov 2024 23:16:15 +0000 Subject: [PATCH 01/28] Release 7.1.0-rc.2 [no ci] --- .changeset/bump-patch-1732835767114.md | 5 +++ .changeset/pre.json | 1 + apps/meteor/CHANGELOG.md | 35 +++++++++++++++++++ apps/meteor/app/utils/rocketchat.info | 2 +- apps/meteor/ee/server/services/CHANGELOG.md | 14 ++++++++ apps/meteor/ee/server/services/package.json | 2 +- apps/meteor/package.json | 2 +- apps/uikit-playground/CHANGELOG.md | 12 +++++++ apps/uikit-playground/package.json | 2 +- ee/apps/account-service/CHANGELOG.md | 14 ++++++++ ee/apps/account-service/package.json | 2 +- ee/apps/authorization-service/CHANGELOG.md | 14 ++++++++ ee/apps/authorization-service/package.json | 2 +- ee/apps/ddp-streamer/CHANGELOG.md | 15 ++++++++ ee/apps/ddp-streamer/package.json | 2 +- ee/apps/omnichannel-transcript/CHANGELOG.md | 15 ++++++++ ee/apps/omnichannel-transcript/package.json | 2 +- ee/apps/presence-service/CHANGELOG.md | 14 ++++++++ ee/apps/presence-service/package.json | 2 +- ee/apps/queue-worker/CHANGELOG.md | 14 ++++++++ ee/apps/queue-worker/package.json | 2 +- ee/apps/stream-hub-service/CHANGELOG.md | 13 +++++++ ee/apps/stream-hub-service/package.json | 2 +- ee/packages/license/CHANGELOG.md | 9 +++++ ee/packages/license/package.json | 2 +- ee/packages/network-broker/CHANGELOG.md | 9 +++++ ee/packages/network-broker/package.json | 2 +- ee/packages/omnichannel-services/CHANGELOG.md | 14 ++++++++ ee/packages/omnichannel-services/package.json | 2 +- ee/packages/pdf-worker/CHANGELOG.md | 9 +++++ ee/packages/pdf-worker/package.json | 2 +- ee/packages/presence/CHANGELOG.md | 11 ++++++ ee/packages/presence/package.json | 2 +- package.json | 2 +- packages/api-client/CHANGELOG.md | 10 ++++++ packages/api-client/package.json | 2 +- packages/apps/CHANGELOG.md | 10 ++++++ packages/apps/package.json | 2 +- packages/core-services/CHANGELOG.md | 11 ++++++ packages/core-services/package.json | 2 +- packages/core-typings/CHANGELOG.md | 2 ++ packages/core-typings/package.json | 2 +- packages/cron/CHANGELOG.md | 10 ++++++ packages/cron/package.json | 2 +- packages/ddp-client/CHANGELOG.md | 11 ++++++ packages/ddp-client/package.json | 2 +- packages/freeswitch/CHANGELOG.md | 9 +++++ packages/freeswitch/package.json | 2 +- packages/fuselage-ui-kit/CHANGELOG.md | 13 +++++++ packages/fuselage-ui-kit/package.json | 8 ++--- packages/gazzodown/CHANGELOG.md | 11 ++++++ packages/gazzodown/package.json | 6 ++-- packages/instance-status/CHANGELOG.md | 9 +++++ packages/instance-status/package.json | 2 +- packages/livechat/CHANGELOG.md | 9 +++++ packages/livechat/package.json | 2 +- packages/model-typings/CHANGELOG.md | 9 +++++ packages/model-typings/package.json | 2 +- packages/models/CHANGELOG.md | 9 +++++ packages/models/package.json | 2 +- packages/rest-typings/CHANGELOG.md | 9 +++++ packages/rest-typings/package.json | 2 +- packages/ui-avatar/CHANGELOG.md | 9 +++++ packages/ui-avatar/package.json | 4 +-- packages/ui-client/CHANGELOG.md | 10 ++++++ packages/ui-client/package.json | 6 ++-- packages/ui-contexts/CHANGELOG.md | 11 ++++++ packages/ui-contexts/package.json | 2 +- packages/ui-video-conf/CHANGELOG.md | 10 ++++++ packages/ui-video-conf/package.json | 6 ++-- packages/ui-voip/CHANGELOG.md | 11 ++++++ packages/ui-voip/package.json | 8 ++--- packages/web-ui-registration/CHANGELOG.md | 9 +++++ packages/web-ui-registration/package.json | 4 +-- yarn.lock | 28 +++++++-------- 75 files changed, 475 insertions(+), 65 deletions(-) create mode 100644 .changeset/bump-patch-1732835767114.md diff --git a/.changeset/bump-patch-1732835767114.md b/.changeset/bump-patch-1732835767114.md new file mode 100644 index 000000000000..e1eaa7980afb --- /dev/null +++ b/.changeset/bump-patch-1732835767114.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Bump @rocket.chat/meteor version. diff --git a/.changeset/pre.json b/.changeset/pre.json index e552e7242eed..d7869bfbeb45 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -69,6 +69,7 @@ }, "changesets": [ "bump-patch-1732728542480", + "bump-patch-1732835767114", "clean-flies-collect", "curvy-flies-greet", "fair-colts-remain", diff --git a/apps/meteor/CHANGELOG.md b/apps/meteor/CHANGELOG.md index c4e935205c2b..7f9586b6481a 100644 --- a/apps/meteor/CHANGELOG.md +++ b/apps/meteor/CHANGELOG.md @@ -1,5 +1,40 @@ # @rocket.chat/meteor +## 7.1.0-rc.2 + +### Patch Changes + +- Bump @rocket.chat/meteor version. + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.2 + - @rocket.chat/rest-typings@7.1.0-rc.2 + - @rocket.chat/license@1.0.1-rc.2 + - @rocket.chat/omnichannel-services@0.3.7-rc.2 + - @rocket.chat/pdf-worker@0.2.7-rc.2 + - @rocket.chat/presence@0.2.10-rc.2 + - @rocket.chat/api-client@0.2.10-rc.2 + - @rocket.chat/apps@0.2.1-rc.2 + - @rocket.chat/core-services@0.7.2-rc.2 + - @rocket.chat/cron@0.1.10-rc.2 + - @rocket.chat/freeswitch@1.0.1-rc.2 + - @rocket.chat/fuselage-ui-kit@13.0.0-rc.2 + - @rocket.chat/gazzodown@13.0.0-rc.2 + - @rocket.chat/model-typings@1.1.0-rc.2 + - @rocket.chat/ui-contexts@13.0.0-rc.2 + - @rocket.chat/server-cloud-communication@0.0.2 + - @rocket.chat/network-broker@0.1.2-rc.2 + - @rocket.chat/models@1.0.1-rc.2 + - @rocket.chat/ui-theming@0.4.0 + - @rocket.chat/ui-avatar@9.0.0-rc.2 + - @rocket.chat/ui-client@13.0.0-rc.2 + - @rocket.chat/ui-video-conf@13.0.0-rc.2 + - @rocket.chat/ui-voip@3.0.0-rc.2 + - @rocket.chat/web-ui-registration@13.0.0-rc.2 + - @rocket.chat/instance-status@0.1.10-rc.2 +
+ ## 7.1.0-rc.1 ### Patch Changes diff --git a/apps/meteor/app/utils/rocketchat.info b/apps/meteor/app/utils/rocketchat.info index 3e869253e561..2a0f87378bed 100644 --- a/apps/meteor/app/utils/rocketchat.info +++ b/apps/meteor/app/utils/rocketchat.info @@ -1,3 +1,3 @@ { - "version": "7.1.0-rc.1" + "version": "7.1.0-rc.2" } diff --git a/apps/meteor/ee/server/services/CHANGELOG.md b/apps/meteor/ee/server/services/CHANGELOG.md index 6a0d6bc8afd2..010abe1e310c 100644 --- a/apps/meteor/ee/server/services/CHANGELOG.md +++ b/apps/meteor/ee/server/services/CHANGELOG.md @@ -1,5 +1,19 @@ # rocketchat-services +## 2.0.1-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.2 + - @rocket.chat/rest-typings@7.1.0-rc.2 + - @rocket.chat/core-services@0.7.2-rc.2 + - @rocket.chat/model-typings@1.1.0-rc.2 + - @rocket.chat/network-broker@0.1.2-rc.2 + - @rocket.chat/models@1.0.1-rc.2 +
+ ## 2.0.1-rc.1 ### Patch Changes diff --git a/apps/meteor/ee/server/services/package.json b/apps/meteor/ee/server/services/package.json index 94faff82c9f3..8991e69572fb 100644 --- a/apps/meteor/ee/server/services/package.json +++ b/apps/meteor/ee/server/services/package.json @@ -1,7 +1,7 @@ { "name": "rocketchat-services", "private": true, - "version": "2.0.1-rc.1", + "version": "2.0.1-rc.2", "description": "Rocket.Chat Authorization service", "main": "index.js", "scripts": { diff --git a/apps/meteor/package.json b/apps/meteor/package.json index 5ba16757c7c9..b4c4e2815698 100644 --- a/apps/meteor/package.json +++ b/apps/meteor/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/meteor", "description": "The Ultimate Open Source WebChat Platform", - "version": "7.1.0-rc.1", + "version": "7.1.0-rc.2", "private": true, "author": { "name": "Rocket.Chat", diff --git a/apps/uikit-playground/CHANGELOG.md b/apps/uikit-playground/CHANGELOG.md index 889b0060bb79..08cabaf2f77f 100644 --- a/apps/uikit-playground/CHANGELOG.md +++ b/apps/uikit-playground/CHANGELOG.md @@ -1,5 +1,17 @@ # @rocket.chat/uikit-playground +## 0.6.1-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.2 + - @rocket.chat/fuselage-ui-kit@13.0.0-rc.2 + - @rocket.chat/ui-contexts@13.0.0-rc.2 + - @rocket.chat/ui-avatar@9.0.0-rc.2 +
+ ## 0.6.1-rc.1 ### Patch Changes diff --git a/apps/uikit-playground/package.json b/apps/uikit-playground/package.json index 92ef5fb60951..9b7fcbe37aac 100644 --- a/apps/uikit-playground/package.json +++ b/apps/uikit-playground/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/uikit-playground", "private": true, - "version": "0.6.1-rc.1", + "version": "0.6.1-rc.2", "type": "module", "scripts": { "dev": "vite", diff --git a/ee/apps/account-service/CHANGELOG.md b/ee/apps/account-service/CHANGELOG.md index 06bfc2b86e72..97342674e958 100644 --- a/ee/apps/account-service/CHANGELOG.md +++ b/ee/apps/account-service/CHANGELOG.md @@ -1,5 +1,19 @@ # @rocket.chat/account-service +## 0.4.10-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.2 + - @rocket.chat/rest-typings@7.1.0-rc.2 + - @rocket.chat/core-services@0.7.2-rc.2 + - @rocket.chat/model-typings@1.1.0-rc.2 + - @rocket.chat/network-broker@0.1.2-rc.2 + - @rocket.chat/models@1.0.1-rc.2 +
+ ## 0.4.10-rc.1 ### Patch Changes diff --git a/ee/apps/account-service/package.json b/ee/apps/account-service/package.json index 84bde3bf97c9..892f8b0c38e3 100644 --- a/ee/apps/account-service/package.json +++ b/ee/apps/account-service/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/account-service", "private": true, - "version": "0.4.10-rc.1", + "version": "0.4.10-rc.2", "description": "Rocket.Chat Account service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/authorization-service/CHANGELOG.md b/ee/apps/authorization-service/CHANGELOG.md index 4c07109801f5..1ed5ac1d7d1f 100644 --- a/ee/apps/authorization-service/CHANGELOG.md +++ b/ee/apps/authorization-service/CHANGELOG.md @@ -1,5 +1,19 @@ # @rocket.chat/authorization-service +## 0.4.10-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.2 + - @rocket.chat/rest-typings@7.1.0-rc.2 + - @rocket.chat/core-services@0.7.2-rc.2 + - @rocket.chat/model-typings@1.1.0-rc.2 + - @rocket.chat/network-broker@0.1.2-rc.2 + - @rocket.chat/models@1.0.1-rc.2 +
+ ## 0.4.10-rc.1 ### Patch Changes diff --git a/ee/apps/authorization-service/package.json b/ee/apps/authorization-service/package.json index b5c99e07d92c..b5a17d949dd3 100644 --- a/ee/apps/authorization-service/package.json +++ b/ee/apps/authorization-service/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/authorization-service", "private": true, - "version": "0.4.10-rc.1", + "version": "0.4.10-rc.2", "description": "Rocket.Chat Authorization service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/ddp-streamer/CHANGELOG.md b/ee/apps/ddp-streamer/CHANGELOG.md index 4972f83e54a5..c6833bf4d563 100644 --- a/ee/apps/ddp-streamer/CHANGELOG.md +++ b/ee/apps/ddp-streamer/CHANGELOG.md @@ -1,5 +1,20 @@ # @rocket.chat/ddp-streamer +## 0.3.10-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.2 + - @rocket.chat/rest-typings@7.1.0-rc.2 + - @rocket.chat/core-services@0.7.2-rc.2 + - @rocket.chat/model-typings@1.1.0-rc.2 + - @rocket.chat/network-broker@0.1.2-rc.2 + - @rocket.chat/models@1.0.1-rc.2 + - @rocket.chat/instance-status@0.1.10-rc.2 +
+ ## 0.3.10-rc.1 ### Patch Changes diff --git a/ee/apps/ddp-streamer/package.json b/ee/apps/ddp-streamer/package.json index c653a8a6d128..4060379936ce 100644 --- a/ee/apps/ddp-streamer/package.json +++ b/ee/apps/ddp-streamer/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/ddp-streamer", "private": true, - "version": "0.3.10-rc.1", + "version": "0.3.10-rc.2", "description": "Rocket.Chat DDP-Streamer service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/omnichannel-transcript/CHANGELOG.md b/ee/apps/omnichannel-transcript/CHANGELOG.md index 5e8d2e7c990e..fb2d06206bc0 100644 --- a/ee/apps/omnichannel-transcript/CHANGELOG.md +++ b/ee/apps/omnichannel-transcript/CHANGELOG.md @@ -1,5 +1,20 @@ # @rocket.chat/omnichannel-transcript +## 0.4.10-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.2 + - @rocket.chat/omnichannel-services@0.3.7-rc.2 + - @rocket.chat/pdf-worker@0.2.7-rc.2 + - @rocket.chat/core-services@0.7.2-rc.2 + - @rocket.chat/model-typings@1.1.0-rc.2 + - @rocket.chat/network-broker@0.1.2-rc.2 + - @rocket.chat/models@1.0.1-rc.2 +
+ ## 0.4.10-rc.1 ### Patch Changes diff --git a/ee/apps/omnichannel-transcript/package.json b/ee/apps/omnichannel-transcript/package.json index b8487c746036..71bd35f06f60 100644 --- a/ee/apps/omnichannel-transcript/package.json +++ b/ee/apps/omnichannel-transcript/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/omnichannel-transcript", "private": true, - "version": "0.4.10-rc.1", + "version": "0.4.10-rc.2", "description": "Rocket.Chat service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/presence-service/CHANGELOG.md b/ee/apps/presence-service/CHANGELOG.md index 6f1d3f2ba644..44c845d72c7d 100644 --- a/ee/apps/presence-service/CHANGELOG.md +++ b/ee/apps/presence-service/CHANGELOG.md @@ -1,5 +1,19 @@ # @rocket.chat/presence-service +## 0.4.10-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.2 + - @rocket.chat/presence@0.2.10-rc.2 + - @rocket.chat/core-services@0.7.2-rc.2 + - @rocket.chat/model-typings@1.1.0-rc.2 + - @rocket.chat/network-broker@0.1.2-rc.2 + - @rocket.chat/models@1.0.1-rc.2 +
+ ## 0.4.10-rc.1 ### Patch Changes diff --git a/ee/apps/presence-service/package.json b/ee/apps/presence-service/package.json index 40b363ee7ae0..95d23ec3ed0f 100644 --- a/ee/apps/presence-service/package.json +++ b/ee/apps/presence-service/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/presence-service", "private": true, - "version": "0.4.10-rc.1", + "version": "0.4.10-rc.2", "description": "Rocket.Chat Presence service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/queue-worker/CHANGELOG.md b/ee/apps/queue-worker/CHANGELOG.md index fdf742e855c0..2a3191e134be 100644 --- a/ee/apps/queue-worker/CHANGELOG.md +++ b/ee/apps/queue-worker/CHANGELOG.md @@ -1,5 +1,19 @@ # @rocket.chat/queue-worker +## 0.4.10-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.2 + - @rocket.chat/omnichannel-services@0.3.7-rc.2 + - @rocket.chat/core-services@0.7.2-rc.2 + - @rocket.chat/model-typings@1.1.0-rc.2 + - @rocket.chat/network-broker@0.1.2-rc.2 + - @rocket.chat/models@1.0.1-rc.2 +
+ ## 0.4.10-rc.1 ### Patch Changes diff --git a/ee/apps/queue-worker/package.json b/ee/apps/queue-worker/package.json index f1d96a402368..b0430de6b21c 100644 --- a/ee/apps/queue-worker/package.json +++ b/ee/apps/queue-worker/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/queue-worker", "private": true, - "version": "0.4.10-rc.1", + "version": "0.4.10-rc.2", "description": "Rocket.Chat service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/stream-hub-service/CHANGELOG.md b/ee/apps/stream-hub-service/CHANGELOG.md index 54b6aea3c8eb..118c56a24f58 100644 --- a/ee/apps/stream-hub-service/CHANGELOG.md +++ b/ee/apps/stream-hub-service/CHANGELOG.md @@ -1,5 +1,18 @@ # @rocket.chat/stream-hub-service +## 0.4.10-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.2 + - @rocket.chat/core-services@0.7.2-rc.2 + - @rocket.chat/model-typings@1.1.0-rc.2 + - @rocket.chat/network-broker@0.1.2-rc.2 + - @rocket.chat/models@1.0.1-rc.2 +
+ ## 0.4.10-rc.1 ### Patch Changes diff --git a/ee/apps/stream-hub-service/package.json b/ee/apps/stream-hub-service/package.json index 45b21350717f..bef31b7c077e 100644 --- a/ee/apps/stream-hub-service/package.json +++ b/ee/apps/stream-hub-service/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/stream-hub-service", "private": true, - "version": "0.4.10-rc.1", + "version": "0.4.10-rc.2", "description": "Rocket.Chat Stream Hub service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/packages/license/CHANGELOG.md b/ee/packages/license/CHANGELOG.md index 4dc7b58ef73c..12c4833f90f9 100644 --- a/ee/packages/license/CHANGELOG.md +++ b/ee/packages/license/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/license +## 1.0.1-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.2 +
+ ## 1.0.1-rc.1 ### Patch Changes diff --git a/ee/packages/license/package.json b/ee/packages/license/package.json index f3667b308f6b..78bc10b1ee73 100644 --- a/ee/packages/license/package.json +++ b/ee/packages/license/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/license", - "version": "1.0.1-rc.1", + "version": "1.0.1-rc.2", "private": true, "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", diff --git a/ee/packages/network-broker/CHANGELOG.md b/ee/packages/network-broker/CHANGELOG.md index 9ab4e7f6e31d..dcf8f7596a8e 100644 --- a/ee/packages/network-broker/CHANGELOG.md +++ b/ee/packages/network-broker/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/network-broker +## 0.1.2-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-services@0.7.2-rc.2 +
+ ## 0.1.2-rc.1 ### Patch Changes diff --git a/ee/packages/network-broker/package.json b/ee/packages/network-broker/package.json index 4b04c3bee474..d9b0b552fa15 100644 --- a/ee/packages/network-broker/package.json +++ b/ee/packages/network-broker/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/network-broker", - "version": "0.1.2-rc.1", + "version": "0.1.2-rc.2", "private": true, "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", diff --git a/ee/packages/omnichannel-services/CHANGELOG.md b/ee/packages/omnichannel-services/CHANGELOG.md index b2c482394fbd..ca2c6e8b215e 100644 --- a/ee/packages/omnichannel-services/CHANGELOG.md +++ b/ee/packages/omnichannel-services/CHANGELOG.md @@ -1,5 +1,19 @@ # @rocket.chat/omnichannel-services +## 0.3.7-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.2 + - @rocket.chat/rest-typings@7.1.0-rc.2 + - @rocket.chat/pdf-worker@0.2.7-rc.2 + - @rocket.chat/core-services@0.7.2-rc.2 + - @rocket.chat/model-typings@1.1.0-rc.2 + - @rocket.chat/models@1.0.1-rc.2 +
+ ## 0.3.7-rc.1 ### Patch Changes diff --git a/ee/packages/omnichannel-services/package.json b/ee/packages/omnichannel-services/package.json index 13487e2e8f61..5932171a9ae4 100644 --- a/ee/packages/omnichannel-services/package.json +++ b/ee/packages/omnichannel-services/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/omnichannel-services", - "version": "0.3.7-rc.1", + "version": "0.3.7-rc.2", "private": true, "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", diff --git a/ee/packages/pdf-worker/CHANGELOG.md b/ee/packages/pdf-worker/CHANGELOG.md index f94999eea02c..cc7aba231514 100644 --- a/ee/packages/pdf-worker/CHANGELOG.md +++ b/ee/packages/pdf-worker/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/pdf-worker +## 0.2.7-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.2 +
+ ## 0.2.7-rc.1 ### Patch Changes diff --git a/ee/packages/pdf-worker/package.json b/ee/packages/pdf-worker/package.json index 4ee0d3942d83..76e60e18b738 100644 --- a/ee/packages/pdf-worker/package.json +++ b/ee/packages/pdf-worker/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/pdf-worker", - "version": "0.2.7-rc.1", + "version": "0.2.7-rc.2", "private": true, "main": "./dist/index.js", "typings": "./dist/index.d.ts", diff --git a/ee/packages/presence/CHANGELOG.md b/ee/packages/presence/CHANGELOG.md index 4b1bf78d0349..86ec5fedf24d 100644 --- a/ee/packages/presence/CHANGELOG.md +++ b/ee/packages/presence/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/presence +## 0.2.10-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.2 + - @rocket.chat/core-services@0.7.2-rc.2 + - @rocket.chat/models@1.0.1-rc.2 +
+ ## 0.2.10-rc.1 ### Patch Changes diff --git a/ee/packages/presence/package.json b/ee/packages/presence/package.json index 8f264d8f47a4..81a83bbbcceb 100644 --- a/ee/packages/presence/package.json +++ b/ee/packages/presence/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/presence", - "version": "0.2.10-rc.1", + "version": "0.2.10-rc.2", "private": true, "devDependencies": { "@babel/core": "~7.26.0", diff --git a/package.json b/package.json index 7f947de8318d..2d6850baa50b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rocket.chat", - "version": "7.1.0-rc.1", + "version": "7.1.0-rc.2", "description": "Rocket.Chat Monorepo", "main": "index.js", "private": true, diff --git a/packages/api-client/CHANGELOG.md b/packages/api-client/CHANGELOG.md index 3f3e0aefef65..e30d88b054e4 100644 --- a/packages/api-client/CHANGELOG.md +++ b/packages/api-client/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/api-client +## 0.2.10-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.2 + - @rocket.chat/rest-typings@7.1.0-rc.2 +
+ ## 0.2.10-rc.1 ### Patch Changes diff --git a/packages/api-client/package.json b/packages/api-client/package.json index 3b9f3c34cdaf..95a3044606f6 100644 --- a/packages/api-client/package.json +++ b/packages/api-client/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/api-client", - "version": "0.2.10-rc.1", + "version": "0.2.10-rc.2", "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", "@types/jest": "~29.5.14", diff --git a/packages/apps/CHANGELOG.md b/packages/apps/CHANGELOG.md index 4f12ae2ae69f..8f74abf9e6e1 100644 --- a/packages/apps/CHANGELOG.md +++ b/packages/apps/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/apps +## 0.2.1-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.2 + - @rocket.chat/model-typings@1.1.0-rc.2 +
+ ## 0.2.1-rc.1 ### Patch Changes diff --git a/packages/apps/package.json b/packages/apps/package.json index 3cfd4eb62497..c942184783fc 100644 --- a/packages/apps/package.json +++ b/packages/apps/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/apps", - "version": "0.2.1-rc.1", + "version": "0.2.1-rc.2", "private": true, "devDependencies": { "eslint": "~8.45.0", diff --git a/packages/core-services/CHANGELOG.md b/packages/core-services/CHANGELOG.md index 222f45e54fb0..293198d3de86 100644 --- a/packages/core-services/CHANGELOG.md +++ b/packages/core-services/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/core-services +## 0.7.2-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.2 + - @rocket.chat/rest-typings@7.1.0-rc.2 + - @rocket.chat/models@1.0.1-rc.2 +
+ ## 0.7.2-rc.1 ### Patch Changes diff --git a/packages/core-services/package.json b/packages/core-services/package.json index 0ff746e2f6e5..ec967c9b3bc8 100644 --- a/packages/core-services/package.json +++ b/packages/core-services/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/core-services", - "version": "0.7.2-rc.1", + "version": "0.7.2-rc.2", "private": true, "devDependencies": { "@babel/core": "~7.26.0", diff --git a/packages/core-typings/CHANGELOG.md b/packages/core-typings/CHANGELOG.md index 231e7b53607b..3642882839f3 100644 --- a/packages/core-typings/CHANGELOG.md +++ b/packages/core-typings/CHANGELOG.md @@ -1,5 +1,7 @@ # @rocket.chat/core-typings +## 7.1.0-rc.2 + ## 7.1.0-rc.1 ## 7.1.0-rc.0 diff --git a/packages/core-typings/package.json b/packages/core-typings/package.json index 8d2042fb3932..2272c3732fac 100644 --- a/packages/core-typings/package.json +++ b/packages/core-typings/package.json @@ -2,7 +2,7 @@ "$schema": "https://json.schemastore.org/package", "name": "@rocket.chat/core-typings", "private": true, - "version": "7.1.0-rc.1", + "version": "7.1.0-rc.2", "devDependencies": { "@rocket.chat/apps-engine": "workspace:^", "@rocket.chat/eslint-config": "workspace:^", diff --git a/packages/cron/CHANGELOG.md b/packages/cron/CHANGELOG.md index a8cd3e909d9b..bb4f0775ffb9 100644 --- a/packages/cron/CHANGELOG.md +++ b/packages/cron/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/cron +## 0.1.10-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.2 + - @rocket.chat/models@1.0.1-rc.2 +
+ ## 0.1.10-rc.1 ### Patch Changes diff --git a/packages/cron/package.json b/packages/cron/package.json index 73ead86a4332..11d4fef7b2c7 100644 --- a/packages/cron/package.json +++ b/packages/cron/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/cron", - "version": "0.1.10-rc.1", + "version": "0.1.10-rc.2", "private": true, "devDependencies": { "eslint": "~8.45.0", diff --git a/packages/ddp-client/CHANGELOG.md b/packages/ddp-client/CHANGELOG.md index edbfcf320efb..9fdeb4eb4b92 100644 --- a/packages/ddp-client/CHANGELOG.md +++ b/packages/ddp-client/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/ddp-client +## 0.3.10-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.2 + - @rocket.chat/rest-typings@7.1.0-rc.2 + - @rocket.chat/api-client@0.2.10-rc.2 +
+ ## 0.3.10-rc.1 ### Patch Changes diff --git a/packages/ddp-client/package.json b/packages/ddp-client/package.json index 1a91c494759c..af83865e7a29 100644 --- a/packages/ddp-client/package.json +++ b/packages/ddp-client/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ddp-client", - "version": "0.3.10-rc.1", + "version": "0.3.10-rc.2", "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", "@types/jest": "~29.5.14", diff --git a/packages/freeswitch/CHANGELOG.md b/packages/freeswitch/CHANGELOG.md index 2b43848eae79..09e71a92d1ef 100644 --- a/packages/freeswitch/CHANGELOG.md +++ b/packages/freeswitch/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/freeswitch +## 1.0.1-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.2 +
+ ## 1.0.1-rc.1 ### Patch Changes diff --git a/packages/freeswitch/package.json b/packages/freeswitch/package.json index f5a464d96dda..6be878f4d97d 100644 --- a/packages/freeswitch/package.json +++ b/packages/freeswitch/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/freeswitch", - "version": "1.0.1-rc.1", + "version": "1.0.1-rc.2", "private": true, "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", diff --git a/packages/fuselage-ui-kit/CHANGELOG.md b/packages/fuselage-ui-kit/CHANGELOG.md index 4d33ff306ad7..dcdd23a60afb 100644 --- a/packages/fuselage-ui-kit/CHANGELOG.md +++ b/packages/fuselage-ui-kit/CHANGELOG.md @@ -1,5 +1,18 @@ # Change Log +## 13.0.0-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.2 + - @rocket.chat/gazzodown@13.0.0-rc.2 + - @rocket.chat/ui-contexts@13.0.0-rc.2 + - @rocket.chat/ui-avatar@9.0.0-rc.2 + - @rocket.chat/ui-video-conf@13.0.0-rc.2 +
+ ## 13.0.0-rc.1 ### Patch Changes diff --git a/packages/fuselage-ui-kit/package.json b/packages/fuselage-ui-kit/package.json index a13b4b0c7b77..5af72d71f45c 100644 --- a/packages/fuselage-ui-kit/package.json +++ b/packages/fuselage-ui-kit/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/fuselage-ui-kit", - "version": "13.0.0-rc.1", + "version": "13.0.0-rc.2", "private": true, "description": "UiKit elements for Rocket.Chat Apps built under Fuselage design system", "homepage": "https://rocketchat.github.io/Rocket.Chat.Fuselage/", @@ -101,10 +101,10 @@ "@rocket.chat/icons": "*", "@rocket.chat/prettier-config": "*", "@rocket.chat/styled": "*", - "@rocket.chat/ui-avatar": "9.0.0-rc.1", - "@rocket.chat/ui-contexts": "13.0.0-rc.1", + "@rocket.chat/ui-avatar": "9.0.0-rc.2", + "@rocket.chat/ui-contexts": "13.0.0-rc.2", "@rocket.chat/ui-kit": "0.37.0", - "@rocket.chat/ui-video-conf": "13.0.0-rc.1", + "@rocket.chat/ui-video-conf": "13.0.0-rc.2", "@tanstack/react-query": "*", "react": "~17.0.2", "react-dom": "*" diff --git a/packages/gazzodown/CHANGELOG.md b/packages/gazzodown/CHANGELOG.md index be29cf95ebc7..3e1ae8a6409d 100644 --- a/packages/gazzodown/CHANGELOG.md +++ b/packages/gazzodown/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/gazzodown +## 13.0.0-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.2 + - @rocket.chat/ui-contexts@13.0.0-rc.2 + - @rocket.chat/ui-client@13.0.0-rc.2 +
+ ## 13.0.0-rc.1 ### Patch Changes diff --git a/packages/gazzodown/package.json b/packages/gazzodown/package.json index bc6843862951..4dbaa574e667 100644 --- a/packages/gazzodown/package.json +++ b/packages/gazzodown/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/gazzodown", - "version": "13.0.0-rc.1", + "version": "13.0.0-rc.2", "private": true, "main": "./dist/index.js", "typings": "./dist/index.d.ts", @@ -74,8 +74,8 @@ "@rocket.chat/fuselage-tokens": "*", "@rocket.chat/message-parser": "0.31.31", "@rocket.chat/styled": "*", - "@rocket.chat/ui-client": "13.0.0-rc.1", - "@rocket.chat/ui-contexts": "13.0.0-rc.1", + "@rocket.chat/ui-client": "13.0.0-rc.2", + "@rocket.chat/ui-contexts": "13.0.0-rc.2", "katex": "*", "react": "*" }, diff --git a/packages/instance-status/CHANGELOG.md b/packages/instance-status/CHANGELOG.md index 2c6646df5361..d7a457cc3675 100644 --- a/packages/instance-status/CHANGELOG.md +++ b/packages/instance-status/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/instance-status +## 0.1.10-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/models@1.0.1-rc.2 +
+ ## 0.1.10-rc.1 ### Patch Changes diff --git a/packages/instance-status/package.json b/packages/instance-status/package.json index e17c4abc5895..1429f2456c5f 100644 --- a/packages/instance-status/package.json +++ b/packages/instance-status/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/instance-status", - "version": "0.1.10-rc.1", + "version": "0.1.10-rc.2", "private": true, "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", diff --git a/packages/livechat/CHANGELOG.md b/packages/livechat/CHANGELOG.md index 1fcbed0e5c46..d0d94c96c120 100644 --- a/packages/livechat/CHANGELOG.md +++ b/packages/livechat/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/livechat Change Log +## 1.21.0-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/gazzodown@13.0.0-rc.2 +
+ ## 1.21.0-rc.1 ### Patch Changes diff --git a/packages/livechat/package.json b/packages/livechat/package.json index 4a2fdf3dbc5b..97e68aea1fb8 100644 --- a/packages/livechat/package.json +++ b/packages/livechat/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/livechat", - "version": "1.21.0-rc.1", + "version": "1.21.0-rc.2", "files": [ "/build" ], diff --git a/packages/model-typings/CHANGELOG.md b/packages/model-typings/CHANGELOG.md index 2cb9d9f81a89..f23b0930f168 100644 --- a/packages/model-typings/CHANGELOG.md +++ b/packages/model-typings/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/model-typings +## 1.1.0-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.2 +
+ ## 1.1.0-rc.1 ### Patch Changes diff --git a/packages/model-typings/package.json b/packages/model-typings/package.json index 9f005e1b28d1..293ddf3594b0 100644 --- a/packages/model-typings/package.json +++ b/packages/model-typings/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/model-typings", - "version": "1.1.0-rc.1", + "version": "1.1.0-rc.2", "private": true, "devDependencies": { "@types/node-rsa": "^1.1.4", diff --git a/packages/models/CHANGELOG.md b/packages/models/CHANGELOG.md index 85b835a7cd39..439a41522cea 100644 --- a/packages/models/CHANGELOG.md +++ b/packages/models/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/models +## 1.0.1-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/model-typings@1.1.0-rc.2 +
+ ## 1.0.1-rc.1 ### Patch Changes diff --git a/packages/models/package.json b/packages/models/package.json index d793fcf7578a..794dcbc64a36 100644 --- a/packages/models/package.json +++ b/packages/models/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/models", - "version": "1.0.1-rc.1", + "version": "1.0.1-rc.2", "private": true, "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", diff --git a/packages/rest-typings/CHANGELOG.md b/packages/rest-typings/CHANGELOG.md index 1b8e6e0fc9f8..a0a18f27a36a 100644 --- a/packages/rest-typings/CHANGELOG.md +++ b/packages/rest-typings/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/rest-typings +## 7.1.0-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.2 +
+ ## 7.1.0-rc.1 ### Patch Changes diff --git a/packages/rest-typings/package.json b/packages/rest-typings/package.json index effb445a30cd..995bef4404d2 100644 --- a/packages/rest-typings/package.json +++ b/packages/rest-typings/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/rest-typings", - "version": "7.1.0-rc.1", + "version": "7.1.0-rc.2", "devDependencies": { "@rocket.chat/apps-engine": "workspace:^", "@rocket.chat/eslint-config": "workspace:~", diff --git a/packages/ui-avatar/CHANGELOG.md b/packages/ui-avatar/CHANGELOG.md index 308ac76e886c..e4d0bd2c7201 100644 --- a/packages/ui-avatar/CHANGELOG.md +++ b/packages/ui-avatar/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/ui-avatar +## 9.0.0-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@13.0.0-rc.2 +
+ ## 9.0.0-rc.1 ### Patch Changes diff --git a/packages/ui-avatar/package.json b/packages/ui-avatar/package.json index 5eaf57fa73ce..928dca3f3153 100644 --- a/packages/ui-avatar/package.json +++ b/packages/ui-avatar/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-avatar", - "version": "9.0.0-rc.1", + "version": "9.0.0-rc.2", "private": true, "devDependencies": { "@babel/core": "~7.26.0", @@ -30,7 +30,7 @@ ], "peerDependencies": { "@rocket.chat/fuselage": "*", - "@rocket.chat/ui-contexts": "13.0.0-rc.1", + "@rocket.chat/ui-contexts": "13.0.0-rc.2", "react": "~17.0.2" }, "volta": { diff --git a/packages/ui-client/CHANGELOG.md b/packages/ui-client/CHANGELOG.md index a705b850733a..90f8116f9db0 100644 --- a/packages/ui-client/CHANGELOG.md +++ b/packages/ui-client/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/ui-client +## 13.0.0-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@13.0.0-rc.2 + - @rocket.chat/ui-avatar@9.0.0-rc.2 +
+ ## 13.0.0-rc.1 ### Patch Changes diff --git a/packages/ui-client/package.json b/packages/ui-client/package.json index 705c6384814b..aa2024c9bc1c 100644 --- a/packages/ui-client/package.json +++ b/packages/ui-client/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-client", - "version": "13.0.0-rc.1", + "version": "13.0.0-rc.2", "private": true, "main": "./dist/index.js", "typings": "./dist/index.d.ts", @@ -60,8 +60,8 @@ "@rocket.chat/fuselage": "*", "@rocket.chat/fuselage-hooks": "*", "@rocket.chat/icons": "*", - "@rocket.chat/ui-avatar": "9.0.0-rc.1", - "@rocket.chat/ui-contexts": "13.0.0-rc.1", + "@rocket.chat/ui-avatar": "9.0.0-rc.2", + "@rocket.chat/ui-contexts": "13.0.0-rc.2", "react": "*", "react-i18next": "*" }, diff --git a/packages/ui-contexts/CHANGELOG.md b/packages/ui-contexts/CHANGELOG.md index f2a16ba9cb52..89b053d31188 100644 --- a/packages/ui-contexts/CHANGELOG.md +++ b/packages/ui-contexts/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/ui-contexts +## 13.0.0-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.2 + - @rocket.chat/rest-typings@7.1.0-rc.2 + - @rocket.chat/ddp-client@0.3.10-rc.2 +
+ ## 13.0.0-rc.1 ### Patch Changes diff --git a/packages/ui-contexts/package.json b/packages/ui-contexts/package.json index cf6abbb7689e..8f3f6d0e9a31 100644 --- a/packages/ui-contexts/package.json +++ b/packages/ui-contexts/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-contexts", - "version": "13.0.0-rc.1", + "version": "13.0.0-rc.2", "private": true, "devDependencies": { "@rocket.chat/core-typings": "workspace:^", diff --git a/packages/ui-video-conf/CHANGELOG.md b/packages/ui-video-conf/CHANGELOG.md index d99511c1323c..1886aa52f218 100644 --- a/packages/ui-video-conf/CHANGELOG.md +++ b/packages/ui-video-conf/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/ui-video-conf +## 13.0.0-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@13.0.0-rc.2 + - @rocket.chat/ui-avatar@9.0.0-rc.2 +
+ ## 13.0.0-rc.1 ### Patch Changes diff --git a/packages/ui-video-conf/package.json b/packages/ui-video-conf/package.json index 50aab096b71f..19770dacac5b 100644 --- a/packages/ui-video-conf/package.json +++ b/packages/ui-video-conf/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-video-conf", - "version": "13.0.0-rc.1", + "version": "13.0.0-rc.2", "private": true, "main": "./dist/index.js", "typings": "./dist/index.d.ts", @@ -58,8 +58,8 @@ "@rocket.chat/fuselage-hooks": "*", "@rocket.chat/icons": "*", "@rocket.chat/styled": "*", - "@rocket.chat/ui-avatar": "9.0.0-rc.1", - "@rocket.chat/ui-contexts": "13.0.0-rc.1", + "@rocket.chat/ui-avatar": "9.0.0-rc.2", + "@rocket.chat/ui-contexts": "13.0.0-rc.2", "react": "~17.0.2", "react-dom": "^17.0.2" }, diff --git a/packages/ui-voip/CHANGELOG.md b/packages/ui-voip/CHANGELOG.md index 31ad7704ba2f..15f837b16901 100644 --- a/packages/ui-voip/CHANGELOG.md +++ b/packages/ui-voip/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/ui-voip +## 3.0.0-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@13.0.0-rc.2 + - @rocket.chat/ui-avatar@9.0.0-rc.2 + - @rocket.chat/ui-client@13.0.0-rc.2 +
+ ## 3.0.0-rc.1 ### Patch Changes diff --git a/packages/ui-voip/package.json b/packages/ui-voip/package.json index 056dd4acf472..6c557c40f986 100644 --- a/packages/ui-voip/package.json +++ b/packages/ui-voip/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-voip", - "version": "3.0.0-rc.1", + "version": "3.0.0-rc.2", "private": true, "main": "./dist/index.js", "typings": "./dist/index.d.ts", @@ -67,9 +67,9 @@ "@rocket.chat/fuselage-hooks": "*", "@rocket.chat/icons": "*", "@rocket.chat/styled": "*", - "@rocket.chat/ui-avatar": "9.0.0-rc.1", - "@rocket.chat/ui-client": "13.0.0-rc.1", - "@rocket.chat/ui-contexts": "13.0.0-rc.1", + "@rocket.chat/ui-avatar": "9.0.0-rc.2", + "@rocket.chat/ui-client": "13.0.0-rc.2", + "@rocket.chat/ui-contexts": "13.0.0-rc.2", "react": "~17.0.2", "react-aria": "~3.23.1", "react-dom": "^17.0.2" diff --git a/packages/web-ui-registration/CHANGELOG.md b/packages/web-ui-registration/CHANGELOG.md index 9415c16940c2..c900b65a07e7 100644 --- a/packages/web-ui-registration/CHANGELOG.md +++ b/packages/web-ui-registration/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/web-ui-registration +## 13.0.0-rc.2 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@13.0.0-rc.2 +
+ ## 13.0.0-rc.1 ### Patch Changes diff --git a/packages/web-ui-registration/package.json b/packages/web-ui-registration/package.json index 3f17130414bf..ec5bf544bf8f 100644 --- a/packages/web-ui-registration/package.json +++ b/packages/web-ui-registration/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/web-ui-registration", - "version": "13.0.0-rc.1", + "version": "13.0.0-rc.2", "private": true, "homepage": "https://rocket.chat", "main": "./dist/index.js", @@ -49,7 +49,7 @@ "peerDependencies": { "@rocket.chat/layout": "*", "@rocket.chat/tools": "0.2.2", - "@rocket.chat/ui-contexts": "13.0.0-rc.1", + "@rocket.chat/ui-contexts": "13.0.0-rc.2", "@tanstack/react-query": "*", "react": "*", "react-hook-form": "*", diff --git a/yarn.lock b/yarn.lock index dc8e699aeaa2..8bfd8551d0ae 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8765,10 +8765,10 @@ __metadata: "@rocket.chat/icons": "*" "@rocket.chat/prettier-config": "*" "@rocket.chat/styled": "*" - "@rocket.chat/ui-avatar": 9.0.0-rc.0 - "@rocket.chat/ui-contexts": 13.0.0-rc.0 + "@rocket.chat/ui-avatar": 9.0.0-rc.1 + "@rocket.chat/ui-contexts": 13.0.0-rc.1 "@rocket.chat/ui-kit": 0.37.0 - "@rocket.chat/ui-video-conf": 13.0.0-rc.0 + "@rocket.chat/ui-video-conf": 13.0.0-rc.1 "@tanstack/react-query": "*" react: ~17.0.2 react-dom: "*" @@ -8853,8 +8853,8 @@ __metadata: "@rocket.chat/fuselage-tokens": "*" "@rocket.chat/message-parser": 0.31.31 "@rocket.chat/styled": "*" - "@rocket.chat/ui-client": 13.0.0-rc.0 - "@rocket.chat/ui-contexts": 13.0.0-rc.0 + "@rocket.chat/ui-client": 13.0.0-rc.1 + "@rocket.chat/ui-contexts": 13.0.0-rc.1 katex: "*" react: "*" languageName: unknown @@ -10089,7 +10089,7 @@ __metadata: typescript: "npm:~5.6.3" peerDependencies: "@rocket.chat/fuselage": "*" - "@rocket.chat/ui-contexts": 13.0.0-rc.0 + "@rocket.chat/ui-contexts": 13.0.0-rc.1 react: ~17.0.2 languageName: unknown linkType: soft @@ -10139,8 +10139,8 @@ __metadata: "@rocket.chat/fuselage": "*" "@rocket.chat/fuselage-hooks": "*" "@rocket.chat/icons": "*" - "@rocket.chat/ui-avatar": 9.0.0-rc.0 - "@rocket.chat/ui-contexts": 13.0.0-rc.0 + "@rocket.chat/ui-avatar": 9.0.0-rc.1 + "@rocket.chat/ui-contexts": 13.0.0-rc.1 react: "*" react-i18next: "*" languageName: unknown @@ -10310,8 +10310,8 @@ __metadata: "@rocket.chat/fuselage-hooks": "*" "@rocket.chat/icons": "*" "@rocket.chat/styled": "*" - "@rocket.chat/ui-avatar": 9.0.0-rc.0 - "@rocket.chat/ui-contexts": 13.0.0-rc.0 + "@rocket.chat/ui-avatar": 9.0.0-rc.1 + "@rocket.chat/ui-contexts": 13.0.0-rc.1 react: ~17.0.2 react-dom: ^17.0.2 languageName: unknown @@ -10367,9 +10367,9 @@ __metadata: "@rocket.chat/fuselage-hooks": "*" "@rocket.chat/icons": "*" "@rocket.chat/styled": "*" - "@rocket.chat/ui-avatar": 9.0.0-rc.0 - "@rocket.chat/ui-client": 13.0.0-rc.0 - "@rocket.chat/ui-contexts": 13.0.0-rc.0 + "@rocket.chat/ui-avatar": 9.0.0-rc.1 + "@rocket.chat/ui-client": 13.0.0-rc.1 + "@rocket.chat/ui-contexts": 13.0.0-rc.1 react: ~17.0.2 react-aria: ~3.23.1 react-dom: ^17.0.2 @@ -10457,7 +10457,7 @@ __metadata: peerDependencies: "@rocket.chat/layout": "*" "@rocket.chat/tools": 0.2.2 - "@rocket.chat/ui-contexts": 13.0.0-rc.0 + "@rocket.chat/ui-contexts": 13.0.0-rc.1 "@tanstack/react-query": "*" react: "*" react-hook-form: "*" From a33b2097535ec945e33e8f23b901ff4d2bab9987 Mon Sep 17 00:00:00 2001 From: Pierre Lehnen <55164754+pierre-lehnen-rc@users.noreply.github.com> Date: Mon, 2 Dec 2024 14:07:47 -0300 Subject: [PATCH 02/28] regression: old omnichannel rooms only being migrated after their data is loaded by the client (#34090) --- .../server/lib/maybeMigrateLivechatRoom.ts | 12 ++-- apps/meteor/app/api/server/v1/rooms.ts | 5 +- .../app/livechat/server/api/v1/contact.ts | 7 +- .../lib/contacts/getContactByChannel.ts | 30 -------- apps/meteor/app/livechat/server/startup.ts | 3 +- .../tests/end-to-end/api/livechat/contacts.ts | 71 ++----------------- packages/rest-typings/src/v1/omnichannel.ts | 30 +++----- 7 files changed, 28 insertions(+), 130 deletions(-) delete mode 100644 apps/meteor/app/livechat/server/lib/contacts/getContactByChannel.ts diff --git a/apps/meteor/app/api/server/lib/maybeMigrateLivechatRoom.ts b/apps/meteor/app/api/server/lib/maybeMigrateLivechatRoom.ts index ac5b2cd866ca..3a66cef2e416 100644 --- a/apps/meteor/app/api/server/lib/maybeMigrateLivechatRoom.ts +++ b/apps/meteor/app/api/server/lib/maybeMigrateLivechatRoom.ts @@ -1,5 +1,6 @@ -import { isOmnichannelRoom, type IRoom } from '@rocket.chat/core-typings'; -import { Rooms } from '@rocket.chat/models'; +import { isOmnichannelRoom } from '@rocket.chat/core-typings'; +import type { IOmnichannelRoom, IRoom } from '@rocket.chat/core-typings'; +import { LivechatRooms } from '@rocket.chat/models'; import type { FindOptions } from 'mongodb'; import { projectionAllowsAttribute } from './projectionAllowsAttribute'; @@ -9,7 +10,10 @@ import { migrateVisitorIfMissingContact } from '../../../livechat/server/lib/con * If the room is a livechat room and it doesn't yet have a contact, trigger the migration for its visitor and source * The migration will create/use a contact and assign it to every room that matches this visitorId and source. **/ -export async function maybeMigrateLivechatRoom(room: IRoom | null, options: FindOptions = {}): Promise { +export async function maybeMigrateLivechatRoom( + room: IOmnichannelRoom | null, + options: FindOptions = {}, +): Promise { if (!room || !isOmnichannelRoom(room)) { return room; } @@ -32,5 +36,5 @@ export async function maybeMigrateLivechatRoom(room: IRoom | null, options: Find } // Load the room again with the same options so it can be reloaded with the contactId in place - return Rooms.findOneById(room._id, options); + return LivechatRooms.findOneById(room._id, options); } diff --git a/apps/meteor/app/api/server/v1/rooms.ts b/apps/meteor/app/api/server/v1/rooms.ts index e8a152db914a..50bc12cab618 100644 --- a/apps/meteor/app/api/server/v1/rooms.ts +++ b/apps/meteor/app/api/server/v1/rooms.ts @@ -32,7 +32,6 @@ import { composeRoomWithLastMessage } from '../helpers/composeRoomWithLastMessag import { getPaginationItems } from '../helpers/getPaginationItems'; import { getUserFromParams } from '../helpers/getUserFromParams'; import { getUploadFormData } from '../lib/getUploadFormData'; -import { maybeMigrateLivechatRoom } from '../lib/maybeMigrateLivechatRoom'; import { findAdminRoom, findAdminRooms, @@ -442,10 +441,8 @@ API.v1.addRoute( const { team, parentRoom } = await Team.getRoomInfo(room); const parent = discussionParent || parentRoom; - const options = { projection: fields }; - return API.v1.success({ - room: (await maybeMigrateLivechatRoom(await Rooms.findOneByIdOrName(room._id, options), options)) ?? undefined, + room: await Rooms.findOneByIdOrName(room._id, { projection: fields }), ...(team && { team }), ...(parent && { parent }), }); diff --git a/apps/meteor/app/livechat/server/api/v1/contact.ts b/apps/meteor/app/livechat/server/api/v1/contact.ts index 0baa5584a243..019ea07252dc 100644 --- a/apps/meteor/app/livechat/server/api/v1/contact.ts +++ b/apps/meteor/app/livechat/server/api/v1/contact.ts @@ -14,7 +14,6 @@ import { Meteor } from 'meteor/meteor'; import { API } from '../../../../api/server'; import { getPaginationItems } from '../../../../api/server/helpers/getPaginationItems'; import { createContact } from '../../lib/contacts/createContact'; -import { getContactByChannel } from '../../lib/contacts/getContactByChannel'; import { getContactChannelsGrouped } from '../../lib/contacts/getContactChannelsGrouped'; import { getContactHistory } from '../../lib/contacts/getContactHistory'; import { getContacts } from '../../lib/contacts/getContacts'; @@ -133,13 +132,13 @@ API.v1.addRoute( { authRequired: true, permissionsRequired: ['view-livechat-contact'], validateParams: isGETOmnichannelContactsProps }, { async get() { - const { contactId, visitor } = this.queryParams; + const { contactId } = this.queryParams; - if (!contactId && !visitor) { + if (!contactId) { return API.v1.notFound(); } - const contact = await (contactId ? LivechatContacts.findOneById(contactId) : getContactByChannel(visitor)); + const contact = await LivechatContacts.findOneById(contactId); if (!contact) { return API.v1.notFound(); diff --git a/apps/meteor/app/livechat/server/lib/contacts/getContactByChannel.ts b/apps/meteor/app/livechat/server/lib/contacts/getContactByChannel.ts deleted file mode 100644 index 052c28206047..000000000000 --- a/apps/meteor/app/livechat/server/lib/contacts/getContactByChannel.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { ILivechatContact, ILivechatContactVisitorAssociation } from '@rocket.chat/core-typings'; -import { LivechatContacts, LivechatVisitors } from '@rocket.chat/models'; - -import { migrateVisitorToContactId } from './migrateVisitorToContactId'; - -export async function getContactByChannel(association: ILivechatContactVisitorAssociation): Promise { - // If a contact already exists for that visitor, return it - const linkedContact = await LivechatContacts.findOneByVisitor(association); - if (linkedContact) { - return linkedContact; - } - - // If the contact was not found, Load the visitor data so we can migrate it - const visitor = await LivechatVisitors.findOneById(association.visitorId); - - // If there is no visitor data, there's nothing we can do - if (!visitor) { - return null; - } - - const newContactId = await migrateVisitorToContactId({ visitor, source: association.source }); - - // If no contact was created by the migration, this visitor doesn't need a contact yet, so let's return null - if (!newContactId) { - return null; - } - - // Finally, let's return the data of the migrated contact - return LivechatContacts.findOneById(newContactId); -} diff --git a/apps/meteor/app/livechat/server/startup.ts b/apps/meteor/app/livechat/server/startup.ts index 5c02587f17e6..b41fc425bf06 100644 --- a/apps/meteor/app/livechat/server/startup.ts +++ b/apps/meteor/app/livechat/server/startup.ts @@ -13,6 +13,7 @@ import { callbacks } from '../../../lib/callbacks'; import { beforeLeaveRoomCallback } from '../../../lib/callbacks/beforeLeaveRoomCallback'; import { i18n } from '../../../server/lib/i18n'; import { roomCoordinator } from '../../../server/lib/rooms/roomCoordinator'; +import { maybeMigrateLivechatRoom } from '../../api/server/lib/maybeMigrateLivechatRoom'; import { hasPermissionAsync } from '../../authorization/server/functions/hasPermission'; import { notifyOnUserChange } from '../../lib/server/lib/notifyListener'; import { settings } from '../../settings/server'; @@ -21,7 +22,7 @@ import './roomAccessValidator.internalService'; const logger = new Logger('LivechatStartup'); Meteor.startup(async () => { - roomCoordinator.setRoomFind('l', (_id) => LivechatRooms.findOneById(_id)); + roomCoordinator.setRoomFind('l', async (id) => maybeMigrateLivechatRoom(await LivechatRooms.findOneById(id))); beforeLeaveRoomCallback.add( (user, room) => { diff --git a/apps/meteor/tests/end-to-end/api/livechat/contacts.ts b/apps/meteor/tests/end-to-end/api/livechat/contacts.ts index daaffb1f9eb3..4095e7df8b23 100644 --- a/apps/meteor/tests/end-to-end/api/livechat/contacts.ts +++ b/apps/meteor/tests/end-to-end/api/livechat/contacts.ts @@ -710,7 +710,6 @@ describe('LIVECHAT - contacts', () => { describe('[GET] omnichannel/contacts.get', () => { let contactId: string; let contactId2: string; - let association: ILivechatContactVisitorAssociation; const email = faker.internet.email().toLowerCase(); const phone = faker.phone.number(); @@ -743,14 +742,7 @@ describe('LIVECHAT - contacts', () => { const visitor = await createVisitor(undefined, contact.name, email, phone); - const room = await createLivechatRoom(visitor.token); - association = { - visitorId: visitor._id, - source: { - type: room.source.type, - id: room.source.id, - }, - }; + await createLivechatRoom(visitor.token); }); after(async () => { @@ -774,23 +766,6 @@ describe('LIVECHAT - contacts', () => { expect(res.body.contact.contactManager).to.be.equal(contact.contactManager); }); - it('should be able get a contact by visitor association', async () => { - const res = await request.get(api(`omnichannel/contacts.get`)).set(credentials).query({ visitor: association }); - - expect(res.status).to.be.equal(200); - expect(res.body).to.have.property('success', true); - expect(res.body.contact).to.have.property('createdAt'); - expect(res.body.contact._id).to.be.equal(contactId); - expect(res.body.contact.name).to.be.equal(contact.name); - expect(res.body.contact.emails).to.be.deep.equal([ - { - address: contact.emails[0], - }, - ]); - expect(res.body.contact.phones).to.be.deep.equal([{ phoneNumber: contact.phones[0] }]); - expect(res.body.contact.contactManager).to.be.equal(contact.contactManager); - }); - it('should return 404 if contact does not exist using contactId', async () => { const res = await request.get(api(`omnichannel/contacts.get`)).set(credentials).query({ contactId: 'invalid' }); @@ -799,28 +774,6 @@ describe('LIVECHAT - contacts', () => { expect(res.body).to.have.property('error', 'Resource not found'); }); - it('should return 404 if contact does not exist using visitor association', async () => { - const res = await request - .get(api(`omnichannel/contacts.get`)) - .set(credentials) - .query({ visitor: { ...association, visitorId: 'invalidId' } }); - - expect(res.status).to.be.equal(404); - expect(res.body).to.have.property('success', false); - expect(res.body).to.have.property('error', 'Resource not found'); - }); - - it('should return 404 if contact does not exist using visitor source', async () => { - const res = await request - .get(api(`omnichannel/contacts.get`)) - .set(credentials) - .query({ visitor: { ...association, source: { type: 'email' } } }); - - expect(res.status).to.be.equal(404); - expect(res.body).to.have.property('success', false); - expect(res.body).to.have.property('error', 'Resource not found'); - }); - it("should return an error if user doesn't have 'view-livechat-contact' permission", async () => { await removePermissionFromAllRoles('view-livechat-contact'); @@ -835,21 +788,7 @@ describe('LIVECHAT - contacts', () => { it('should return an error if contactId and visitor association is missing', async () => { const res = await request.get(api(`omnichannel/contacts.get`)).set(credentials); - expectInvalidParams(res, [ - "must have required property 'contactId'", - "must have required property 'visitor'", - 'must match exactly one schema in oneOf [invalid-params]', - ]); - }); - - it('should return an error if more than one field is provided', async () => { - const res = await request.get(api(`omnichannel/contacts.get`)).set(credentials).query({ contactId, visitor: association }); - - expectInvalidParams(res, [ - 'must NOT have additional properties', - 'must NOT have additional properties', - 'must match exactly one schema in oneOf [invalid-params]', - ]); + expectInvalidParams(res, ["must have required property 'contactId' [invalid-params]"]); }); describe('Contact Channels', () => { @@ -1258,7 +1197,7 @@ describe('LIVECHAT - contacts', () => { expect(res.status).to.be.equal(200); expect(res.body).to.have.property('success', true); - const { body } = await request.get(api('omnichannel/contacts.get')).set(credentials).query({ visitor: association }); + const { body } = await request.get(api('omnichannel/contacts.get')).set(credentials).query({ contactId: room.contactId }); expect(body.contact.channels).to.be.an('array'); expect(body.contact.channels.length).to.be.equal(1); @@ -1388,7 +1327,7 @@ describe('LIVECHAT - contacts', () => { it('should be able to unblock a contact channel', async () => { await request.post(api('omnichannel/contacts.block')).set(credentials).send({ visitor: association }); - const { body } = await request.get(api('omnichannel/contacts.get')).set(credentials).query({ visitor: association }); + const { body } = await request.get(api('omnichannel/contacts.get')).set(credentials).query({ contactId: room.contactId }); expect(body.contact.channels).to.be.an('array'); expect(body.contact.channels.length).to.be.equal(1); @@ -1399,7 +1338,7 @@ describe('LIVECHAT - contacts', () => { expect(res.status).to.be.equal(200); expect(res.body).to.have.property('success', true); - const { body: body2 } = await request.get(api('omnichannel/contacts.get')).set(credentials).query({ visitor: association }); + const { body: body2 } = await request.get(api('omnichannel/contacts.get')).set(credentials).query({ contactId: room.contactId }); expect(body2.contact.channels).to.be.an('array'); expect(body2.contact.channels.length).to.be.equal(1); diff --git a/packages/rest-typings/src/v1/omnichannel.ts b/packages/rest-typings/src/v1/omnichannel.ts index 37a259187b66..2cd33e6cf8fb 100644 --- a/packages/rest-typings/src/v1/omnichannel.ts +++ b/packages/rest-typings/src/v1/omnichannel.ts @@ -1362,28 +1362,16 @@ export const ContactVisitorAssociationSchema = { }; const GETOmnichannelContactsSchema = { - oneOf: [ - { - type: 'object', - properties: { - contactId: { - type: 'string', - nullable: false, - isNotEmpty: true, - }, - }, - required: ['contactId'], - additionalProperties: false, - }, - { - type: 'object', - properties: { - visitor: ContactVisitorAssociationSchema, - }, - required: ['visitor'], - additionalProperties: false, + type: 'object', + properties: { + contactId: { + type: 'string', + nullable: false, + isNotEmpty: true, }, - ], + }, + required: ['contactId'], + additionalProperties: false, }; export const isGETOmnichannelContactsProps = ajv.compile(GETOmnichannelContactsSchema); From dee6c28db977e84d61e743341c9efe6607b3afcf Mon Sep 17 00:00:00 2001 From: Abhinav Kumar Date: Tue, 3 Dec 2024 00:27:43 +0530 Subject: [PATCH 03/28] regression: undefined fileBuffer in getUploadFormData when onFile is called before onField (#34091) --- .../api/server/lib/getUploadFormData.spec.ts | 178 ++++++++++++++++++ .../app/api/server/lib/getUploadFormData.ts | 21 +-- 2 files changed, 188 insertions(+), 11 deletions(-) create mode 100644 apps/meteor/app/api/server/lib/getUploadFormData.spec.ts diff --git a/apps/meteor/app/api/server/lib/getUploadFormData.spec.ts b/apps/meteor/app/api/server/lib/getUploadFormData.spec.ts new file mode 100644 index 000000000000..dc7afb77bd19 --- /dev/null +++ b/apps/meteor/app/api/server/lib/getUploadFormData.spec.ts @@ -0,0 +1,178 @@ +import { Readable } from 'stream'; + +import { expect } from 'chai'; +import type { Request } from 'express'; + +import { getUploadFormData } from './getUploadFormData'; + +const createMockRequest = ( + fields: Record, + file?: { + fieldname: string; + filename: string; + content: string | Buffer; + mimetype?: string; + }, +): Readable & { headers: Record } => { + const boundary = '----WebKitFormBoundary7MA4YWxkTrZu0gW'; + const parts: string[] = []; + + if (file) { + parts.push( + `--${boundary}`, + `Content-Disposition: form-data; name="${file.fieldname}"; filename="${file.filename}"`, + `Content-Type: ${file.mimetype || 'application/octet-stream'}`, + '', + file.content.toString(), + ); + } + + for (const [name, value] of Object.entries(fields)) { + parts.push(`--${boundary}`, `Content-Disposition: form-data; name="${name}"`, '', value); + } + + parts.push(`--${boundary}--`); + + const mockRequest: any = new Readable({ + read() { + this.push(Buffer.from(parts.join('\r\n'))); + this.push(null); + }, + }); + + mockRequest.headers = { + 'content-type': `multipart/form-data; boundary=${boundary}`, + }; + + return mockRequest as Readable & { headers: Record }; +}; + +describe('getUploadFormData', () => { + it('should successfully parse a single file upload and fields', async () => { + const mockRequest = createMockRequest( + { fieldName: 'fieldValue' }, + { + fieldname: 'fileField', + filename: 'test.txt', + content: 'Hello, this is a test file!', + mimetype: 'text/plain', + }, + ); + + const result = await getUploadFormData({ request: mockRequest as Request }, { field: 'fileField' }); + + expect(result).to.deep.include({ + fieldname: 'fileField', + filename: 'test.txt', + mimetype: 'text/plain', + fields: { fieldName: 'fieldValue' }, + }); + + expect(result.fileBuffer).to.not.be.undefined; + expect(result.fileBuffer.toString()).to.equal('Hello, this is a test file!'); + }); + it('should parse a file upload with multiple additional fields', async () => { + const mockRequest = createMockRequest( + { + fieldName: 'fieldValue', + extraField1: 'extraValue1', + extraField2: 'extraValue2', + }, + { + fieldname: 'fileField', + filename: 'test_with_fields.txt', + content: 'This file has additional fields!', + mimetype: 'text/plain', + }, + ); + + const result = await getUploadFormData({ request: mockRequest as Request }, { field: 'fileField' }); + + expect(result).to.deep.include({ + fieldname: 'fileField', + filename: 'test_with_fields.txt', + mimetype: 'text/plain', + fields: { + fieldName: 'fieldValue', + extraField1: 'extraValue1', + extraField2: 'extraValue2', + }, + }); + + expect(result.fileBuffer).to.not.be.undefined; + expect(result.fileBuffer.toString()).to.equal('This file has additional fields!'); + }); + + it('should handle a file upload when fileOptional is true', async () => { + const mockRequest = createMockRequest( + { fieldName: 'fieldValue' }, + { + fieldname: 'fileField', + filename: 'optional.txt', + content: 'This file is optional!', + mimetype: 'text/plain', + }, + ); + + const result = await getUploadFormData({ request: mockRequest as Request }, { fileOptional: true }); + + expect(result).to.deep.include({ + fieldname: 'fileField', + filename: 'optional.txt', + mimetype: 'text/plain', + fields: { fieldName: 'fieldValue' }, + }); + + expect(result.fileBuffer).to.not.be.undefined; + expect(result.fileBuffer?.toString()).to.equal('This file is optional!'); + }); + + it('should throw an error when no file is uploaded and fileOptional is false', async () => { + const mockRequest = createMockRequest({ fieldName: 'fieldValue' }); + + try { + await getUploadFormData({ request: mockRequest as Request }, { fileOptional: false }); + throw new Error('Expected function to throw'); + } catch (error) { + expect((error as Error).message).to.equal('[No file uploaded]'); + } + }); + + it('should return fields without errors when no file is uploaded but fileOptional is true', async () => { + const mockRequest = createMockRequest({ fieldName: 'fieldValue' }); // No file + + const result = await getUploadFormData({ request: mockRequest as Request }, { fileOptional: true }); + + expect(result).to.deep.equal({ + fields: { fieldName: 'fieldValue' }, + file: undefined, + fileBuffer: undefined, + fieldname: undefined, + filename: undefined, + encoding: undefined, + mimetype: undefined, + }); + }); + + it('should reject an oversized file', async () => { + const mockRequest = createMockRequest( + {}, + { + fieldname: 'fileField', + filename: 'large.txt', + content: 'x'.repeat(1024 * 1024 * 2), // 2 MB file + mimetype: 'text/plain', + }, + ); + + try { + await getUploadFormData( + { request: mockRequest as Request }, + { sizeLimit: 1024 * 1024 }, // 1 MB limit + ); + throw new Error('Expected function to throw'); + } catch (error) { + expect((error as Error).message).to.equal('[error-file-too-large]'); + } + }); +}); diff --git a/apps/meteor/app/api/server/lib/getUploadFormData.ts b/apps/meteor/app/api/server/lib/getUploadFormData.ts index 1630afe8cae2..93ceafdde92f 100644 --- a/apps/meteor/app/api/server/lib/getUploadFormData.ts +++ b/apps/meteor/app/api/server/lib/getUploadFormData.ts @@ -74,7 +74,15 @@ export async function getUploadFormData< const bb = busboy({ headers: request.headers, defParamCharset: 'utf8', limits }); const fields = Object.create(null) as K; - let uploadedFile: UploadResultWithOptionalFile | undefined; + let uploadedFile: UploadResultWithOptionalFile | undefined = { + fields, + encoding: undefined, + filename: undefined, + fieldname: undefined, + mimetype: undefined, + fileBuffer: undefined, + file: undefined, + }; let returnResult = (_value: UploadResultWithOptionalFile) => { // noop @@ -85,22 +93,13 @@ export async function getUploadFormData< function onField(fieldname: keyof K, value: K[keyof K]) { fields[fieldname] = value; - uploadedFile = { - fields, - encoding: undefined, - filename: undefined, - fieldname: undefined, - mimetype: undefined, - fileBuffer: undefined, - file: undefined, - }; } function onEnd() { if (!uploadedFile) { return returnError(new MeteorError('No file or fields were uploaded')); } - if (!('file' in uploadedFile) && !options.fileOptional) { + if (!options.fileOptional && !uploadedFile?.file) { return returnError(new MeteorError('No file uploaded')); } if (options.validate !== undefined && !options.validate(fields)) { From 64f63411e2aad9b8f27227217dc9ba91f9f69939 Mon Sep 17 00:00:00 2001 From: rocketchat-github-ci Date: Mon, 2 Dec 2024 20:13:49 +0000 Subject: [PATCH 04/28] Release 7.1.0-rc.3 [no ci] --- .changeset/bump-patch-1733170421495.md | 5 +++ .changeset/pre.json | 1 + apps/meteor/CHANGELOG.md | 35 +++++++++++++++++++ apps/meteor/app/utils/rocketchat.info | 2 +- apps/meteor/ee/server/services/CHANGELOG.md | 14 ++++++++ apps/meteor/ee/server/services/package.json | 2 +- apps/meteor/package.json | 2 +- apps/uikit-playground/CHANGELOG.md | 12 +++++++ apps/uikit-playground/package.json | 2 +- ee/apps/account-service/CHANGELOG.md | 14 ++++++++ ee/apps/account-service/package.json | 2 +- ee/apps/authorization-service/CHANGELOG.md | 14 ++++++++ ee/apps/authorization-service/package.json | 2 +- ee/apps/ddp-streamer/CHANGELOG.md | 15 ++++++++ ee/apps/ddp-streamer/package.json | 2 +- ee/apps/omnichannel-transcript/CHANGELOG.md | 15 ++++++++ ee/apps/omnichannel-transcript/package.json | 2 +- ee/apps/presence-service/CHANGELOG.md | 14 ++++++++ ee/apps/presence-service/package.json | 2 +- ee/apps/queue-worker/CHANGELOG.md | 14 ++++++++ ee/apps/queue-worker/package.json | 2 +- ee/apps/stream-hub-service/CHANGELOG.md | 13 +++++++ ee/apps/stream-hub-service/package.json | 2 +- ee/packages/license/CHANGELOG.md | 9 +++++ ee/packages/license/package.json | 2 +- ee/packages/network-broker/CHANGELOG.md | 9 +++++ ee/packages/network-broker/package.json | 2 +- ee/packages/omnichannel-services/CHANGELOG.md | 14 ++++++++ ee/packages/omnichannel-services/package.json | 2 +- ee/packages/pdf-worker/CHANGELOG.md | 9 +++++ ee/packages/pdf-worker/package.json | 2 +- ee/packages/presence/CHANGELOG.md | 11 ++++++ ee/packages/presence/package.json | 2 +- package.json | 2 +- packages/api-client/CHANGELOG.md | 10 ++++++ packages/api-client/package.json | 2 +- packages/apps/CHANGELOG.md | 10 ++++++ packages/apps/package.json | 2 +- packages/core-services/CHANGELOG.md | 11 ++++++ packages/core-services/package.json | 2 +- packages/core-typings/CHANGELOG.md | 2 ++ packages/core-typings/package.json | 2 +- packages/cron/CHANGELOG.md | 10 ++++++ packages/cron/package.json | 2 +- packages/ddp-client/CHANGELOG.md | 11 ++++++ packages/ddp-client/package.json | 2 +- packages/freeswitch/CHANGELOG.md | 9 +++++ packages/freeswitch/package.json | 2 +- packages/fuselage-ui-kit/CHANGELOG.md | 13 +++++++ packages/fuselage-ui-kit/package.json | 8 ++--- packages/gazzodown/CHANGELOG.md | 11 ++++++ packages/gazzodown/package.json | 6 ++-- packages/instance-status/CHANGELOG.md | 9 +++++ packages/instance-status/package.json | 2 +- packages/livechat/CHANGELOG.md | 9 +++++ packages/livechat/package.json | 2 +- packages/model-typings/CHANGELOG.md | 9 +++++ packages/model-typings/package.json | 2 +- packages/models/CHANGELOG.md | 9 +++++ packages/models/package.json | 2 +- packages/rest-typings/CHANGELOG.md | 9 +++++ packages/rest-typings/package.json | 2 +- packages/ui-avatar/CHANGELOG.md | 9 +++++ packages/ui-avatar/package.json | 4 +-- packages/ui-client/CHANGELOG.md | 10 ++++++ packages/ui-client/package.json | 6 ++-- packages/ui-contexts/CHANGELOG.md | 11 ++++++ packages/ui-contexts/package.json | 2 +- packages/ui-video-conf/CHANGELOG.md | 10 ++++++ packages/ui-video-conf/package.json | 6 ++-- packages/ui-voip/CHANGELOG.md | 11 ++++++ packages/ui-voip/package.json | 8 ++--- packages/web-ui-registration/CHANGELOG.md | 9 +++++ packages/web-ui-registration/package.json | 4 +-- yarn.lock | 28 +++++++-------- 75 files changed, 475 insertions(+), 65 deletions(-) create mode 100644 .changeset/bump-patch-1733170421495.md diff --git a/.changeset/bump-patch-1733170421495.md b/.changeset/bump-patch-1733170421495.md new file mode 100644 index 000000000000..e1eaa7980afb --- /dev/null +++ b/.changeset/bump-patch-1733170421495.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Bump @rocket.chat/meteor version. diff --git a/.changeset/pre.json b/.changeset/pre.json index d7869bfbeb45..7ef999ab9254 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -70,6 +70,7 @@ "changesets": [ "bump-patch-1732728542480", "bump-patch-1732835767114", + "bump-patch-1733170421495", "clean-flies-collect", "curvy-flies-greet", "fair-colts-remain", diff --git a/apps/meteor/CHANGELOG.md b/apps/meteor/CHANGELOG.md index 7f9586b6481a..179042fce8a9 100644 --- a/apps/meteor/CHANGELOG.md +++ b/apps/meteor/CHANGELOG.md @@ -1,5 +1,40 @@ # @rocket.chat/meteor +## 7.1.0-rc.3 + +### Patch Changes + +- Bump @rocket.chat/meteor version. + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.3 + - @rocket.chat/rest-typings@7.1.0-rc.3 + - @rocket.chat/license@1.0.1-rc.3 + - @rocket.chat/omnichannel-services@0.3.7-rc.3 + - @rocket.chat/pdf-worker@0.2.7-rc.3 + - @rocket.chat/presence@0.2.10-rc.3 + - @rocket.chat/api-client@0.2.10-rc.3 + - @rocket.chat/apps@0.2.1-rc.3 + - @rocket.chat/core-services@0.7.2-rc.3 + - @rocket.chat/cron@0.1.10-rc.3 + - @rocket.chat/freeswitch@1.0.1-rc.3 + - @rocket.chat/fuselage-ui-kit@13.0.0-rc.3 + - @rocket.chat/gazzodown@13.0.0-rc.3 + - @rocket.chat/model-typings@1.1.0-rc.3 + - @rocket.chat/ui-contexts@13.0.0-rc.3 + - @rocket.chat/server-cloud-communication@0.0.2 + - @rocket.chat/network-broker@0.1.2-rc.3 + - @rocket.chat/models@1.0.1-rc.3 + - @rocket.chat/ui-theming@0.4.0 + - @rocket.chat/ui-avatar@9.0.0-rc.3 + - @rocket.chat/ui-client@13.0.0-rc.3 + - @rocket.chat/ui-video-conf@13.0.0-rc.3 + - @rocket.chat/ui-voip@3.0.0-rc.3 + - @rocket.chat/web-ui-registration@13.0.0-rc.3 + - @rocket.chat/instance-status@0.1.10-rc.3 +
+ ## 7.1.0-rc.2 ### Patch Changes diff --git a/apps/meteor/app/utils/rocketchat.info b/apps/meteor/app/utils/rocketchat.info index 2a0f87378bed..0fea18c07a50 100644 --- a/apps/meteor/app/utils/rocketchat.info +++ b/apps/meteor/app/utils/rocketchat.info @@ -1,3 +1,3 @@ { - "version": "7.1.0-rc.2" + "version": "7.1.0-rc.3" } diff --git a/apps/meteor/ee/server/services/CHANGELOG.md b/apps/meteor/ee/server/services/CHANGELOG.md index 010abe1e310c..55dceb163759 100644 --- a/apps/meteor/ee/server/services/CHANGELOG.md +++ b/apps/meteor/ee/server/services/CHANGELOG.md @@ -1,5 +1,19 @@ # rocketchat-services +## 2.0.1-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.3 + - @rocket.chat/rest-typings@7.1.0-rc.3 + - @rocket.chat/core-services@0.7.2-rc.3 + - @rocket.chat/model-typings@1.1.0-rc.3 + - @rocket.chat/network-broker@0.1.2-rc.3 + - @rocket.chat/models@1.0.1-rc.3 +
+ ## 2.0.1-rc.2 ### Patch Changes diff --git a/apps/meteor/ee/server/services/package.json b/apps/meteor/ee/server/services/package.json index 8991e69572fb..339d8f50a9ef 100644 --- a/apps/meteor/ee/server/services/package.json +++ b/apps/meteor/ee/server/services/package.json @@ -1,7 +1,7 @@ { "name": "rocketchat-services", "private": true, - "version": "2.0.1-rc.2", + "version": "2.0.1-rc.3", "description": "Rocket.Chat Authorization service", "main": "index.js", "scripts": { diff --git a/apps/meteor/package.json b/apps/meteor/package.json index b4c4e2815698..0ab44dbafaf9 100644 --- a/apps/meteor/package.json +++ b/apps/meteor/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/meteor", "description": "The Ultimate Open Source WebChat Platform", - "version": "7.1.0-rc.2", + "version": "7.1.0-rc.3", "private": true, "author": { "name": "Rocket.Chat", diff --git a/apps/uikit-playground/CHANGELOG.md b/apps/uikit-playground/CHANGELOG.md index 08cabaf2f77f..3af65479230f 100644 --- a/apps/uikit-playground/CHANGELOG.md +++ b/apps/uikit-playground/CHANGELOG.md @@ -1,5 +1,17 @@ # @rocket.chat/uikit-playground +## 0.6.1-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.3 + - @rocket.chat/fuselage-ui-kit@13.0.0-rc.3 + - @rocket.chat/ui-contexts@13.0.0-rc.3 + - @rocket.chat/ui-avatar@9.0.0-rc.3 +
+ ## 0.6.1-rc.2 ### Patch Changes diff --git a/apps/uikit-playground/package.json b/apps/uikit-playground/package.json index 9b7fcbe37aac..d5f547378eb6 100644 --- a/apps/uikit-playground/package.json +++ b/apps/uikit-playground/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/uikit-playground", "private": true, - "version": "0.6.1-rc.2", + "version": "0.6.1-rc.3", "type": "module", "scripts": { "dev": "vite", diff --git a/ee/apps/account-service/CHANGELOG.md b/ee/apps/account-service/CHANGELOG.md index 97342674e958..4b9a270e6eb8 100644 --- a/ee/apps/account-service/CHANGELOG.md +++ b/ee/apps/account-service/CHANGELOG.md @@ -1,5 +1,19 @@ # @rocket.chat/account-service +## 0.4.10-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.3 + - @rocket.chat/rest-typings@7.1.0-rc.3 + - @rocket.chat/core-services@0.7.2-rc.3 + - @rocket.chat/model-typings@1.1.0-rc.3 + - @rocket.chat/network-broker@0.1.2-rc.3 + - @rocket.chat/models@1.0.1-rc.3 +
+ ## 0.4.10-rc.2 ### Patch Changes diff --git a/ee/apps/account-service/package.json b/ee/apps/account-service/package.json index 892f8b0c38e3..4425ed94ce0f 100644 --- a/ee/apps/account-service/package.json +++ b/ee/apps/account-service/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/account-service", "private": true, - "version": "0.4.10-rc.2", + "version": "0.4.10-rc.3", "description": "Rocket.Chat Account service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/authorization-service/CHANGELOG.md b/ee/apps/authorization-service/CHANGELOG.md index 1ed5ac1d7d1f..8e4e066af759 100644 --- a/ee/apps/authorization-service/CHANGELOG.md +++ b/ee/apps/authorization-service/CHANGELOG.md @@ -1,5 +1,19 @@ # @rocket.chat/authorization-service +## 0.4.10-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.3 + - @rocket.chat/rest-typings@7.1.0-rc.3 + - @rocket.chat/core-services@0.7.2-rc.3 + - @rocket.chat/model-typings@1.1.0-rc.3 + - @rocket.chat/network-broker@0.1.2-rc.3 + - @rocket.chat/models@1.0.1-rc.3 +
+ ## 0.4.10-rc.2 ### Patch Changes diff --git a/ee/apps/authorization-service/package.json b/ee/apps/authorization-service/package.json index b5a17d949dd3..b4af6946364c 100644 --- a/ee/apps/authorization-service/package.json +++ b/ee/apps/authorization-service/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/authorization-service", "private": true, - "version": "0.4.10-rc.2", + "version": "0.4.10-rc.3", "description": "Rocket.Chat Authorization service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/ddp-streamer/CHANGELOG.md b/ee/apps/ddp-streamer/CHANGELOG.md index c6833bf4d563..daa8503dd331 100644 --- a/ee/apps/ddp-streamer/CHANGELOG.md +++ b/ee/apps/ddp-streamer/CHANGELOG.md @@ -1,5 +1,20 @@ # @rocket.chat/ddp-streamer +## 0.3.10-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.3 + - @rocket.chat/rest-typings@7.1.0-rc.3 + - @rocket.chat/core-services@0.7.2-rc.3 + - @rocket.chat/model-typings@1.1.0-rc.3 + - @rocket.chat/network-broker@0.1.2-rc.3 + - @rocket.chat/models@1.0.1-rc.3 + - @rocket.chat/instance-status@0.1.10-rc.3 +
+ ## 0.3.10-rc.2 ### Patch Changes diff --git a/ee/apps/ddp-streamer/package.json b/ee/apps/ddp-streamer/package.json index 4060379936ce..7e321734b8a2 100644 --- a/ee/apps/ddp-streamer/package.json +++ b/ee/apps/ddp-streamer/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/ddp-streamer", "private": true, - "version": "0.3.10-rc.2", + "version": "0.3.10-rc.3", "description": "Rocket.Chat DDP-Streamer service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/omnichannel-transcript/CHANGELOG.md b/ee/apps/omnichannel-transcript/CHANGELOG.md index fb2d06206bc0..42ebfe1d5d2b 100644 --- a/ee/apps/omnichannel-transcript/CHANGELOG.md +++ b/ee/apps/omnichannel-transcript/CHANGELOG.md @@ -1,5 +1,20 @@ # @rocket.chat/omnichannel-transcript +## 0.4.10-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.3 + - @rocket.chat/omnichannel-services@0.3.7-rc.3 + - @rocket.chat/pdf-worker@0.2.7-rc.3 + - @rocket.chat/core-services@0.7.2-rc.3 + - @rocket.chat/model-typings@1.1.0-rc.3 + - @rocket.chat/network-broker@0.1.2-rc.3 + - @rocket.chat/models@1.0.1-rc.3 +
+ ## 0.4.10-rc.2 ### Patch Changes diff --git a/ee/apps/omnichannel-transcript/package.json b/ee/apps/omnichannel-transcript/package.json index 71bd35f06f60..3624056fc253 100644 --- a/ee/apps/omnichannel-transcript/package.json +++ b/ee/apps/omnichannel-transcript/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/omnichannel-transcript", "private": true, - "version": "0.4.10-rc.2", + "version": "0.4.10-rc.3", "description": "Rocket.Chat service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/presence-service/CHANGELOG.md b/ee/apps/presence-service/CHANGELOG.md index 44c845d72c7d..9b9711302002 100644 --- a/ee/apps/presence-service/CHANGELOG.md +++ b/ee/apps/presence-service/CHANGELOG.md @@ -1,5 +1,19 @@ # @rocket.chat/presence-service +## 0.4.10-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.3 + - @rocket.chat/presence@0.2.10-rc.3 + - @rocket.chat/core-services@0.7.2-rc.3 + - @rocket.chat/model-typings@1.1.0-rc.3 + - @rocket.chat/network-broker@0.1.2-rc.3 + - @rocket.chat/models@1.0.1-rc.3 +
+ ## 0.4.10-rc.2 ### Patch Changes diff --git a/ee/apps/presence-service/package.json b/ee/apps/presence-service/package.json index 95d23ec3ed0f..f9cd272e3ea9 100644 --- a/ee/apps/presence-service/package.json +++ b/ee/apps/presence-service/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/presence-service", "private": true, - "version": "0.4.10-rc.2", + "version": "0.4.10-rc.3", "description": "Rocket.Chat Presence service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/queue-worker/CHANGELOG.md b/ee/apps/queue-worker/CHANGELOG.md index 2a3191e134be..ca08d11b9cce 100644 --- a/ee/apps/queue-worker/CHANGELOG.md +++ b/ee/apps/queue-worker/CHANGELOG.md @@ -1,5 +1,19 @@ # @rocket.chat/queue-worker +## 0.4.10-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.3 + - @rocket.chat/omnichannel-services@0.3.7-rc.3 + - @rocket.chat/core-services@0.7.2-rc.3 + - @rocket.chat/model-typings@1.1.0-rc.3 + - @rocket.chat/network-broker@0.1.2-rc.3 + - @rocket.chat/models@1.0.1-rc.3 +
+ ## 0.4.10-rc.2 ### Patch Changes diff --git a/ee/apps/queue-worker/package.json b/ee/apps/queue-worker/package.json index b0430de6b21c..1dbbc7e9cefc 100644 --- a/ee/apps/queue-worker/package.json +++ b/ee/apps/queue-worker/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/queue-worker", "private": true, - "version": "0.4.10-rc.2", + "version": "0.4.10-rc.3", "description": "Rocket.Chat service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/stream-hub-service/CHANGELOG.md b/ee/apps/stream-hub-service/CHANGELOG.md index 118c56a24f58..e34f438955b1 100644 --- a/ee/apps/stream-hub-service/CHANGELOG.md +++ b/ee/apps/stream-hub-service/CHANGELOG.md @@ -1,5 +1,18 @@ # @rocket.chat/stream-hub-service +## 0.4.10-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.3 + - @rocket.chat/core-services@0.7.2-rc.3 + - @rocket.chat/model-typings@1.1.0-rc.3 + - @rocket.chat/network-broker@0.1.2-rc.3 + - @rocket.chat/models@1.0.1-rc.3 +
+ ## 0.4.10-rc.2 ### Patch Changes diff --git a/ee/apps/stream-hub-service/package.json b/ee/apps/stream-hub-service/package.json index bef31b7c077e..1916b0ee0be0 100644 --- a/ee/apps/stream-hub-service/package.json +++ b/ee/apps/stream-hub-service/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/stream-hub-service", "private": true, - "version": "0.4.10-rc.2", + "version": "0.4.10-rc.3", "description": "Rocket.Chat Stream Hub service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/packages/license/CHANGELOG.md b/ee/packages/license/CHANGELOG.md index 12c4833f90f9..41df0b012794 100644 --- a/ee/packages/license/CHANGELOG.md +++ b/ee/packages/license/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/license +## 1.0.1-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.3 +
+ ## 1.0.1-rc.2 ### Patch Changes diff --git a/ee/packages/license/package.json b/ee/packages/license/package.json index 78bc10b1ee73..b6e49aed9f7e 100644 --- a/ee/packages/license/package.json +++ b/ee/packages/license/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/license", - "version": "1.0.1-rc.2", + "version": "1.0.1-rc.3", "private": true, "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", diff --git a/ee/packages/network-broker/CHANGELOG.md b/ee/packages/network-broker/CHANGELOG.md index dcf8f7596a8e..aa35a40400ce 100644 --- a/ee/packages/network-broker/CHANGELOG.md +++ b/ee/packages/network-broker/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/network-broker +## 0.1.2-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-services@0.7.2-rc.3 +
+ ## 0.1.2-rc.2 ### Patch Changes diff --git a/ee/packages/network-broker/package.json b/ee/packages/network-broker/package.json index d9b0b552fa15..593086c6201b 100644 --- a/ee/packages/network-broker/package.json +++ b/ee/packages/network-broker/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/network-broker", - "version": "0.1.2-rc.2", + "version": "0.1.2-rc.3", "private": true, "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", diff --git a/ee/packages/omnichannel-services/CHANGELOG.md b/ee/packages/omnichannel-services/CHANGELOG.md index ca2c6e8b215e..c5fda02c03f6 100644 --- a/ee/packages/omnichannel-services/CHANGELOG.md +++ b/ee/packages/omnichannel-services/CHANGELOG.md @@ -1,5 +1,19 @@ # @rocket.chat/omnichannel-services +## 0.3.7-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.3 + - @rocket.chat/rest-typings@7.1.0-rc.3 + - @rocket.chat/pdf-worker@0.2.7-rc.3 + - @rocket.chat/core-services@0.7.2-rc.3 + - @rocket.chat/model-typings@1.1.0-rc.3 + - @rocket.chat/models@1.0.1-rc.3 +
+ ## 0.3.7-rc.2 ### Patch Changes diff --git a/ee/packages/omnichannel-services/package.json b/ee/packages/omnichannel-services/package.json index 5932171a9ae4..22eb0253e43b 100644 --- a/ee/packages/omnichannel-services/package.json +++ b/ee/packages/omnichannel-services/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/omnichannel-services", - "version": "0.3.7-rc.2", + "version": "0.3.7-rc.3", "private": true, "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", diff --git a/ee/packages/pdf-worker/CHANGELOG.md b/ee/packages/pdf-worker/CHANGELOG.md index cc7aba231514..329418c2c806 100644 --- a/ee/packages/pdf-worker/CHANGELOG.md +++ b/ee/packages/pdf-worker/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/pdf-worker +## 0.2.7-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.3 +
+ ## 0.2.7-rc.2 ### Patch Changes diff --git a/ee/packages/pdf-worker/package.json b/ee/packages/pdf-worker/package.json index 76e60e18b738..0156178796cd 100644 --- a/ee/packages/pdf-worker/package.json +++ b/ee/packages/pdf-worker/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/pdf-worker", - "version": "0.2.7-rc.2", + "version": "0.2.7-rc.3", "private": true, "main": "./dist/index.js", "typings": "./dist/index.d.ts", diff --git a/ee/packages/presence/CHANGELOG.md b/ee/packages/presence/CHANGELOG.md index 86ec5fedf24d..29b2e44c0469 100644 --- a/ee/packages/presence/CHANGELOG.md +++ b/ee/packages/presence/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/presence +## 0.2.10-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.3 + - @rocket.chat/core-services@0.7.2-rc.3 + - @rocket.chat/models@1.0.1-rc.3 +
+ ## 0.2.10-rc.2 ### Patch Changes diff --git a/ee/packages/presence/package.json b/ee/packages/presence/package.json index 81a83bbbcceb..785d897a2ae8 100644 --- a/ee/packages/presence/package.json +++ b/ee/packages/presence/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/presence", - "version": "0.2.10-rc.2", + "version": "0.2.10-rc.3", "private": true, "devDependencies": { "@babel/core": "~7.26.0", diff --git a/package.json b/package.json index 2d6850baa50b..6f714c6ba20d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rocket.chat", - "version": "7.1.0-rc.2", + "version": "7.1.0-rc.3", "description": "Rocket.Chat Monorepo", "main": "index.js", "private": true, diff --git a/packages/api-client/CHANGELOG.md b/packages/api-client/CHANGELOG.md index e30d88b054e4..19aa5dcf3999 100644 --- a/packages/api-client/CHANGELOG.md +++ b/packages/api-client/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/api-client +## 0.2.10-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.3 + - @rocket.chat/rest-typings@7.1.0-rc.3 +
+ ## 0.2.10-rc.2 ### Patch Changes diff --git a/packages/api-client/package.json b/packages/api-client/package.json index 95a3044606f6..ce927f338b9c 100644 --- a/packages/api-client/package.json +++ b/packages/api-client/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/api-client", - "version": "0.2.10-rc.2", + "version": "0.2.10-rc.3", "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", "@types/jest": "~29.5.14", diff --git a/packages/apps/CHANGELOG.md b/packages/apps/CHANGELOG.md index 8f74abf9e6e1..f76acaa59c99 100644 --- a/packages/apps/CHANGELOG.md +++ b/packages/apps/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/apps +## 0.2.1-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.3 + - @rocket.chat/model-typings@1.1.0-rc.3 +
+ ## 0.2.1-rc.2 ### Patch Changes diff --git a/packages/apps/package.json b/packages/apps/package.json index c942184783fc..ed52e9b4537a 100644 --- a/packages/apps/package.json +++ b/packages/apps/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/apps", - "version": "0.2.1-rc.2", + "version": "0.2.1-rc.3", "private": true, "devDependencies": { "eslint": "~8.45.0", diff --git a/packages/core-services/CHANGELOG.md b/packages/core-services/CHANGELOG.md index 293198d3de86..677775b6d1b6 100644 --- a/packages/core-services/CHANGELOG.md +++ b/packages/core-services/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/core-services +## 0.7.2-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.3 + - @rocket.chat/rest-typings@7.1.0-rc.3 + - @rocket.chat/models@1.0.1-rc.3 +
+ ## 0.7.2-rc.2 ### Patch Changes diff --git a/packages/core-services/package.json b/packages/core-services/package.json index ec967c9b3bc8..d5cde551a465 100644 --- a/packages/core-services/package.json +++ b/packages/core-services/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/core-services", - "version": "0.7.2-rc.2", + "version": "0.7.2-rc.3", "private": true, "devDependencies": { "@babel/core": "~7.26.0", diff --git a/packages/core-typings/CHANGELOG.md b/packages/core-typings/CHANGELOG.md index 3642882839f3..6344028c9624 100644 --- a/packages/core-typings/CHANGELOG.md +++ b/packages/core-typings/CHANGELOG.md @@ -1,5 +1,7 @@ # @rocket.chat/core-typings +## 7.1.0-rc.3 + ## 7.1.0-rc.2 ## 7.1.0-rc.1 diff --git a/packages/core-typings/package.json b/packages/core-typings/package.json index 2272c3732fac..a023ab119c88 100644 --- a/packages/core-typings/package.json +++ b/packages/core-typings/package.json @@ -2,7 +2,7 @@ "$schema": "https://json.schemastore.org/package", "name": "@rocket.chat/core-typings", "private": true, - "version": "7.1.0-rc.2", + "version": "7.1.0-rc.3", "devDependencies": { "@rocket.chat/apps-engine": "workspace:^", "@rocket.chat/eslint-config": "workspace:^", diff --git a/packages/cron/CHANGELOG.md b/packages/cron/CHANGELOG.md index bb4f0775ffb9..e2bad580f395 100644 --- a/packages/cron/CHANGELOG.md +++ b/packages/cron/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/cron +## 0.1.10-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.3 + - @rocket.chat/models@1.0.1-rc.3 +
+ ## 0.1.10-rc.2 ### Patch Changes diff --git a/packages/cron/package.json b/packages/cron/package.json index 11d4fef7b2c7..9a35103c9e0a 100644 --- a/packages/cron/package.json +++ b/packages/cron/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/cron", - "version": "0.1.10-rc.2", + "version": "0.1.10-rc.3", "private": true, "devDependencies": { "eslint": "~8.45.0", diff --git a/packages/ddp-client/CHANGELOG.md b/packages/ddp-client/CHANGELOG.md index 9fdeb4eb4b92..24c8e539bb6e 100644 --- a/packages/ddp-client/CHANGELOG.md +++ b/packages/ddp-client/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/ddp-client +## 0.3.10-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.3 + - @rocket.chat/rest-typings@7.1.0-rc.3 + - @rocket.chat/api-client@0.2.10-rc.3 +
+ ## 0.3.10-rc.2 ### Patch Changes diff --git a/packages/ddp-client/package.json b/packages/ddp-client/package.json index af83865e7a29..c95f20b4dd35 100644 --- a/packages/ddp-client/package.json +++ b/packages/ddp-client/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ddp-client", - "version": "0.3.10-rc.2", + "version": "0.3.10-rc.3", "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", "@types/jest": "~29.5.14", diff --git a/packages/freeswitch/CHANGELOG.md b/packages/freeswitch/CHANGELOG.md index 09e71a92d1ef..124bb14947e6 100644 --- a/packages/freeswitch/CHANGELOG.md +++ b/packages/freeswitch/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/freeswitch +## 1.0.1-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.3 +
+ ## 1.0.1-rc.2 ### Patch Changes diff --git a/packages/freeswitch/package.json b/packages/freeswitch/package.json index 6be878f4d97d..564b6501017a 100644 --- a/packages/freeswitch/package.json +++ b/packages/freeswitch/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/freeswitch", - "version": "1.0.1-rc.2", + "version": "1.0.1-rc.3", "private": true, "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", diff --git a/packages/fuselage-ui-kit/CHANGELOG.md b/packages/fuselage-ui-kit/CHANGELOG.md index dcdd23a60afb..617360c0c5b5 100644 --- a/packages/fuselage-ui-kit/CHANGELOG.md +++ b/packages/fuselage-ui-kit/CHANGELOG.md @@ -1,5 +1,18 @@ # Change Log +## 13.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.3 + - @rocket.chat/gazzodown@13.0.0-rc.3 + - @rocket.chat/ui-contexts@13.0.0-rc.3 + - @rocket.chat/ui-avatar@9.0.0-rc.3 + - @rocket.chat/ui-video-conf@13.0.0-rc.3 +
+ ## 13.0.0-rc.2 ### Patch Changes diff --git a/packages/fuselage-ui-kit/package.json b/packages/fuselage-ui-kit/package.json index 5af72d71f45c..c90c2a245329 100644 --- a/packages/fuselage-ui-kit/package.json +++ b/packages/fuselage-ui-kit/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/fuselage-ui-kit", - "version": "13.0.0-rc.2", + "version": "13.0.0-rc.3", "private": true, "description": "UiKit elements for Rocket.Chat Apps built under Fuselage design system", "homepage": "https://rocketchat.github.io/Rocket.Chat.Fuselage/", @@ -101,10 +101,10 @@ "@rocket.chat/icons": "*", "@rocket.chat/prettier-config": "*", "@rocket.chat/styled": "*", - "@rocket.chat/ui-avatar": "9.0.0-rc.2", - "@rocket.chat/ui-contexts": "13.0.0-rc.2", + "@rocket.chat/ui-avatar": "9.0.0-rc.3", + "@rocket.chat/ui-contexts": "13.0.0-rc.3", "@rocket.chat/ui-kit": "0.37.0", - "@rocket.chat/ui-video-conf": "13.0.0-rc.2", + "@rocket.chat/ui-video-conf": "13.0.0-rc.3", "@tanstack/react-query": "*", "react": "~17.0.2", "react-dom": "*" diff --git a/packages/gazzodown/CHANGELOG.md b/packages/gazzodown/CHANGELOG.md index 3e1ae8a6409d..11e84a0e093e 100644 --- a/packages/gazzodown/CHANGELOG.md +++ b/packages/gazzodown/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/gazzodown +## 13.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.3 + - @rocket.chat/ui-contexts@13.0.0-rc.3 + - @rocket.chat/ui-client@13.0.0-rc.3 +
+ ## 13.0.0-rc.2 ### Patch Changes diff --git a/packages/gazzodown/package.json b/packages/gazzodown/package.json index 4dbaa574e667..dc50f83b46d6 100644 --- a/packages/gazzodown/package.json +++ b/packages/gazzodown/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/gazzodown", - "version": "13.0.0-rc.2", + "version": "13.0.0-rc.3", "private": true, "main": "./dist/index.js", "typings": "./dist/index.d.ts", @@ -74,8 +74,8 @@ "@rocket.chat/fuselage-tokens": "*", "@rocket.chat/message-parser": "0.31.31", "@rocket.chat/styled": "*", - "@rocket.chat/ui-client": "13.0.0-rc.2", - "@rocket.chat/ui-contexts": "13.0.0-rc.2", + "@rocket.chat/ui-client": "13.0.0-rc.3", + "@rocket.chat/ui-contexts": "13.0.0-rc.3", "katex": "*", "react": "*" }, diff --git a/packages/instance-status/CHANGELOG.md b/packages/instance-status/CHANGELOG.md index d7a457cc3675..602f5c9e2153 100644 --- a/packages/instance-status/CHANGELOG.md +++ b/packages/instance-status/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/instance-status +## 0.1.10-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/models@1.0.1-rc.3 +
+ ## 0.1.10-rc.2 ### Patch Changes diff --git a/packages/instance-status/package.json b/packages/instance-status/package.json index 1429f2456c5f..f099b52f8166 100644 --- a/packages/instance-status/package.json +++ b/packages/instance-status/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/instance-status", - "version": "0.1.10-rc.2", + "version": "0.1.10-rc.3", "private": true, "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", diff --git a/packages/livechat/CHANGELOG.md b/packages/livechat/CHANGELOG.md index d0d94c96c120..b2d139ae0341 100644 --- a/packages/livechat/CHANGELOG.md +++ b/packages/livechat/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/livechat Change Log +## 1.21.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/gazzodown@13.0.0-rc.3 +
+ ## 1.21.0-rc.2 ### Patch Changes diff --git a/packages/livechat/package.json b/packages/livechat/package.json index 97e68aea1fb8..98c9fd14bb01 100644 --- a/packages/livechat/package.json +++ b/packages/livechat/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/livechat", - "version": "1.21.0-rc.2", + "version": "1.21.0-rc.3", "files": [ "/build" ], diff --git a/packages/model-typings/CHANGELOG.md b/packages/model-typings/CHANGELOG.md index f23b0930f168..f2b4bb71bba7 100644 --- a/packages/model-typings/CHANGELOG.md +++ b/packages/model-typings/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/model-typings +## 1.1.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.3 +
+ ## 1.1.0-rc.2 ### Patch Changes diff --git a/packages/model-typings/package.json b/packages/model-typings/package.json index 293ddf3594b0..77cb7b3080d5 100644 --- a/packages/model-typings/package.json +++ b/packages/model-typings/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/model-typings", - "version": "1.1.0-rc.2", + "version": "1.1.0-rc.3", "private": true, "devDependencies": { "@types/node-rsa": "^1.1.4", diff --git a/packages/models/CHANGELOG.md b/packages/models/CHANGELOG.md index 439a41522cea..0625e11c457a 100644 --- a/packages/models/CHANGELOG.md +++ b/packages/models/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/models +## 1.0.1-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/model-typings@1.1.0-rc.3 +
+ ## 1.0.1-rc.2 ### Patch Changes diff --git a/packages/models/package.json b/packages/models/package.json index 794dcbc64a36..ac5e90755c8b 100644 --- a/packages/models/package.json +++ b/packages/models/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/models", - "version": "1.0.1-rc.2", + "version": "1.0.1-rc.3", "private": true, "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", diff --git a/packages/rest-typings/CHANGELOG.md b/packages/rest-typings/CHANGELOG.md index a0a18f27a36a..f644ea8143df 100644 --- a/packages/rest-typings/CHANGELOG.md +++ b/packages/rest-typings/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/rest-typings +## 7.1.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.3 +
+ ## 7.1.0-rc.2 ### Patch Changes diff --git a/packages/rest-typings/package.json b/packages/rest-typings/package.json index 995bef4404d2..6cf2fbfa1592 100644 --- a/packages/rest-typings/package.json +++ b/packages/rest-typings/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/rest-typings", - "version": "7.1.0-rc.2", + "version": "7.1.0-rc.3", "devDependencies": { "@rocket.chat/apps-engine": "workspace:^", "@rocket.chat/eslint-config": "workspace:~", diff --git a/packages/ui-avatar/CHANGELOG.md b/packages/ui-avatar/CHANGELOG.md index e4d0bd2c7201..bf9718796ce8 100644 --- a/packages/ui-avatar/CHANGELOG.md +++ b/packages/ui-avatar/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/ui-avatar +## 9.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@13.0.0-rc.3 +
+ ## 9.0.0-rc.2 ### Patch Changes diff --git a/packages/ui-avatar/package.json b/packages/ui-avatar/package.json index 928dca3f3153..cb97ac0c5e88 100644 --- a/packages/ui-avatar/package.json +++ b/packages/ui-avatar/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-avatar", - "version": "9.0.0-rc.2", + "version": "9.0.0-rc.3", "private": true, "devDependencies": { "@babel/core": "~7.26.0", @@ -30,7 +30,7 @@ ], "peerDependencies": { "@rocket.chat/fuselage": "*", - "@rocket.chat/ui-contexts": "13.0.0-rc.2", + "@rocket.chat/ui-contexts": "13.0.0-rc.3", "react": "~17.0.2" }, "volta": { diff --git a/packages/ui-client/CHANGELOG.md b/packages/ui-client/CHANGELOG.md index 90f8116f9db0..acf2f42f549f 100644 --- a/packages/ui-client/CHANGELOG.md +++ b/packages/ui-client/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/ui-client +## 13.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@13.0.0-rc.3 + - @rocket.chat/ui-avatar@9.0.0-rc.3 +
+ ## 13.0.0-rc.2 ### Patch Changes diff --git a/packages/ui-client/package.json b/packages/ui-client/package.json index aa2024c9bc1c..9f4e15b91db7 100644 --- a/packages/ui-client/package.json +++ b/packages/ui-client/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-client", - "version": "13.0.0-rc.2", + "version": "13.0.0-rc.3", "private": true, "main": "./dist/index.js", "typings": "./dist/index.d.ts", @@ -60,8 +60,8 @@ "@rocket.chat/fuselage": "*", "@rocket.chat/fuselage-hooks": "*", "@rocket.chat/icons": "*", - "@rocket.chat/ui-avatar": "9.0.0-rc.2", - "@rocket.chat/ui-contexts": "13.0.0-rc.2", + "@rocket.chat/ui-avatar": "9.0.0-rc.3", + "@rocket.chat/ui-contexts": "13.0.0-rc.3", "react": "*", "react-i18next": "*" }, diff --git a/packages/ui-contexts/CHANGELOG.md b/packages/ui-contexts/CHANGELOG.md index 89b053d31188..5fa8ebc9d448 100644 --- a/packages/ui-contexts/CHANGELOG.md +++ b/packages/ui-contexts/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/ui-contexts +## 13.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.1.0-rc.3 + - @rocket.chat/rest-typings@7.1.0-rc.3 + - @rocket.chat/ddp-client@0.3.10-rc.3 +
+ ## 13.0.0-rc.2 ### Patch Changes diff --git a/packages/ui-contexts/package.json b/packages/ui-contexts/package.json index 8f3f6d0e9a31..bcc7272f2238 100644 --- a/packages/ui-contexts/package.json +++ b/packages/ui-contexts/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-contexts", - "version": "13.0.0-rc.2", + "version": "13.0.0-rc.3", "private": true, "devDependencies": { "@rocket.chat/core-typings": "workspace:^", diff --git a/packages/ui-video-conf/CHANGELOG.md b/packages/ui-video-conf/CHANGELOG.md index 1886aa52f218..bc2a4ce4f775 100644 --- a/packages/ui-video-conf/CHANGELOG.md +++ b/packages/ui-video-conf/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/ui-video-conf +## 13.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@13.0.0-rc.3 + - @rocket.chat/ui-avatar@9.0.0-rc.3 +
+ ## 13.0.0-rc.2 ### Patch Changes diff --git a/packages/ui-video-conf/package.json b/packages/ui-video-conf/package.json index 19770dacac5b..5326be681132 100644 --- a/packages/ui-video-conf/package.json +++ b/packages/ui-video-conf/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-video-conf", - "version": "13.0.0-rc.2", + "version": "13.0.0-rc.3", "private": true, "main": "./dist/index.js", "typings": "./dist/index.d.ts", @@ -58,8 +58,8 @@ "@rocket.chat/fuselage-hooks": "*", "@rocket.chat/icons": "*", "@rocket.chat/styled": "*", - "@rocket.chat/ui-avatar": "9.0.0-rc.2", - "@rocket.chat/ui-contexts": "13.0.0-rc.2", + "@rocket.chat/ui-avatar": "9.0.0-rc.3", + "@rocket.chat/ui-contexts": "13.0.0-rc.3", "react": "~17.0.2", "react-dom": "^17.0.2" }, diff --git a/packages/ui-voip/CHANGELOG.md b/packages/ui-voip/CHANGELOG.md index 15f837b16901..2ad4ce6c8c54 100644 --- a/packages/ui-voip/CHANGELOG.md +++ b/packages/ui-voip/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/ui-voip +## 3.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@13.0.0-rc.3 + - @rocket.chat/ui-avatar@9.0.0-rc.3 + - @rocket.chat/ui-client@13.0.0-rc.3 +
+ ## 3.0.0-rc.2 ### Patch Changes diff --git a/packages/ui-voip/package.json b/packages/ui-voip/package.json index 6c557c40f986..347b8a33b792 100644 --- a/packages/ui-voip/package.json +++ b/packages/ui-voip/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-voip", - "version": "3.0.0-rc.2", + "version": "3.0.0-rc.3", "private": true, "main": "./dist/index.js", "typings": "./dist/index.d.ts", @@ -67,9 +67,9 @@ "@rocket.chat/fuselage-hooks": "*", "@rocket.chat/icons": "*", "@rocket.chat/styled": "*", - "@rocket.chat/ui-avatar": "9.0.0-rc.2", - "@rocket.chat/ui-client": "13.0.0-rc.2", - "@rocket.chat/ui-contexts": "13.0.0-rc.2", + "@rocket.chat/ui-avatar": "9.0.0-rc.3", + "@rocket.chat/ui-client": "13.0.0-rc.3", + "@rocket.chat/ui-contexts": "13.0.0-rc.3", "react": "~17.0.2", "react-aria": "~3.23.1", "react-dom": "^17.0.2" diff --git a/packages/web-ui-registration/CHANGELOG.md b/packages/web-ui-registration/CHANGELOG.md index c900b65a07e7..ae188c817a85 100644 --- a/packages/web-ui-registration/CHANGELOG.md +++ b/packages/web-ui-registration/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/web-ui-registration +## 13.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@13.0.0-rc.3 +
+ ## 13.0.0-rc.2 ### Patch Changes diff --git a/packages/web-ui-registration/package.json b/packages/web-ui-registration/package.json index ec5bf544bf8f..cdd86f0c08dc 100644 --- a/packages/web-ui-registration/package.json +++ b/packages/web-ui-registration/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/web-ui-registration", - "version": "13.0.0-rc.2", + "version": "13.0.0-rc.3", "private": true, "homepage": "https://rocket.chat", "main": "./dist/index.js", @@ -49,7 +49,7 @@ "peerDependencies": { "@rocket.chat/layout": "*", "@rocket.chat/tools": "0.2.2", - "@rocket.chat/ui-contexts": "13.0.0-rc.2", + "@rocket.chat/ui-contexts": "13.0.0-rc.3", "@tanstack/react-query": "*", "react": "*", "react-hook-form": "*", diff --git a/yarn.lock b/yarn.lock index 8bfd8551d0ae..354d4728a1ad 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8765,10 +8765,10 @@ __metadata: "@rocket.chat/icons": "*" "@rocket.chat/prettier-config": "*" "@rocket.chat/styled": "*" - "@rocket.chat/ui-avatar": 9.0.0-rc.1 - "@rocket.chat/ui-contexts": 13.0.0-rc.1 + "@rocket.chat/ui-avatar": 9.0.0-rc.2 + "@rocket.chat/ui-contexts": 13.0.0-rc.2 "@rocket.chat/ui-kit": 0.37.0 - "@rocket.chat/ui-video-conf": 13.0.0-rc.1 + "@rocket.chat/ui-video-conf": 13.0.0-rc.2 "@tanstack/react-query": "*" react: ~17.0.2 react-dom: "*" @@ -8853,8 +8853,8 @@ __metadata: "@rocket.chat/fuselage-tokens": "*" "@rocket.chat/message-parser": 0.31.31 "@rocket.chat/styled": "*" - "@rocket.chat/ui-client": 13.0.0-rc.1 - "@rocket.chat/ui-contexts": 13.0.0-rc.1 + "@rocket.chat/ui-client": 13.0.0-rc.2 + "@rocket.chat/ui-contexts": 13.0.0-rc.2 katex: "*" react: "*" languageName: unknown @@ -10089,7 +10089,7 @@ __metadata: typescript: "npm:~5.6.3" peerDependencies: "@rocket.chat/fuselage": "*" - "@rocket.chat/ui-contexts": 13.0.0-rc.1 + "@rocket.chat/ui-contexts": 13.0.0-rc.2 react: ~17.0.2 languageName: unknown linkType: soft @@ -10139,8 +10139,8 @@ __metadata: "@rocket.chat/fuselage": "*" "@rocket.chat/fuselage-hooks": "*" "@rocket.chat/icons": "*" - "@rocket.chat/ui-avatar": 9.0.0-rc.1 - "@rocket.chat/ui-contexts": 13.0.0-rc.1 + "@rocket.chat/ui-avatar": 9.0.0-rc.2 + "@rocket.chat/ui-contexts": 13.0.0-rc.2 react: "*" react-i18next: "*" languageName: unknown @@ -10310,8 +10310,8 @@ __metadata: "@rocket.chat/fuselage-hooks": "*" "@rocket.chat/icons": "*" "@rocket.chat/styled": "*" - "@rocket.chat/ui-avatar": 9.0.0-rc.1 - "@rocket.chat/ui-contexts": 13.0.0-rc.1 + "@rocket.chat/ui-avatar": 9.0.0-rc.2 + "@rocket.chat/ui-contexts": 13.0.0-rc.2 react: ~17.0.2 react-dom: ^17.0.2 languageName: unknown @@ -10367,9 +10367,9 @@ __metadata: "@rocket.chat/fuselage-hooks": "*" "@rocket.chat/icons": "*" "@rocket.chat/styled": "*" - "@rocket.chat/ui-avatar": 9.0.0-rc.1 - "@rocket.chat/ui-client": 13.0.0-rc.1 - "@rocket.chat/ui-contexts": 13.0.0-rc.1 + "@rocket.chat/ui-avatar": 9.0.0-rc.2 + "@rocket.chat/ui-client": 13.0.0-rc.2 + "@rocket.chat/ui-contexts": 13.0.0-rc.2 react: ~17.0.2 react-aria: ~3.23.1 react-dom: ^17.0.2 @@ -10457,7 +10457,7 @@ __metadata: peerDependencies: "@rocket.chat/layout": "*" "@rocket.chat/tools": 0.2.2 - "@rocket.chat/ui-contexts": 13.0.0-rc.1 + "@rocket.chat/ui-contexts": 13.0.0-rc.2 "@tanstack/react-query": "*" react: "*" react-hook-form: "*" From 73af9c5375c8851fccfeef8fbfbb8b62b595c253 Mon Sep 17 00:00:00 2001 From: rocketchat-github-ci Date: Wed, 4 Dec 2024 00:23:03 +0000 Subject: [PATCH 05/28] Release 7.1.0 [no ci] --- .changeset/bump-patch-1732728542480.md | 5 - .changeset/bump-patch-1732835767114.md | 5 - .changeset/bump-patch-1733170421495.md | 5 - .changeset/clean-flies-collect.md | 5 - .changeset/curvy-flies-greet.md | 5 - .changeset/fair-colts-remain.md | 13 -- .changeset/forty-gorillas-kneel.md | 6 - .changeset/friendly-ravens-teach.md | 5 - .changeset/green-papayas-thank.md | 7 -- .changeset/happy-stingrays-provide.md | 5 - .changeset/honest-pumpkins-joke.md | 5 - .changeset/lazy-avocados-whisper.md | 6 - .changeset/lemon-foxes-carry.md | 6 - .changeset/light-terms-ring.md | 5 - .changeset/mean-cobras-sneeze.md | 6 - .changeset/metal-avocados-serve.md | 5 - .changeset/neat-flies-drive.md | 5 - .changeset/nervous-rivers-fry.md | 6 - .changeset/old-coins-bow.md | 5 - .changeset/pink-dodos-greet.md | 5 - .changeset/plenty-snakes-dream.md | 5 - .changeset/popular-queens-brake.md | 17 --- .changeset/pre.json | 113 ----------------- .changeset/real-jeans-worry.md | 5 - .changeset/serious-mice-film.md | 5 - .changeset/seven-berries-check.md | 6 - .changeset/seven-otters-fold.md | 5 - .changeset/silent-steaks-happen.md | 6 - .changeset/smart-radios-reflect.md | 6 - .changeset/spicy-spiders-search.md | 5 - .changeset/spotty-ads-knock.md | 5 - .changeset/stale-actors-enjoy.md | 5 - .changeset/sweet-needles-melt.md | 5 - .changeset/swift-suns-perform.md | 5 - .changeset/three-dragons-brush.md | 8 -- .changeset/tricky-trees-destroy.md | 4 - .changeset/twelve-horses-suffer.md | 6 - .changeset/twenty-news-own.md | 6 - .changeset/two-guests-tan.md | 5 - .changeset/unlucky-kangaroos-yawn.md | 6 - .changeset/unlucky-wasps-check.md | 5 - .changeset/weak-trees-exercise.md | 5 - apps/meteor/CHANGELOG.md | 117 ++++++++++++++++++ apps/meteor/app/utils/rocketchat.info | 2 +- apps/meteor/ee/server/services/CHANGELOG.md | 17 +++ apps/meteor/ee/server/services/package.json | 2 +- apps/meteor/package.json | 2 +- apps/uikit-playground/CHANGELOG.md | 12 ++ apps/uikit-playground/package.json | 2 +- ee/apps/account-service/CHANGELOG.md | 16 +++ ee/apps/account-service/package.json | 2 +- ee/apps/authorization-service/CHANGELOG.md | 16 +++ ee/apps/authorization-service/package.json | 2 +- ee/apps/ddp-streamer/CHANGELOG.md | 17 +++ ee/apps/ddp-streamer/package.json | 2 +- ee/apps/omnichannel-transcript/CHANGELOG.md | 17 +++ ee/apps/omnichannel-transcript/package.json | 2 +- ee/apps/presence-service/CHANGELOG.md | 16 +++ ee/apps/presence-service/package.json | 2 +- ee/apps/queue-worker/CHANGELOG.md | 16 +++ ee/apps/queue-worker/package.json | 2 +- ee/apps/stream-hub-service/CHANGELOG.md | 15 +++ ee/apps/stream-hub-service/package.json | 2 +- ee/packages/license/CHANGELOG.md | 9 ++ ee/packages/license/package.json | 2 +- ee/packages/network-broker/CHANGELOG.md | 9 ++ ee/packages/network-broker/package.json | 2 +- ee/packages/omnichannel-services/CHANGELOG.md | 14 +++ ee/packages/omnichannel-services/package.json | 2 +- ee/packages/pdf-worker/CHANGELOG.md | 9 ++ ee/packages/pdf-worker/package.json | 2 +- ee/packages/presence/CHANGELOG.md | 11 ++ ee/packages/presence/package.json | 2 +- package.json | 2 +- packages/api-client/CHANGELOG.md | 10 ++ packages/api-client/package.json | 2 +- packages/apps-engine/CHANGELOG.md | 26 ++++ packages/apps-engine/package.json | 2 +- packages/apps/CHANGELOG.md | 11 ++ packages/apps/package.json | 2 +- packages/core-services/CHANGELOG.md | 13 ++ packages/core-services/package.json | 2 +- packages/core-typings/CHANGELOG.md | 17 +++ packages/core-typings/package.json | 2 +- packages/cron/CHANGELOG.md | 10 ++ packages/cron/package.json | 2 +- packages/ddp-client/CHANGELOG.md | 11 ++ packages/ddp-client/package.json | 2 +- packages/freeswitch/CHANGELOG.md | 9 ++ packages/freeswitch/package.json | 2 +- packages/fuselage-ui-kit/CHANGELOG.md | 14 +++ packages/fuselage-ui-kit/package.json | 10 +- packages/gazzodown/CHANGELOG.md | 11 ++ packages/gazzodown/package.json | 6 +- packages/i18n/CHANGELOG.md | 30 +++++ packages/i18n/package.json | 2 +- packages/instance-status/CHANGELOG.md | 9 ++ packages/instance-status/package.json | 2 +- packages/livechat/CHANGELOG.md | 17 +++ packages/livechat/package.json | 2 +- packages/mock-providers/CHANGELOG.md | 9 ++ packages/mock-providers/package.json | 2 +- packages/model-typings/CHANGELOG.md | 22 ++++ packages/model-typings/package.json | 2 +- packages/models/CHANGELOG.md | 9 ++ packages/models/package.json | 2 +- packages/rest-typings/CHANGELOG.md | 22 ++++ packages/rest-typings/package.json | 2 +- packages/ui-avatar/CHANGELOG.md | 9 ++ packages/ui-avatar/package.json | 4 +- packages/ui-client/CHANGELOG.md | 10 ++ packages/ui-client/package.json | 6 +- packages/ui-contexts/CHANGELOG.md | 12 ++ packages/ui-contexts/package.json | 2 +- packages/ui-video-conf/CHANGELOG.md | 10 ++ packages/ui-video-conf/package.json | 6 +- packages/ui-voip/CHANGELOG.md | 11 ++ packages/ui-voip/package.json | 8 +- packages/web-ui-registration/CHANGELOG.md | 9 ++ packages/web-ui-registration/package.json | 4 +- yarn.lock | 28 ++--- 121 files changed, 691 insertions(+), 422 deletions(-) delete mode 100644 .changeset/bump-patch-1732728542480.md delete mode 100644 .changeset/bump-patch-1732835767114.md delete mode 100644 .changeset/bump-patch-1733170421495.md delete mode 100644 .changeset/clean-flies-collect.md delete mode 100644 .changeset/curvy-flies-greet.md delete mode 100644 .changeset/fair-colts-remain.md delete mode 100644 .changeset/forty-gorillas-kneel.md delete mode 100644 .changeset/friendly-ravens-teach.md delete mode 100644 .changeset/green-papayas-thank.md delete mode 100644 .changeset/happy-stingrays-provide.md delete mode 100644 .changeset/honest-pumpkins-joke.md delete mode 100644 .changeset/lazy-avocados-whisper.md delete mode 100644 .changeset/lemon-foxes-carry.md delete mode 100644 .changeset/light-terms-ring.md delete mode 100644 .changeset/mean-cobras-sneeze.md delete mode 100644 .changeset/metal-avocados-serve.md delete mode 100644 .changeset/neat-flies-drive.md delete mode 100644 .changeset/nervous-rivers-fry.md delete mode 100644 .changeset/old-coins-bow.md delete mode 100644 .changeset/pink-dodos-greet.md delete mode 100644 .changeset/plenty-snakes-dream.md delete mode 100644 .changeset/popular-queens-brake.md delete mode 100644 .changeset/pre.json delete mode 100644 .changeset/real-jeans-worry.md delete mode 100644 .changeset/serious-mice-film.md delete mode 100644 .changeset/seven-berries-check.md delete mode 100644 .changeset/seven-otters-fold.md delete mode 100644 .changeset/silent-steaks-happen.md delete mode 100644 .changeset/smart-radios-reflect.md delete mode 100644 .changeset/spicy-spiders-search.md delete mode 100644 .changeset/spotty-ads-knock.md delete mode 100644 .changeset/stale-actors-enjoy.md delete mode 100644 .changeset/sweet-needles-melt.md delete mode 100644 .changeset/swift-suns-perform.md delete mode 100644 .changeset/three-dragons-brush.md delete mode 100644 .changeset/tricky-trees-destroy.md delete mode 100644 .changeset/twelve-horses-suffer.md delete mode 100644 .changeset/twenty-news-own.md delete mode 100644 .changeset/two-guests-tan.md delete mode 100644 .changeset/unlucky-kangaroos-yawn.md delete mode 100644 .changeset/unlucky-wasps-check.md delete mode 100644 .changeset/weak-trees-exercise.md diff --git a/.changeset/bump-patch-1732728542480.md b/.changeset/bump-patch-1732728542480.md deleted file mode 100644 index e1eaa7980afb..000000000000 --- a/.changeset/bump-patch-1732728542480.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/meteor': patch ---- - -Bump @rocket.chat/meteor version. diff --git a/.changeset/bump-patch-1732835767114.md b/.changeset/bump-patch-1732835767114.md deleted file mode 100644 index e1eaa7980afb..000000000000 --- a/.changeset/bump-patch-1732835767114.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/meteor': patch ---- - -Bump @rocket.chat/meteor version. diff --git a/.changeset/bump-patch-1733170421495.md b/.changeset/bump-patch-1733170421495.md deleted file mode 100644 index e1eaa7980afb..000000000000 --- a/.changeset/bump-patch-1733170421495.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/meteor': patch ---- - -Bump @rocket.chat/meteor version. diff --git a/.changeset/clean-flies-collect.md b/.changeset/clean-flies-collect.md deleted file mode 100644 index 4921355b51e8..000000000000 --- a/.changeset/clean-flies-collect.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/meteor': patch ---- - -Fix user highlights not matching only whole words diff --git a/.changeset/curvy-flies-greet.md b/.changeset/curvy-flies-greet.md deleted file mode 100644 index aeac8382b152..000000000000 --- a/.changeset/curvy-flies-greet.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/meteor': patch ---- - -Remove unused client side `setUserActiveStatus` meteor method. diff --git a/.changeset/fair-colts-remain.md b/.changeset/fair-colts-remain.md deleted file mode 100644 index 7ce003e50fd5..000000000000 --- a/.changeset/fair-colts-remain.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -"@rocket.chat/meteor": patch -"@rocket.chat/account-service": patch -"@rocket.chat/authorization-service": patch -"@rocket.chat/ddp-streamer": patch -"@rocket.chat/omnichannel-transcript": patch -"@rocket.chat/presence-service": patch -"@rocket.chat/queue-worker": patch -"@rocket.chat/stream-hub-service": patch -"rocketchat-services": patch ---- - -Bump meteor to 3.0.4 and Node version to 20.18.0 diff --git a/.changeset/forty-gorillas-kneel.md b/.changeset/forty-gorillas-kneel.md deleted file mode 100644 index 42df0ed8c0e4..000000000000 --- a/.changeset/forty-gorillas-kneel.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@rocket.chat/meteor": patch -"@rocket.chat/apps-engine": patch ---- - -Deprecated the `from` field in the apps email bridge and made it optional, using the server's settings when the field is omitted diff --git a/.changeset/friendly-ravens-teach.md b/.changeset/friendly-ravens-teach.md deleted file mode 100644 index 1c464a8679b6..000000000000 --- a/.changeset/friendly-ravens-teach.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/meteor': minor ---- - -adds unread badge to sidebar collapser diff --git a/.changeset/green-papayas-thank.md b/.changeset/green-papayas-thank.md deleted file mode 100644 index 22547db942ef..000000000000 --- a/.changeset/green-papayas-thank.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@rocket.chat/model-typings': patch -'@rocket.chat/core-typings': patch -'@rocket.chat/meteor': patch ---- - -Fixes an issue where updating custom emojis didn’t work as expected, ensuring that uploaded emojis now update correctly and display without any caching problems. diff --git a/.changeset/happy-stingrays-provide.md b/.changeset/happy-stingrays-provide.md deleted file mode 100644 index fba25665133a..000000000000 --- a/.changeset/happy-stingrays-provide.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@rocket.chat/meteor": patch ---- - -Fixes issue that could cause multiple discussions to be created when creating it from a message action diff --git a/.changeset/honest-pumpkins-joke.md b/.changeset/honest-pumpkins-joke.md deleted file mode 100644 index aa1abce9ad6d..000000000000 --- a/.changeset/honest-pumpkins-joke.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/meteor': patch ---- - -adds missing html attributes in sidebar item templates diff --git a/.changeset/lazy-avocados-whisper.md b/.changeset/lazy-avocados-whisper.md deleted file mode 100644 index b1296186c37c..000000000000 --- a/.changeset/lazy-avocados-whisper.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@rocket.chat/meteor": minor -"@rocket.chat/i18n": minor ---- - -Improves thread metrics featuring user avatars, better titles and repositioned elements. diff --git a/.changeset/lemon-foxes-carry.md b/.changeset/lemon-foxes-carry.md deleted file mode 100644 index 7e14dda30747..000000000000 --- a/.changeset/lemon-foxes-carry.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@rocket.chat/meteor": patch -"@rocket.chat/i18n": patch ---- - -Fixes message character limit not being applied to file upload descriptions \ No newline at end of file diff --git a/.changeset/light-terms-ring.md b/.changeset/light-terms-ring.md deleted file mode 100644 index 4437c5c4d596..000000000000 --- a/.changeset/light-terms-ring.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/meteor': patch ---- - -Fixes the issue where newly created teams are incorrectly displayed as channels on the sidebar when the DISABLE_DB_WATCHERS environment variable is enabled diff --git a/.changeset/mean-cobras-sneeze.md b/.changeset/mean-cobras-sneeze.md deleted file mode 100644 index 39717f0c0d89..000000000000 --- a/.changeset/mean-cobras-sneeze.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@rocket.chat/rest-typings': minor -'@rocket.chat/meteor': minor ---- - -Adds cursor pagination on chat.syncMessages endpoint diff --git a/.changeset/metal-avocados-serve.md b/.changeset/metal-avocados-serve.md deleted file mode 100644 index 478407fcb97b..000000000000 --- a/.changeset/metal-avocados-serve.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@rocket.chat/livechat": patch ---- - -Fixes the 'Finish Chat' option in Livechat appearing before the conversation is started, which caused the action to fail. diff --git a/.changeset/neat-flies-drive.md b/.changeset/neat-flies-drive.md deleted file mode 100644 index 27b5270f81f9..000000000000 --- a/.changeset/neat-flies-drive.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/meteor': patch ---- - -Adds a divider on Create team modal - advanced settings diff --git a/.changeset/nervous-rivers-fry.md b/.changeset/nervous-rivers-fry.md deleted file mode 100644 index 278259c53a86..000000000000 --- a/.changeset/nervous-rivers-fry.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@rocket.chat/apps-engine': patch -'@rocket.chat/meteor': patch ---- - -Fixed an issue that would grant network permission to app's processes in wrong cases diff --git a/.changeset/old-coins-bow.md b/.changeset/old-coins-bow.md deleted file mode 100644 index 1790cc205160..000000000000 --- a/.changeset/old-coins-bow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/apps-engine': patch ---- - -Fixes an issue that would cause apps to appear disabled after a subprocess restart diff --git a/.changeset/pink-dodos-greet.md b/.changeset/pink-dodos-greet.md deleted file mode 100644 index f122a2e72fc7..000000000000 --- a/.changeset/pink-dodos-greet.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/meteor': patch ---- - -Fixes sidepanel not replicating sidebar sort preference diff --git a/.changeset/plenty-snakes-dream.md b/.changeset/plenty-snakes-dream.md deleted file mode 100644 index eecbf0cbb466..000000000000 --- a/.changeset/plenty-snakes-dream.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@rocket.chat/meteor": minor ---- - -Adds a new route to allow fetching avatars by the user's id `/avatar/uid/` diff --git a/.changeset/popular-queens-brake.md b/.changeset/popular-queens-brake.md deleted file mode 100644 index 5114920b8fde..000000000000 --- a/.changeset/popular-queens-brake.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -'@rocket.chat/model-typings': minor -'@rocket.chat/core-typings': minor -'@rocket.chat/rest-typings': minor -'@rocket.chat/apps-engine': minor -'@rocket.chat/i18n': minor -'@rocket.chat/meteor': minor ---- - -These changes aims to add: -- A brand-new omnichannel contact profile -- The ability to communicate with known contacts only -- Communicate with verified contacts only -- Merge verified contacts across different channels -- Block contact channels -- Resolve conflicting contact information when registered via different channels -- An advanced contact center filters diff --git a/.changeset/pre.json b/.changeset/pre.json deleted file mode 100644 index 7ef999ab9254..000000000000 --- a/.changeset/pre.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "mode": "pre", - "tag": "rc", - "initialVersions": { - "@rocket.chat/meteor": "7.1.0-develop", - "rocketchat-services": "2.0.0", - "@rocket.chat/uikit-playground": "0.6.0", - "@rocket.chat/account-service": "0.4.9", - "@rocket.chat/authorization-service": "0.4.9", - "@rocket.chat/ddp-streamer": "0.3.9", - "@rocket.chat/omnichannel-transcript": "0.4.9", - "@rocket.chat/presence-service": "0.4.9", - "@rocket.chat/queue-worker": "0.4.9", - "@rocket.chat/stream-hub-service": "0.4.9", - "@rocket.chat/license": "1.0.0", - "@rocket.chat/network-broker": "0.1.1", - "@rocket.chat/omnichannel-services": "0.3.6", - "@rocket.chat/pdf-worker": "0.2.6", - "@rocket.chat/presence": "0.2.9", - "@rocket.chat/ui-theming": "0.4.0", - "@rocket.chat/account-utils": "0.0.2", - "@rocket.chat/agenda": "0.1.0", - "@rocket.chat/api-client": "0.2.9", - "@rocket.chat/apps": "0.2.0", - "@rocket.chat/apps-engine": "1.47.0", - "@rocket.chat/base64": "1.0.13", - "@rocket.chat/cas-validate": "0.0.2", - "@rocket.chat/core-services": "0.7.1", - "@rocket.chat/core-typings": "7.1.0-develop", - "@rocket.chat/cron": "0.1.9", - "@rocket.chat/ddp-client": "0.3.9", - "@rocket.chat/eslint-config": "0.7.0", - "@rocket.chat/favicon": "0.0.2", - "@rocket.chat/freeswitch": "1.0.0", - "@rocket.chat/fuselage-ui-kit": "12.0.0", - "@rocket.chat/gazzodown": "12.0.0", - "@rocket.chat/i18n": "1.0.0", - "@rocket.chat/instance-status": "0.1.9", - "@rocket.chat/jest-presets": "0.0.1", - "@rocket.chat/jwt": "0.1.1", - "@rocket.chat/livechat": "1.20.1", - "@rocket.chat/log-format": "0.0.2", - "@rocket.chat/logger": "0.0.2", - "@rocket.chat/message-parser": "0.31.31", - "@rocket.chat/mock-providers": "0.1.4", - "@rocket.chat/model-typings": "1.0.0", - "@rocket.chat/models": "1.0.0", - "@rocket.chat/poplib": "0.0.2", - "@rocket.chat/password-policies": "0.0.2", - "@rocket.chat/patch-injection": "0.0.1", - "@rocket.chat/peggy-loader": "0.31.27", - "@rocket.chat/random": "1.2.2", - "@rocket.chat/release-action": "2.2.3", - "@rocket.chat/release-changelog": "0.1.0", - "@rocket.chat/rest-typings": "7.1.0-develop", - "@rocket.chat/server-cloud-communication": "0.0.2", - "@rocket.chat/server-fetch": "0.0.3", - "@rocket.chat/sha256": "1.0.10", - "@rocket.chat/tools": "0.2.2", - "@rocket.chat/tracing": "0.0.1", - "@rocket.chat/ui-avatar": "8.0.0", - "@rocket.chat/ui-client": "12.0.0", - "@rocket.chat/ui-composer": "0.4.0", - "@rocket.chat/ui-contexts": "12.0.0", - "@rocket.chat/ui-kit": "0.37.0", - "@rocket.chat/ui-video-conf": "12.0.0", - "@rocket.chat/ui-voip": "2.0.0", - "@rocket.chat/web-ui-registration": "12.0.0" - }, - "changesets": [ - "bump-patch-1732728542480", - "bump-patch-1732835767114", - "bump-patch-1733170421495", - "clean-flies-collect", - "curvy-flies-greet", - "fair-colts-remain", - "forty-gorillas-kneel", - "friendly-ravens-teach", - "green-papayas-thank", - "happy-stingrays-provide", - "honest-pumpkins-joke", - "lazy-avocados-whisper", - "lemon-foxes-carry", - "light-terms-ring", - "mean-cobras-sneeze", - "metal-avocados-serve", - "neat-flies-drive", - "nervous-rivers-fry", - "old-coins-bow", - "pink-dodos-greet", - "plenty-snakes-dream", - "popular-queens-brake", - "real-jeans-worry", - "serious-mice-film", - "seven-berries-check", - "seven-otters-fold", - "silent-steaks-happen", - "smart-radios-reflect", - "spicy-spiders-search", - "spotty-ads-knock", - "stale-actors-enjoy", - "sweet-needles-melt", - "swift-suns-perform", - "three-dragons-brush", - "tricky-trees-destroy", - "twelve-horses-suffer", - "twenty-news-own", - "two-guests-tan", - "unlucky-kangaroos-yawn", - "unlucky-wasps-check", - "weak-trees-exercise" - ] -} diff --git a/.changeset/real-jeans-worry.md b/.changeset/real-jeans-worry.md deleted file mode 100644 index 9b16e7681a98..000000000000 --- a/.changeset/real-jeans-worry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@rocket.chat/meteor": patch ---- - -Fixes banner breaking the UI with specific payloads diff --git a/.changeset/serious-mice-film.md b/.changeset/serious-mice-film.md deleted file mode 100644 index 35a2d6704071..000000000000 --- a/.changeset/serious-mice-film.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/meteor': patch ---- - -Fixes client-side updates for recent emoji list when custom emojis are modified. diff --git a/.changeset/seven-berries-check.md b/.changeset/seven-berries-check.md deleted file mode 100644 index b8cd3c49897f..000000000000 --- a/.changeset/seven-berries-check.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@rocket.chat/meteor": patch -"@rocket.chat/i18n": patch ---- - -Adds "Master volume" and "Call ringer volume" to the user preferences sound section. diff --git a/.changeset/seven-otters-fold.md b/.changeset/seven-otters-fold.md deleted file mode 100644 index 7f2af2075f73..000000000000 --- a/.changeset/seven-otters-fold.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/meteor': patch ---- - -Sends server statistics only once a day despite multiple instance being started at different times. diff --git a/.changeset/silent-steaks-happen.md b/.changeset/silent-steaks-happen.md deleted file mode 100644 index 1ae791c68177..000000000000 --- a/.changeset/silent-steaks-happen.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@rocket.chat/meteor": minor -"@rocket.chat/i18n": minor ---- - -Improves the customizability of the naming of automatic Persistent video calls discussions, allowing the date of the call to be in different parts of the name, using the `[date]` keyword. diff --git a/.changeset/smart-radios-reflect.md b/.changeset/smart-radios-reflect.md deleted file mode 100644 index 58ea7413e51c..000000000000 --- a/.changeset/smart-radios-reflect.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@rocket.chat/meteor": patch -"@rocket.chat/core-services": patch ---- - -stops calling an object through proxy calling getQueueWorker diff --git a/.changeset/spicy-spiders-search.md b/.changeset/spicy-spiders-search.md deleted file mode 100644 index d86bc93313c5..000000000000 --- a/.changeset/spicy-spiders-search.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/meteor': patch ---- - -Fixed an issue where the installed apps list would go stale without a refresh in some cases diff --git a/.changeset/spotty-ads-knock.md b/.changeset/spotty-ads-knock.md deleted file mode 100644 index b40e70b74a98..000000000000 --- a/.changeset/spotty-ads-knock.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/meteor': patch ---- - -Fixes display of emoji aliases in custom emoji list by adding commas between aliases diff --git a/.changeset/stale-actors-enjoy.md b/.changeset/stale-actors-enjoy.md deleted file mode 100644 index baff2b19b667..000000000000 --- a/.changeset/stale-actors-enjoy.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@rocket.chat/meteor": patch ---- - -Fixes `waiting queue` feature. When `Livechat_waiting_queue` setting is enabled, incoming conversations should be sent to the queue instead of being assigned directly. diff --git a/.changeset/sweet-needles-melt.md b/.changeset/sweet-needles-melt.md deleted file mode 100644 index 51cd6e03d831..000000000000 --- a/.changeset/sweet-needles-melt.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/meteor': patch ---- - -Fixes edge case of thread unread not being added to unread group diff --git a/.changeset/swift-suns-perform.md b/.changeset/swift-suns-perform.md deleted file mode 100644 index 2a52249d984c..000000000000 --- a/.changeset/swift-suns-perform.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@rocket.chat/livechat": patch ---- - -Fixes livechat popout mode not working correctly in cross domain situations diff --git a/.changeset/three-dragons-brush.md b/.changeset/three-dragons-brush.md deleted file mode 100644 index d80c4dc83306..000000000000 --- a/.changeset/three-dragons-brush.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@rocket.chat/apps-engine': minor -'@rocket.chat/livechat': minor -'@rocket.chat/i18n': minor -'@rocket.chat/meteor': minor ---- - -Prevent apps' subprocesses from crashing on unhandled rejections or uncaught exceptions diff --git a/.changeset/tricky-trees-destroy.md b/.changeset/tricky-trees-destroy.md deleted file mode 100644 index 3d43cc5b571a..000000000000 --- a/.changeset/tricky-trees-destroy.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -"@rocket.chat/meteor": patch ---- -Adds login and permission validation for resetIrcConnection method diff --git a/.changeset/twelve-horses-suffer.md b/.changeset/twelve-horses-suffer.md deleted file mode 100644 index bc7f7d5b3ba4..000000000000 --- a/.changeset/twelve-horses-suffer.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@rocket.chat/i18n': minor -'@rocket.chat/meteor': minor ---- - -Adds a confirmation modal to the cancel subscription action diff --git a/.changeset/twenty-news-own.md b/.changeset/twenty-news-own.md deleted file mode 100644 index c48d06e0a05e..000000000000 --- a/.changeset/twenty-news-own.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@rocket.chat/meteor": minor -"@rocket.chat/i18n": minor ---- - -Disables the possiblity to upload exempted apps diff --git a/.changeset/two-guests-tan.md b/.changeset/two-guests-tan.md deleted file mode 100644 index ff44f0ef493b..000000000000 --- a/.changeset/two-guests-tan.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/apps-engine': patch ---- - -Removed the 1 second timeout of `Pre` app events. Now they will follow the "global" configuration diff --git a/.changeset/unlucky-kangaroos-yawn.md b/.changeset/unlucky-kangaroos-yawn.md deleted file mode 100644 index 1aaa97cbd8d8..000000000000 --- a/.changeset/unlucky-kangaroos-yawn.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@rocket.chat/meteor": patch -"@rocket.chat/i18n": patch ---- - -Updates VoIP field labels from 'Free Extension Numbers' to 'Available Extensions' to better describe the field's purpose and improve clarity. diff --git a/.changeset/unlucky-wasps-check.md b/.changeset/unlucky-wasps-check.md deleted file mode 100644 index fd7e8af17824..000000000000 --- a/.changeset/unlucky-wasps-check.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/meteor': patch ---- - -Fixes an issue where resizable handler renders over the expanded thread view while using contextualbarResizable feature preview diff --git a/.changeset/weak-trees-exercise.md b/.changeset/weak-trees-exercise.md deleted file mode 100644 index 230c087ccd83..000000000000 --- a/.changeset/weak-trees-exercise.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/apps-engine': minor ---- - -Add support to configure apps runtime timeout via the APPS_ENGINE_RUNTIME_TIMEOUT environment variable diff --git a/apps/meteor/CHANGELOG.md b/apps/meteor/CHANGELOG.md index 179042fce8a9..d5319e745e35 100644 --- a/apps/meteor/CHANGELOG.md +++ b/apps/meteor/CHANGELOG.md @@ -1,5 +1,122 @@ # @rocket.chat/meteor +## 7.1.0 + +### Minor Changes + +- ([#33897](https://github.com/RocketChat/Rocket.Chat/pull/33897)) adds unread badge to sidebar collapser + +- ([#32906](https://github.com/RocketChat/Rocket.Chat/pull/32906)) Improves thread metrics featuring user avatars, better titles and repositioned elements. + +- ([#33810](https://github.com/RocketChat/Rocket.Chat/pull/33810)) Adds cursor pagination on chat.syncMessages endpoint + +- ([#33214](https://github.com/RocketChat/Rocket.Chat/pull/33214)) Adds a new route to allow fetching avatars by the user's id `/avatar/uid/` + +- ([#32727](https://github.com/RocketChat/Rocket.Chat/pull/32727)) These changes aims to add: + - A brand-new omnichannel contact profile + - The ability to communicate with known contacts only + - Communicate with verified contacts only + - Merge verified contacts across different channels + - Block contact channels + - Resolve conflicting contact information when registered via different channels + - An advanced contact center filters +- ([#33920](https://github.com/RocketChat/Rocket.Chat/pull/33920)) Improves the customizability of the naming of automatic Persistent video calls discussions, allowing the date of the call to be in different parts of the name, using the `[date]` keyword. + +- ([#33997](https://github.com/RocketChat/Rocket.Chat/pull/33997)) Prevent apps' subprocesses from crashing on unhandled rejections or uncaught exceptions + +- ([#33814](https://github.com/RocketChat/Rocket.Chat/pull/33814)) Adds a confirmation modal to the cancel subscription action + +- ([#33949](https://github.com/RocketChat/Rocket.Chat/pull/33949)) Disables the possiblity to upload exempted apps + +### Patch Changes + +- Bump @rocket.chat/meteor version. + +- Bump @rocket.chat/meteor version. + +- Bump @rocket.chat/meteor version. + +- Bump @rocket.chat/meteor version. + +- ([#33776](https://github.com/RocketChat/Rocket.Chat/pull/33776)) Fix user highlights not matching only whole words + +- ([#33818](https://github.com/RocketChat/Rocket.Chat/pull/33818)) Remove unused client side `setUserActiveStatus` meteor method. + +- ([#33596](https://github.com/RocketChat/Rocket.Chat/pull/33596)) Bump meteor to 3.0.4 and Node version to 20.18.0 + +- ([#33713](https://github.com/RocketChat/Rocket.Chat/pull/33713)) Deprecated the `from` field in the apps email bridge and made it optional, using the server's settings when the field is omitted + +- ([#32991](https://github.com/RocketChat/Rocket.Chat/pull/32991)) Fixes an issue where updating custom emojis didn’t work as expected, ensuring that uploaded emojis now update correctly and display without any caching problems. + +- ([#33985](https://github.com/RocketChat/Rocket.Chat/pull/33985)) Fixes issue that could cause multiple discussions to be created when creating it from a message action + +- ([#33904](https://github.com/RocketChat/Rocket.Chat/pull/33904)) adds missing html attributes in sidebar item templates + +- ([#33218](https://github.com/RocketChat/Rocket.Chat/pull/33218)) Fixes message character limit not being applied to file upload descriptions + +- ([#33908](https://github.com/RocketChat/Rocket.Chat/pull/33908)) Fixes the issue where newly created teams are incorrectly displayed as channels on the sidebar when the DISABLE_DB_WATCHERS environment variable is enabled + +- ([#33953](https://github.com/RocketChat/Rocket.Chat/pull/33953)) Adds a divider on Create team modal - advanced settings + +- ([#33786](https://github.com/RocketChat/Rocket.Chat/pull/33786)) Fixed an issue that would grant network permission to app's processes in wrong cases + +- ([#33986](https://github.com/RocketChat/Rocket.Chat/pull/33986)) Fixes sidepanel not replicating sidebar sort preference + +- ([#33689](https://github.com/RocketChat/Rocket.Chat/pull/33689)) Fixes banner breaking the UI with specific payloads + +- ([#33808](https://github.com/RocketChat/Rocket.Chat/pull/33808)) Fixes client-side updates for recent emoji list when custom emojis are modified. + +- ([#33902](https://github.com/RocketChat/Rocket.Chat/pull/33902)) Adds "Master volume" and "Call ringer volume" to the user preferences sound section. + +- ([#33311](https://github.com/RocketChat/Rocket.Chat/pull/33311)) Sends server statistics only once a day despite multiple instance being started at different times. + +- ([#33719](https://github.com/RocketChat/Rocket.Chat/pull/33719)) stops calling an object through proxy calling getQueueWorker + +- ([#33785](https://github.com/RocketChat/Rocket.Chat/pull/33785)) Fixed an issue where the installed apps list would go stale without a refresh in some cases + +- ([#33278](https://github.com/RocketChat/Rocket.Chat/pull/33278)) Fixes display of emoji aliases in custom emoji list by adding commas between aliases + +- ([#33772](https://github.com/RocketChat/Rocket.Chat/pull/33772)) Fixes `waiting queue` feature. When `Livechat_waiting_queue` setting is enabled, incoming conversations should be sent to the queue instead of being assigned directly. + +- ([#33963](https://github.com/RocketChat/Rocket.Chat/pull/33963)) Fixes edge case of thread unread not being added to unread group + +- ([#33994](https://github.com/RocketChat/Rocket.Chat/pull/33994)) Adds login and permission validation for resetIrcConnection method + +- ([#33880](https://github.com/RocketChat/Rocket.Chat/pull/33880)) Updates VoIP field labels from 'Free Extension Numbers' to 'Available Extensions' to better describe the field's purpose and improve clarity. + +- ([#33958](https://github.com/RocketChat/Rocket.Chat/pull/33958)) Fixes an issue where resizable handler renders over the expanded thread view while using contextualbarResizable feature preview + +-
Updated dependencies [82767d8fd8a52ac348e8aded1d238e688d36129b, 80e36bfc3938775eb26aa5576f1b9b98896e1cc4, 66ecc64fc1d4464ad2818ad04e23a09cdf221194, 6c83bf0657004ee9cf43d5c832f51826a6591165, e7edeac3bdd22da0a04b8e873d5a008e249fb4be, 3569b0a9c48f8b94ebaef2f8b607c52fdb8e570a, b4841cb7206d855d7a1bc7604683a5b4a48b7176, 32d93a0666fa1cbe857d02889e93d9bbf45bd4f0, d1e6a73796269824fb1aa7afcc7b8aa242e34e90, 661cc01237629ce83699d6c25df25d12985e88bf, 63ccadc012499e004445ad6bc6cd2ff777aecbd1, ce7024af36fcde97b1da5b2731f6edc4a4c236b8, 616655585cb1c5c60d7cee97e25b17af3dfda794, e5fe727f6a2f0e60cdf7ba225e1f6caa6db2045c, d398866dba725918017e3609807f9d0ab9b89b72, 322bafd4bd1fe91ed34610501b269e4d8951944c, d398866dba725918017e3609807f9d0ab9b89b72]: + + - @rocket.chat/apps-engine@1.48.0 + - @rocket.chat/model-typings@1.1.0 + - @rocket.chat/core-typings@7.1.0 + - @rocket.chat/i18n@1.1.0 + - @rocket.chat/rest-typings@7.1.0 + - @rocket.chat/core-services@0.7.2 + - @rocket.chat/presence@0.2.10 + - @rocket.chat/apps@0.2.1 + - @rocket.chat/fuselage-ui-kit@13.0.0 + - @rocket.chat/omnichannel-services@0.3.7 + - @rocket.chat/models@1.0.1 + - @rocket.chat/license@1.0.1 + - @rocket.chat/pdf-worker@0.2.7 + - @rocket.chat/api-client@0.2.10 + - @rocket.chat/cron@0.1.10 + - @rocket.chat/freeswitch@1.0.1 + - @rocket.chat/gazzodown@13.0.0 + - @rocket.chat/ui-contexts@13.0.0 + - @rocket.chat/web-ui-registration@13.0.0 + - @rocket.chat/network-broker@0.1.2 + - @rocket.chat/instance-status@0.1.10 + - @rocket.chat/server-cloud-communication@0.0.2 + - @rocket.chat/ui-theming@0.4.0 + - @rocket.chat/ui-avatar@9.0.0 + - @rocket.chat/ui-client@13.0.0 + - @rocket.chat/ui-video-conf@13.0.0 + - @rocket.chat/ui-voip@3.0.0 +
+ ## 7.1.0-rc.3 ### Patch Changes diff --git a/apps/meteor/app/utils/rocketchat.info b/apps/meteor/app/utils/rocketchat.info index 0fea18c07a50..86d824bf8789 100644 --- a/apps/meteor/app/utils/rocketchat.info +++ b/apps/meteor/app/utils/rocketchat.info @@ -1,3 +1,3 @@ { - "version": "7.1.0-rc.3" + "version": "7.1.0" } diff --git a/apps/meteor/ee/server/services/CHANGELOG.md b/apps/meteor/ee/server/services/CHANGELOG.md index 55dceb163759..2f19f8b81072 100644 --- a/apps/meteor/ee/server/services/CHANGELOG.md +++ b/apps/meteor/ee/server/services/CHANGELOG.md @@ -1,5 +1,22 @@ # rocketchat-services +## 2.0.1 + +### Patch Changes + +- ([#33596](https://github.com/RocketChat/Rocket.Chat/pull/33596)) Bump meteor to 3.0.4 and Node version to 20.18.0 + +-
Updated dependencies [82767d8fd8a52ac348e8aded1d238e688d36129b, 80e36bfc3938775eb26aa5576f1b9b98896e1cc4, e7edeac3bdd22da0a04b8e873d5a008e249fb4be, 3569b0a9c48f8b94ebaef2f8b607c52fdb8e570a, b4841cb7206d855d7a1bc7604683a5b4a48b7176, 32d93a0666fa1cbe857d02889e93d9bbf45bd4f0, 63ccadc012499e004445ad6bc6cd2ff777aecbd1, ce7024af36fcde97b1da5b2731f6edc4a4c236b8, d398866dba725918017e3609807f9d0ab9b89b72, d398866dba725918017e3609807f9d0ab9b89b72]: + + - @rocket.chat/apps-engine@1.48.0 + - @rocket.chat/model-typings@1.1.0 + - @rocket.chat/core-typings@7.1.0 + - @rocket.chat/rest-typings@7.1.0 + - @rocket.chat/core-services@0.7.2 + - @rocket.chat/models@1.0.1 + - @rocket.chat/network-broker@0.1.2 +
+ ## 2.0.1-rc.3 ### Patch Changes diff --git a/apps/meteor/ee/server/services/package.json b/apps/meteor/ee/server/services/package.json index 339d8f50a9ef..9e759860018e 100644 --- a/apps/meteor/ee/server/services/package.json +++ b/apps/meteor/ee/server/services/package.json @@ -1,7 +1,7 @@ { "name": "rocketchat-services", "private": true, - "version": "2.0.1-rc.3", + "version": "2.0.1", "description": "Rocket.Chat Authorization service", "main": "index.js", "scripts": { diff --git a/apps/meteor/package.json b/apps/meteor/package.json index 0ab44dbafaf9..cd7bce0a22e2 100644 --- a/apps/meteor/package.json +++ b/apps/meteor/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/meteor", "description": "The Ultimate Open Source WebChat Platform", - "version": "7.1.0-rc.3", + "version": "7.1.0", "private": true, "author": { "name": "Rocket.Chat", diff --git a/apps/uikit-playground/CHANGELOG.md b/apps/uikit-playground/CHANGELOG.md index 3af65479230f..dae98761b306 100644 --- a/apps/uikit-playground/CHANGELOG.md +++ b/apps/uikit-playground/CHANGELOG.md @@ -1,5 +1,17 @@ # @rocket.chat/uikit-playground +## 0.6.1 + +### Patch Changes + +-
Updated dependencies [80e36bfc3938775eb26aa5576f1b9b98896e1cc4, 32d93a0666fa1cbe857d02889e93d9bbf45bd4f0]: + + - @rocket.chat/core-typings@7.1.0 + - @rocket.chat/fuselage-ui-kit@13.0.0 + - @rocket.chat/ui-contexts@13.0.0 + - @rocket.chat/ui-avatar@9.0.0 +
+ ## 0.6.1-rc.3 ### Patch Changes diff --git a/apps/uikit-playground/package.json b/apps/uikit-playground/package.json index d5f547378eb6..0878ef3616a6 100644 --- a/apps/uikit-playground/package.json +++ b/apps/uikit-playground/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/uikit-playground", "private": true, - "version": "0.6.1-rc.3", + "version": "0.6.1", "type": "module", "scripts": { "dev": "vite", diff --git a/ee/apps/account-service/CHANGELOG.md b/ee/apps/account-service/CHANGELOG.md index 4b9a270e6eb8..1736734c0d6d 100644 --- a/ee/apps/account-service/CHANGELOG.md +++ b/ee/apps/account-service/CHANGELOG.md @@ -1,5 +1,21 @@ # @rocket.chat/account-service +## 0.4.10 + +### Patch Changes + +- ([#33596](https://github.com/RocketChat/Rocket.Chat/pull/33596)) Bump meteor to 3.0.4 and Node version to 20.18.0 + +-
Updated dependencies [80e36bfc3938775eb26aa5576f1b9b98896e1cc4, e7edeac3bdd22da0a04b8e873d5a008e249fb4be, 32d93a0666fa1cbe857d02889e93d9bbf45bd4f0, 63ccadc012499e004445ad6bc6cd2ff777aecbd1]: + + - @rocket.chat/model-typings@1.1.0 + - @rocket.chat/core-typings@7.1.0 + - @rocket.chat/rest-typings@7.1.0 + - @rocket.chat/core-services@0.7.2 + - @rocket.chat/models@1.0.1 + - @rocket.chat/network-broker@0.1.2 +
+ ## 0.4.10-rc.3 ### Patch Changes diff --git a/ee/apps/account-service/package.json b/ee/apps/account-service/package.json index 4425ed94ce0f..340c23de4a02 100644 --- a/ee/apps/account-service/package.json +++ b/ee/apps/account-service/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/account-service", "private": true, - "version": "0.4.10-rc.3", + "version": "0.4.10", "description": "Rocket.Chat Account service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/authorization-service/CHANGELOG.md b/ee/apps/authorization-service/CHANGELOG.md index 8e4e066af759..41364ae5daf1 100644 --- a/ee/apps/authorization-service/CHANGELOG.md +++ b/ee/apps/authorization-service/CHANGELOG.md @@ -1,5 +1,21 @@ # @rocket.chat/authorization-service +## 0.4.10 + +### Patch Changes + +- ([#33596](https://github.com/RocketChat/Rocket.Chat/pull/33596)) Bump meteor to 3.0.4 and Node version to 20.18.0 + +-
Updated dependencies [80e36bfc3938775eb26aa5576f1b9b98896e1cc4, e7edeac3bdd22da0a04b8e873d5a008e249fb4be, 32d93a0666fa1cbe857d02889e93d9bbf45bd4f0, 63ccadc012499e004445ad6bc6cd2ff777aecbd1]: + + - @rocket.chat/model-typings@1.1.0 + - @rocket.chat/core-typings@7.1.0 + - @rocket.chat/rest-typings@7.1.0 + - @rocket.chat/core-services@0.7.2 + - @rocket.chat/models@1.0.1 + - @rocket.chat/network-broker@0.1.2 +
+ ## 0.4.10-rc.3 ### Patch Changes diff --git a/ee/apps/authorization-service/package.json b/ee/apps/authorization-service/package.json index b4af6946364c..79327890461a 100644 --- a/ee/apps/authorization-service/package.json +++ b/ee/apps/authorization-service/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/authorization-service", "private": true, - "version": "0.4.10-rc.3", + "version": "0.4.10", "description": "Rocket.Chat Authorization service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/ddp-streamer/CHANGELOG.md b/ee/apps/ddp-streamer/CHANGELOG.md index daa8503dd331..16ae9fb059df 100644 --- a/ee/apps/ddp-streamer/CHANGELOG.md +++ b/ee/apps/ddp-streamer/CHANGELOG.md @@ -1,5 +1,22 @@ # @rocket.chat/ddp-streamer +## 0.3.10 + +### Patch Changes + +- ([#33596](https://github.com/RocketChat/Rocket.Chat/pull/33596)) Bump meteor to 3.0.4 and Node version to 20.18.0 + +-
Updated dependencies [80e36bfc3938775eb26aa5576f1b9b98896e1cc4, e7edeac3bdd22da0a04b8e873d5a008e249fb4be, 32d93a0666fa1cbe857d02889e93d9bbf45bd4f0, 63ccadc012499e004445ad6bc6cd2ff777aecbd1]: + + - @rocket.chat/model-typings@1.1.0 + - @rocket.chat/core-typings@7.1.0 + - @rocket.chat/rest-typings@7.1.0 + - @rocket.chat/core-services@0.7.2 + - @rocket.chat/models@1.0.1 + - @rocket.chat/network-broker@0.1.2 + - @rocket.chat/instance-status@0.1.10 +
+ ## 0.3.10-rc.3 ### Patch Changes diff --git a/ee/apps/ddp-streamer/package.json b/ee/apps/ddp-streamer/package.json index 7e321734b8a2..f3875b1246b3 100644 --- a/ee/apps/ddp-streamer/package.json +++ b/ee/apps/ddp-streamer/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/ddp-streamer", "private": true, - "version": "0.3.10-rc.3", + "version": "0.3.10", "description": "Rocket.Chat DDP-Streamer service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/omnichannel-transcript/CHANGELOG.md b/ee/apps/omnichannel-transcript/CHANGELOG.md index 42ebfe1d5d2b..78edb8863a9b 100644 --- a/ee/apps/omnichannel-transcript/CHANGELOG.md +++ b/ee/apps/omnichannel-transcript/CHANGELOG.md @@ -1,5 +1,22 @@ # @rocket.chat/omnichannel-transcript +## 0.4.10 + +### Patch Changes + +- ([#33596](https://github.com/RocketChat/Rocket.Chat/pull/33596)) Bump meteor to 3.0.4 and Node version to 20.18.0 + +-
Updated dependencies [80e36bfc3938775eb26aa5576f1b9b98896e1cc4, 32d93a0666fa1cbe857d02889e93d9bbf45bd4f0, 63ccadc012499e004445ad6bc6cd2ff777aecbd1]: + + - @rocket.chat/model-typings@1.1.0 + - @rocket.chat/core-typings@7.1.0 + - @rocket.chat/core-services@0.7.2 + - @rocket.chat/omnichannel-services@0.3.7 + - @rocket.chat/models@1.0.1 + - @rocket.chat/pdf-worker@0.2.7 + - @rocket.chat/network-broker@0.1.2 +
+ ## 0.4.10-rc.3 ### Patch Changes diff --git a/ee/apps/omnichannel-transcript/package.json b/ee/apps/omnichannel-transcript/package.json index 3624056fc253..7ff74e153693 100644 --- a/ee/apps/omnichannel-transcript/package.json +++ b/ee/apps/omnichannel-transcript/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/omnichannel-transcript", "private": true, - "version": "0.4.10-rc.3", + "version": "0.4.10", "description": "Rocket.Chat service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/presence-service/CHANGELOG.md b/ee/apps/presence-service/CHANGELOG.md index 9b9711302002..e71fe0c8fdaa 100644 --- a/ee/apps/presence-service/CHANGELOG.md +++ b/ee/apps/presence-service/CHANGELOG.md @@ -1,5 +1,21 @@ # @rocket.chat/presence-service +## 0.4.10 + +### Patch Changes + +- ([#33596](https://github.com/RocketChat/Rocket.Chat/pull/33596)) Bump meteor to 3.0.4 and Node version to 20.18.0 + +-
Updated dependencies [80e36bfc3938775eb26aa5576f1b9b98896e1cc4, 32d93a0666fa1cbe857d02889e93d9bbf45bd4f0, 63ccadc012499e004445ad6bc6cd2ff777aecbd1]: + + - @rocket.chat/model-typings@1.1.0 + - @rocket.chat/core-typings@7.1.0 + - @rocket.chat/core-services@0.7.2 + - @rocket.chat/presence@0.2.10 + - @rocket.chat/models@1.0.1 + - @rocket.chat/network-broker@0.1.2 +
+ ## 0.4.10-rc.3 ### Patch Changes diff --git a/ee/apps/presence-service/package.json b/ee/apps/presence-service/package.json index f9cd272e3ea9..47a470087281 100644 --- a/ee/apps/presence-service/package.json +++ b/ee/apps/presence-service/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/presence-service", "private": true, - "version": "0.4.10-rc.3", + "version": "0.4.10", "description": "Rocket.Chat Presence service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/queue-worker/CHANGELOG.md b/ee/apps/queue-worker/CHANGELOG.md index ca08d11b9cce..cf1ea684ed82 100644 --- a/ee/apps/queue-worker/CHANGELOG.md +++ b/ee/apps/queue-worker/CHANGELOG.md @@ -1,5 +1,21 @@ # @rocket.chat/queue-worker +## 0.4.10 + +### Patch Changes + +- ([#33596](https://github.com/RocketChat/Rocket.Chat/pull/33596)) Bump meteor to 3.0.4 and Node version to 20.18.0 + +-
Updated dependencies [80e36bfc3938775eb26aa5576f1b9b98896e1cc4, 32d93a0666fa1cbe857d02889e93d9bbf45bd4f0, 63ccadc012499e004445ad6bc6cd2ff777aecbd1]: + + - @rocket.chat/model-typings@1.1.0 + - @rocket.chat/core-typings@7.1.0 + - @rocket.chat/core-services@0.7.2 + - @rocket.chat/omnichannel-services@0.3.7 + - @rocket.chat/models@1.0.1 + - @rocket.chat/network-broker@0.1.2 +
+ ## 0.4.10-rc.3 ### Patch Changes diff --git a/ee/apps/queue-worker/package.json b/ee/apps/queue-worker/package.json index 1dbbc7e9cefc..51a91c7d46c6 100644 --- a/ee/apps/queue-worker/package.json +++ b/ee/apps/queue-worker/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/queue-worker", "private": true, - "version": "0.4.10-rc.3", + "version": "0.4.10", "description": "Rocket.Chat service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/stream-hub-service/CHANGELOG.md b/ee/apps/stream-hub-service/CHANGELOG.md index e34f438955b1..467beccf5c2c 100644 --- a/ee/apps/stream-hub-service/CHANGELOG.md +++ b/ee/apps/stream-hub-service/CHANGELOG.md @@ -1,5 +1,20 @@ # @rocket.chat/stream-hub-service +## 0.4.10 + +### Patch Changes + +- ([#33596](https://github.com/RocketChat/Rocket.Chat/pull/33596)) Bump meteor to 3.0.4 and Node version to 20.18.0 + +-
Updated dependencies [80e36bfc3938775eb26aa5576f1b9b98896e1cc4, 32d93a0666fa1cbe857d02889e93d9bbf45bd4f0, 63ccadc012499e004445ad6bc6cd2ff777aecbd1]: + + - @rocket.chat/model-typings@1.1.0 + - @rocket.chat/core-typings@7.1.0 + - @rocket.chat/core-services@0.7.2 + - @rocket.chat/models@1.0.1 + - @rocket.chat/network-broker@0.1.2 +
+ ## 0.4.10-rc.3 ### Patch Changes diff --git a/ee/apps/stream-hub-service/package.json b/ee/apps/stream-hub-service/package.json index 1916b0ee0be0..1fbaaa53f303 100644 --- a/ee/apps/stream-hub-service/package.json +++ b/ee/apps/stream-hub-service/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/stream-hub-service", "private": true, - "version": "0.4.10-rc.3", + "version": "0.4.10", "description": "Rocket.Chat Stream Hub service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/packages/license/CHANGELOG.md b/ee/packages/license/CHANGELOG.md index 41df0b012794..87dfce1f1adb 100644 --- a/ee/packages/license/CHANGELOG.md +++ b/ee/packages/license/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/license +## 1.0.1 + +### Patch Changes + +-
Updated dependencies [80e36bfc3938775eb26aa5576f1b9b98896e1cc4, 32d93a0666fa1cbe857d02889e93d9bbf45bd4f0]: + + - @rocket.chat/core-typings@7.1.0 +
+ ## 1.0.1-rc.3 ### Patch Changes diff --git a/ee/packages/license/package.json b/ee/packages/license/package.json index b6e49aed9f7e..a5a5c99ff19d 100644 --- a/ee/packages/license/package.json +++ b/ee/packages/license/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/license", - "version": "1.0.1-rc.3", + "version": "1.0.1", "private": true, "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", diff --git a/ee/packages/network-broker/CHANGELOG.md b/ee/packages/network-broker/CHANGELOG.md index aa35a40400ce..ab846bc6fce7 100644 --- a/ee/packages/network-broker/CHANGELOG.md +++ b/ee/packages/network-broker/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/network-broker +## 0.1.2 + +### Patch Changes + +-
Updated dependencies [63ccadc012499e004445ad6bc6cd2ff777aecbd1]: + + - @rocket.chat/core-services@0.7.2 +
+ ## 0.1.2-rc.3 ### Patch Changes diff --git a/ee/packages/network-broker/package.json b/ee/packages/network-broker/package.json index 593086c6201b..cc4a2a3ae3da 100644 --- a/ee/packages/network-broker/package.json +++ b/ee/packages/network-broker/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/network-broker", - "version": "0.1.2-rc.3", + "version": "0.1.2", "private": true, "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", diff --git a/ee/packages/omnichannel-services/CHANGELOG.md b/ee/packages/omnichannel-services/CHANGELOG.md index c5fda02c03f6..e985e00a61b4 100644 --- a/ee/packages/omnichannel-services/CHANGELOG.md +++ b/ee/packages/omnichannel-services/CHANGELOG.md @@ -1,5 +1,19 @@ # @rocket.chat/omnichannel-services +## 0.3.7 + +### Patch Changes + +-
Updated dependencies [80e36bfc3938775eb26aa5576f1b9b98896e1cc4, e7edeac3bdd22da0a04b8e873d5a008e249fb4be, 32d93a0666fa1cbe857d02889e93d9bbf45bd4f0, 63ccadc012499e004445ad6bc6cd2ff777aecbd1]: + + - @rocket.chat/model-typings@1.1.0 + - @rocket.chat/core-typings@7.1.0 + - @rocket.chat/rest-typings@7.1.0 + - @rocket.chat/core-services@0.7.2 + - @rocket.chat/models@1.0.1 + - @rocket.chat/pdf-worker@0.2.7 +
+ ## 0.3.7-rc.3 ### Patch Changes diff --git a/ee/packages/omnichannel-services/package.json b/ee/packages/omnichannel-services/package.json index 22eb0253e43b..3767ab93d97d 100644 --- a/ee/packages/omnichannel-services/package.json +++ b/ee/packages/omnichannel-services/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/omnichannel-services", - "version": "0.3.7-rc.3", + "version": "0.3.7", "private": true, "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", diff --git a/ee/packages/pdf-worker/CHANGELOG.md b/ee/packages/pdf-worker/CHANGELOG.md index 329418c2c806..b8fe3d5e6690 100644 --- a/ee/packages/pdf-worker/CHANGELOG.md +++ b/ee/packages/pdf-worker/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/pdf-worker +## 0.2.7 + +### Patch Changes + +-
Updated dependencies [80e36bfc3938775eb26aa5576f1b9b98896e1cc4, 32d93a0666fa1cbe857d02889e93d9bbf45bd4f0]: + + - @rocket.chat/core-typings@7.1.0 +
+ ## 0.2.7-rc.3 ### Patch Changes diff --git a/ee/packages/pdf-worker/package.json b/ee/packages/pdf-worker/package.json index 0156178796cd..94bc4660358d 100644 --- a/ee/packages/pdf-worker/package.json +++ b/ee/packages/pdf-worker/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/pdf-worker", - "version": "0.2.7-rc.3", + "version": "0.2.7", "private": true, "main": "./dist/index.js", "typings": "./dist/index.d.ts", diff --git a/ee/packages/presence/CHANGELOG.md b/ee/packages/presence/CHANGELOG.md index 29b2e44c0469..962455fe593f 100644 --- a/ee/packages/presence/CHANGELOG.md +++ b/ee/packages/presence/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/presence +## 0.2.10 + +### Patch Changes + +-
Updated dependencies [80e36bfc3938775eb26aa5576f1b9b98896e1cc4, 32d93a0666fa1cbe857d02889e93d9bbf45bd4f0, 63ccadc012499e004445ad6bc6cd2ff777aecbd1]: + + - @rocket.chat/core-typings@7.1.0 + - @rocket.chat/core-services@0.7.2 + - @rocket.chat/models@1.0.1 +
+ ## 0.2.10-rc.3 ### Patch Changes diff --git a/ee/packages/presence/package.json b/ee/packages/presence/package.json index 785d897a2ae8..fafd9b4af9a3 100644 --- a/ee/packages/presence/package.json +++ b/ee/packages/presence/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/presence", - "version": "0.2.10-rc.3", + "version": "0.2.10", "private": true, "devDependencies": { "@babel/core": "~7.26.0", diff --git a/package.json b/package.json index 6f714c6ba20d..fef9987d5423 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rocket.chat", - "version": "7.1.0-rc.3", + "version": "7.1.0", "description": "Rocket.Chat Monorepo", "main": "index.js", "private": true, diff --git a/packages/api-client/CHANGELOG.md b/packages/api-client/CHANGELOG.md index 19aa5dcf3999..068b95d2ad08 100644 --- a/packages/api-client/CHANGELOG.md +++ b/packages/api-client/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/api-client +## 0.2.10 + +### Patch Changes + +-
Updated dependencies [80e36bfc3938775eb26aa5576f1b9b98896e1cc4, e7edeac3bdd22da0a04b8e873d5a008e249fb4be, 32d93a0666fa1cbe857d02889e93d9bbf45bd4f0]: + + - @rocket.chat/core-typings@7.1.0 + - @rocket.chat/rest-typings@7.1.0 +
+ ## 0.2.10-rc.3 ### Patch Changes diff --git a/packages/api-client/package.json b/packages/api-client/package.json index ce927f338b9c..4f43523eb7aa 100644 --- a/packages/api-client/package.json +++ b/packages/api-client/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/api-client", - "version": "0.2.10-rc.3", + "version": "0.2.10", "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", "@types/jest": "~29.5.14", diff --git a/packages/apps-engine/CHANGELOG.md b/packages/apps-engine/CHANGELOG.md index 3d661f0a3599..c5f48de76637 100644 --- a/packages/apps-engine/CHANGELOG.md +++ b/packages/apps-engine/CHANGELOG.md @@ -1,5 +1,31 @@ # @rocket.chat/apps-engine +## 1.48.0 + +### Minor Changes + +- ([#32727](https://github.com/RocketChat/Rocket.Chat/pull/32727)) These changes aims to add: + - A brand-new omnichannel contact profile + - The ability to communicate with known contacts only + - Communicate with verified contacts only + - Merge verified contacts across different channels + - Block contact channels + - Resolve conflicting contact information when registered via different channels + - An advanced contact center filters +- ([#33997](https://github.com/RocketChat/Rocket.Chat/pull/33997)) Prevent apps' subprocesses from crashing on unhandled rejections or uncaught exceptions + +- ([#33690](https://github.com/RocketChat/Rocket.Chat/pull/33690)) Add support to configure apps runtime timeout via the APPS_ENGINE_RUNTIME_TIMEOUT environment variable + +### Patch Changes + +- ([#33713](https://github.com/RocketChat/Rocket.Chat/pull/33713)) Deprecated the `from` field in the apps email bridge and made it optional, using the server's settings when the field is omitted + +- ([#33786](https://github.com/RocketChat/Rocket.Chat/pull/33786)) Fixed an issue that would grant network permission to app's processes in wrong cases + +- ([#33865](https://github.com/RocketChat/Rocket.Chat/pull/33865)) Fixes an issue that would cause apps to appear disabled after a subprocess restart + +- ([#33690](https://github.com/RocketChat/Rocket.Chat/pull/33690)) Removed the 1 second timeout of `Pre` app events. Now they will follow the "global" configuration + ## 1.48.0-rc.0 ### Minor Changes diff --git a/packages/apps-engine/package.json b/packages/apps-engine/package.json index 3df4727f9caa..ef4490da82cf 100644 --- a/packages/apps-engine/package.json +++ b/packages/apps-engine/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/apps-engine", - "version": "1.48.0-rc.0", + "version": "1.48.0", "description": "The engine code for the Rocket.Chat Apps which manages, runs, translates, coordinates and all of that.", "main": "index", "typings": "index", diff --git a/packages/apps/CHANGELOG.md b/packages/apps/CHANGELOG.md index f76acaa59c99..f57df93ace27 100644 --- a/packages/apps/CHANGELOG.md +++ b/packages/apps/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/apps +## 0.2.1 + +### Patch Changes + +-
Updated dependencies [82767d8fd8a52ac348e8aded1d238e688d36129b, 80e36bfc3938775eb26aa5576f1b9b98896e1cc4, 3569b0a9c48f8b94ebaef2f8b607c52fdb8e570a, b4841cb7206d855d7a1bc7604683a5b4a48b7176, 32d93a0666fa1cbe857d02889e93d9bbf45bd4f0, ce7024af36fcde97b1da5b2731f6edc4a4c236b8, d398866dba725918017e3609807f9d0ab9b89b72, d398866dba725918017e3609807f9d0ab9b89b72]: + + - @rocket.chat/apps-engine@1.48.0 + - @rocket.chat/model-typings@1.1.0 + - @rocket.chat/core-typings@7.1.0 +
+ ## 0.2.1-rc.3 ### Patch Changes diff --git a/packages/apps/package.json b/packages/apps/package.json index ed52e9b4537a..e57669c46e9f 100644 --- a/packages/apps/package.json +++ b/packages/apps/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/apps", - "version": "0.2.1-rc.3", + "version": "0.2.1", "private": true, "devDependencies": { "eslint": "~8.45.0", diff --git a/packages/core-services/CHANGELOG.md b/packages/core-services/CHANGELOG.md index 677775b6d1b6..02ca0c091757 100644 --- a/packages/core-services/CHANGELOG.md +++ b/packages/core-services/CHANGELOG.md @@ -1,5 +1,18 @@ # @rocket.chat/core-services +## 0.7.2 + +### Patch Changes + +- ([#33719](https://github.com/RocketChat/Rocket.Chat/pull/33719)) stops calling an object through proxy calling getQueueWorker + +-
Updated dependencies [80e36bfc3938775eb26aa5576f1b9b98896e1cc4, e7edeac3bdd22da0a04b8e873d5a008e249fb4be, 32d93a0666fa1cbe857d02889e93d9bbf45bd4f0]: + + - @rocket.chat/core-typings@7.1.0 + - @rocket.chat/rest-typings@7.1.0 + - @rocket.chat/models@1.0.1 +
+ ## 0.7.2-rc.3 ### Patch Changes diff --git a/packages/core-services/package.json b/packages/core-services/package.json index d5cde551a465..3f06919f6ed3 100644 --- a/packages/core-services/package.json +++ b/packages/core-services/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/core-services", - "version": "0.7.2-rc.3", + "version": "0.7.2", "private": true, "devDependencies": { "@babel/core": "~7.26.0", diff --git a/packages/core-typings/CHANGELOG.md b/packages/core-typings/CHANGELOG.md index 6344028c9624..a52c22ec8782 100644 --- a/packages/core-typings/CHANGELOG.md +++ b/packages/core-typings/CHANGELOG.md @@ -1,5 +1,22 @@ # @rocket.chat/core-typings +## 7.1.0 + +### Minor Changes + +- ([#32727](https://github.com/RocketChat/Rocket.Chat/pull/32727)) These changes aims to add: + - A brand-new omnichannel contact profile + - The ability to communicate with known contacts only + - Communicate with verified contacts only + - Merge verified contacts across different channels + - Block contact channels + - Resolve conflicting contact information when registered via different channels + - An advanced contact center filters + +### Patch Changes + +- ([#32991](https://github.com/RocketChat/Rocket.Chat/pull/32991)) Fixes an issue where updating custom emojis didn’t work as expected, ensuring that uploaded emojis now update correctly and display without any caching problems. + ## 7.1.0-rc.3 ## 7.1.0-rc.2 diff --git a/packages/core-typings/package.json b/packages/core-typings/package.json index a023ab119c88..af892977359c 100644 --- a/packages/core-typings/package.json +++ b/packages/core-typings/package.json @@ -2,7 +2,7 @@ "$schema": "https://json.schemastore.org/package", "name": "@rocket.chat/core-typings", "private": true, - "version": "7.1.0-rc.3", + "version": "7.1.0", "devDependencies": { "@rocket.chat/apps-engine": "workspace:^", "@rocket.chat/eslint-config": "workspace:^", diff --git a/packages/cron/CHANGELOG.md b/packages/cron/CHANGELOG.md index e2bad580f395..07d6c9fc604a 100644 --- a/packages/cron/CHANGELOG.md +++ b/packages/cron/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/cron +## 0.1.10 + +### Patch Changes + +-
Updated dependencies [80e36bfc3938775eb26aa5576f1b9b98896e1cc4, 32d93a0666fa1cbe857d02889e93d9bbf45bd4f0]: + + - @rocket.chat/core-typings@7.1.0 + - @rocket.chat/models@1.0.1 +
+ ## 0.1.10-rc.3 ### Patch Changes diff --git a/packages/cron/package.json b/packages/cron/package.json index 9a35103c9e0a..6fcad4bffeff 100644 --- a/packages/cron/package.json +++ b/packages/cron/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/cron", - "version": "0.1.10-rc.3", + "version": "0.1.10", "private": true, "devDependencies": { "eslint": "~8.45.0", diff --git a/packages/ddp-client/CHANGELOG.md b/packages/ddp-client/CHANGELOG.md index 24c8e539bb6e..100f96a24433 100644 --- a/packages/ddp-client/CHANGELOG.md +++ b/packages/ddp-client/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/ddp-client +## 0.3.10 + +### Patch Changes + +-
Updated dependencies [80e36bfc3938775eb26aa5576f1b9b98896e1cc4, e7edeac3bdd22da0a04b8e873d5a008e249fb4be, 32d93a0666fa1cbe857d02889e93d9bbf45bd4f0]: + + - @rocket.chat/core-typings@7.1.0 + - @rocket.chat/rest-typings@7.1.0 + - @rocket.chat/api-client@0.2.10 +
+ ## 0.3.10-rc.3 ### Patch Changes diff --git a/packages/ddp-client/package.json b/packages/ddp-client/package.json index c95f20b4dd35..be3a75b3084e 100644 --- a/packages/ddp-client/package.json +++ b/packages/ddp-client/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ddp-client", - "version": "0.3.10-rc.3", + "version": "0.3.10", "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", "@types/jest": "~29.5.14", diff --git a/packages/freeswitch/CHANGELOG.md b/packages/freeswitch/CHANGELOG.md index 124bb14947e6..c1e167da4429 100644 --- a/packages/freeswitch/CHANGELOG.md +++ b/packages/freeswitch/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/freeswitch +## 1.0.1 + +### Patch Changes + +-
Updated dependencies [80e36bfc3938775eb26aa5576f1b9b98896e1cc4, 32d93a0666fa1cbe857d02889e93d9bbf45bd4f0]: + + - @rocket.chat/core-typings@7.1.0 +
+ ## 1.0.1-rc.3 ### Patch Changes diff --git a/packages/freeswitch/package.json b/packages/freeswitch/package.json index 564b6501017a..7ff4ef52bfd5 100644 --- a/packages/freeswitch/package.json +++ b/packages/freeswitch/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/freeswitch", - "version": "1.0.1-rc.3", + "version": "1.0.1", "private": true, "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", diff --git a/packages/fuselage-ui-kit/CHANGELOG.md b/packages/fuselage-ui-kit/CHANGELOG.md index 617360c0c5b5..3da9a288d5b3 100644 --- a/packages/fuselage-ui-kit/CHANGELOG.md +++ b/packages/fuselage-ui-kit/CHANGELOG.md @@ -1,5 +1,19 @@ # Change Log +## 13.0.0 + +### Patch Changes + +-
Updated dependencies [82767d8fd8a52ac348e8aded1d238e688d36129b, 80e36bfc3938775eb26aa5576f1b9b98896e1cc4, 3569b0a9c48f8b94ebaef2f8b607c52fdb8e570a, b4841cb7206d855d7a1bc7604683a5b4a48b7176, 32d93a0666fa1cbe857d02889e93d9bbf45bd4f0, ce7024af36fcde97b1da5b2731f6edc4a4c236b8, d398866dba725918017e3609807f9d0ab9b89b72, d398866dba725918017e3609807f9d0ab9b89b72]: + + - @rocket.chat/apps-engine@1.48.0 + - @rocket.chat/core-typings@7.1.0 + - @rocket.chat/gazzodown@13.0.0 + - @rocket.chat/ui-contexts@13.0.0 + - @rocket.chat/ui-avatar@9.0.0 + - @rocket.chat/ui-video-conf@13.0.0 +
+ ## 13.0.0-rc.3 ### Patch Changes diff --git a/packages/fuselage-ui-kit/package.json b/packages/fuselage-ui-kit/package.json index c90c2a245329..f52fa167df6e 100644 --- a/packages/fuselage-ui-kit/package.json +++ b/packages/fuselage-ui-kit/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/fuselage-ui-kit", - "version": "13.0.0-rc.3", + "version": "13.0.0", "private": true, "description": "UiKit elements for Rocket.Chat Apps built under Fuselage design system", "homepage": "https://rocketchat.github.io/Rocket.Chat.Fuselage/", @@ -93,7 +93,7 @@ "typescript": "~5.6.3" }, "peerDependencies": { - "@rocket.chat/apps-engine": "1.48.0-rc.0", + "@rocket.chat/apps-engine": "1.48.0", "@rocket.chat/eslint-config": "0.7.0", "@rocket.chat/fuselage": "*", "@rocket.chat/fuselage-hooks": "*", @@ -101,10 +101,10 @@ "@rocket.chat/icons": "*", "@rocket.chat/prettier-config": "*", "@rocket.chat/styled": "*", - "@rocket.chat/ui-avatar": "9.0.0-rc.3", - "@rocket.chat/ui-contexts": "13.0.0-rc.3", + "@rocket.chat/ui-avatar": "9.0.0", + "@rocket.chat/ui-contexts": "13.0.0", "@rocket.chat/ui-kit": "0.37.0", - "@rocket.chat/ui-video-conf": "13.0.0-rc.3", + "@rocket.chat/ui-video-conf": "13.0.0", "@tanstack/react-query": "*", "react": "~17.0.2", "react-dom": "*" diff --git a/packages/gazzodown/CHANGELOG.md b/packages/gazzodown/CHANGELOG.md index 11e84a0e093e..707ff34838c5 100644 --- a/packages/gazzodown/CHANGELOG.md +++ b/packages/gazzodown/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/gazzodown +## 13.0.0 + +### Patch Changes + +-
Updated dependencies [80e36bfc3938775eb26aa5576f1b9b98896e1cc4, 32d93a0666fa1cbe857d02889e93d9bbf45bd4f0]: + + - @rocket.chat/core-typings@7.1.0 + - @rocket.chat/ui-contexts@13.0.0 + - @rocket.chat/ui-client@13.0.0 +
+ ## 13.0.0-rc.3 ### Patch Changes diff --git a/packages/gazzodown/package.json b/packages/gazzodown/package.json index dc50f83b46d6..f66ba6465159 100644 --- a/packages/gazzodown/package.json +++ b/packages/gazzodown/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/gazzodown", - "version": "13.0.0-rc.3", + "version": "13.0.0", "private": true, "main": "./dist/index.js", "typings": "./dist/index.d.ts", @@ -74,8 +74,8 @@ "@rocket.chat/fuselage-tokens": "*", "@rocket.chat/message-parser": "0.31.31", "@rocket.chat/styled": "*", - "@rocket.chat/ui-client": "13.0.0-rc.3", - "@rocket.chat/ui-contexts": "13.0.0-rc.3", + "@rocket.chat/ui-client": "13.0.0", + "@rocket.chat/ui-contexts": "13.0.0", "katex": "*", "react": "*" }, diff --git a/packages/i18n/CHANGELOG.md b/packages/i18n/CHANGELOG.md index 05fa9e6037d0..6a4bec0347d8 100644 --- a/packages/i18n/CHANGELOG.md +++ b/packages/i18n/CHANGELOG.md @@ -1,5 +1,35 @@ # @rocket.chat/i18n +## 1.1.0 + +### Minor Changes + +- ([#32906](https://github.com/RocketChat/Rocket.Chat/pull/32906)) Improves thread metrics featuring user avatars, better titles and repositioned elements. + +- ([#32727](https://github.com/RocketChat/Rocket.Chat/pull/32727)) These changes aims to add: + - A brand-new omnichannel contact profile + - The ability to communicate with known contacts only + - Communicate with verified contacts only + - Merge verified contacts across different channels + - Block contact channels + - Resolve conflicting contact information when registered via different channels + - An advanced contact center filters +- ([#33920](https://github.com/RocketChat/Rocket.Chat/pull/33920)) Improves the customizability of the naming of automatic Persistent video calls discussions, allowing the date of the call to be in different parts of the name, using the `[date]` keyword. + +- ([#33997](https://github.com/RocketChat/Rocket.Chat/pull/33997)) Prevent apps' subprocesses from crashing on unhandled rejections or uncaught exceptions + +- ([#33814](https://github.com/RocketChat/Rocket.Chat/pull/33814)) Adds a confirmation modal to the cancel subscription action + +- ([#33949](https://github.com/RocketChat/Rocket.Chat/pull/33949)) Disables the possiblity to upload exempted apps + +### Patch Changes + +- ([#33218](https://github.com/RocketChat/Rocket.Chat/pull/33218)) Fixes message character limit not being applied to file upload descriptions + +- ([#33902](https://github.com/RocketChat/Rocket.Chat/pull/33902)) Adds "Master volume" and "Call ringer volume" to the user preferences sound section. + +- ([#33880](https://github.com/RocketChat/Rocket.Chat/pull/33880)) Updates VoIP field labels from 'Free Extension Numbers' to 'Available Extensions' to better describe the field's purpose and improve clarity. + ## 1.1.0-rc.0 ### Minor Changes diff --git a/packages/i18n/package.json b/packages/i18n/package.json index d2121eb14f06..4ec0a0ebfcc7 100644 --- a/packages/i18n/package.json +++ b/packages/i18n/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/i18n", - "version": "1.1.0-rc.0", + "version": "1.1.0", "private": true, "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", diff --git a/packages/instance-status/CHANGELOG.md b/packages/instance-status/CHANGELOG.md index 602f5c9e2153..27f0fe2ed041 100644 --- a/packages/instance-status/CHANGELOG.md +++ b/packages/instance-status/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/instance-status +## 0.1.10 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/models@1.0.1 +
+ ## 0.1.10-rc.3 ### Patch Changes diff --git a/packages/instance-status/package.json b/packages/instance-status/package.json index f099b52f8166..d0e6931abccc 100644 --- a/packages/instance-status/package.json +++ b/packages/instance-status/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/instance-status", - "version": "0.1.10-rc.3", + "version": "0.1.10", "private": true, "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", diff --git a/packages/livechat/CHANGELOG.md b/packages/livechat/CHANGELOG.md index b2d139ae0341..a5c85267d93a 100644 --- a/packages/livechat/CHANGELOG.md +++ b/packages/livechat/CHANGELOG.md @@ -1,5 +1,22 @@ # @rocket.chat/livechat Change Log +## 1.21.0 + +### Minor Changes + +- ([#33997](https://github.com/RocketChat/Rocket.Chat/pull/33997)) Prevent apps' subprocesses from crashing on unhandled rejections or uncaught exceptions + +### Patch Changes + +- ([#33911](https://github.com/RocketChat/Rocket.Chat/pull/33911)) Fixes the 'Finish Chat' option in Livechat appearing before the conversation is started, which caused the action to fail. + +- ([#33944](https://github.com/RocketChat/Rocket.Chat/pull/33944)) Fixes livechat popout mode not working correctly in cross domain situations + +-
Updated dependencies []: + + - @rocket.chat/gazzodown@13.0.0 +
+ ## 1.21.0-rc.3 ### Patch Changes diff --git a/packages/livechat/package.json b/packages/livechat/package.json index 98c9fd14bb01..e8430d341081 100644 --- a/packages/livechat/package.json +++ b/packages/livechat/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/livechat", - "version": "1.21.0-rc.3", + "version": "1.21.0", "files": [ "/build" ], diff --git a/packages/mock-providers/CHANGELOG.md b/packages/mock-providers/CHANGELOG.md index aefa17c20991..28a34e6d19f6 100644 --- a/packages/mock-providers/CHANGELOG.md +++ b/packages/mock-providers/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/mock-providers +## 0.1.5 + +### Patch Changes + +-
Updated dependencies [66ecc64fc1d4464ad2818ad04e23a09cdf221194, 6c83bf0657004ee9cf43d5c832f51826a6591165, 32d93a0666fa1cbe857d02889e93d9bbf45bd4f0, d1e6a73796269824fb1aa7afcc7b8aa242e34e90, 661cc01237629ce83699d6c25df25d12985e88bf, ce7024af36fcde97b1da5b2731f6edc4a4c236b8, 616655585cb1c5c60d7cee97e25b17af3dfda794, e5fe727f6a2f0e60cdf7ba225e1f6caa6db2045c, 322bafd4bd1fe91ed34610501b269e4d8951944c]: + + - @rocket.chat/i18n@1.1.0 +
+ ## 0.1.5-rc.0 ### Patch Changes diff --git a/packages/mock-providers/package.json b/packages/mock-providers/package.json index 074b8e83a660..fb2100b44395 100644 --- a/packages/mock-providers/package.json +++ b/packages/mock-providers/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/mock-providers", - "version": "0.1.5-rc.0", + "version": "0.1.5", "private": true, "dependencies": { "@rocket.chat/emitter": "~0.31.25", diff --git a/packages/model-typings/CHANGELOG.md b/packages/model-typings/CHANGELOG.md index f2b4bb71bba7..93760f4984f7 100644 --- a/packages/model-typings/CHANGELOG.md +++ b/packages/model-typings/CHANGELOG.md @@ -1,5 +1,27 @@ # @rocket.chat/model-typings +## 1.1.0 + +### Minor Changes + +- ([#32727](https://github.com/RocketChat/Rocket.Chat/pull/32727)) These changes aims to add: + - A brand-new omnichannel contact profile + - The ability to communicate with known contacts only + - Communicate with verified contacts only + - Merge verified contacts across different channels + - Block contact channels + - Resolve conflicting contact information when registered via different channels + - An advanced contact center filters + +### Patch Changes + +- ([#32991](https://github.com/RocketChat/Rocket.Chat/pull/32991)) Fixes an issue where updating custom emojis didn’t work as expected, ensuring that uploaded emojis now update correctly and display without any caching problems. + +-
Updated dependencies [80e36bfc3938775eb26aa5576f1b9b98896e1cc4, 32d93a0666fa1cbe857d02889e93d9bbf45bd4f0]: + + - @rocket.chat/core-typings@7.1.0 +
+ ## 1.1.0-rc.3 ### Patch Changes diff --git a/packages/model-typings/package.json b/packages/model-typings/package.json index 77cb7b3080d5..797a2f3a4175 100644 --- a/packages/model-typings/package.json +++ b/packages/model-typings/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/model-typings", - "version": "1.1.0-rc.3", + "version": "1.1.0", "private": true, "devDependencies": { "@types/node-rsa": "^1.1.4", diff --git a/packages/models/CHANGELOG.md b/packages/models/CHANGELOG.md index 0625e11c457a..bdba22919b89 100644 --- a/packages/models/CHANGELOG.md +++ b/packages/models/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/models +## 1.0.1 + +### Patch Changes + +-
Updated dependencies [80e36bfc3938775eb26aa5576f1b9b98896e1cc4, 32d93a0666fa1cbe857d02889e93d9bbf45bd4f0]: + + - @rocket.chat/model-typings@1.1.0 +
+ ## 1.0.1-rc.3 ### Patch Changes diff --git a/packages/models/package.json b/packages/models/package.json index ac5e90755c8b..25c104eaa5bf 100644 --- a/packages/models/package.json +++ b/packages/models/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/models", - "version": "1.0.1-rc.3", + "version": "1.0.1", "private": true, "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", diff --git a/packages/rest-typings/CHANGELOG.md b/packages/rest-typings/CHANGELOG.md index f644ea8143df..df4445517aac 100644 --- a/packages/rest-typings/CHANGELOG.md +++ b/packages/rest-typings/CHANGELOG.md @@ -1,5 +1,27 @@ # @rocket.chat/rest-typings +## 7.1.0 + +### Minor Changes + +- ([#33810](https://github.com/RocketChat/Rocket.Chat/pull/33810)) Adds cursor pagination on chat.syncMessages endpoint + +- ([#32727](https://github.com/RocketChat/Rocket.Chat/pull/32727)) These changes aims to add: + - A brand-new omnichannel contact profile + - The ability to communicate with known contacts only + - Communicate with verified contacts only + - Merge verified contacts across different channels + - Block contact channels + - Resolve conflicting contact information when registered via different channels + - An advanced contact center filters + +### Patch Changes + +-
Updated dependencies [80e36bfc3938775eb26aa5576f1b9b98896e1cc4, 32d93a0666fa1cbe857d02889e93d9bbf45bd4f0]: + + - @rocket.chat/core-typings@7.1.0 +
+ ## 7.1.0-rc.3 ### Patch Changes diff --git a/packages/rest-typings/package.json b/packages/rest-typings/package.json index 6cf2fbfa1592..5d3e1c1d58a2 100644 --- a/packages/rest-typings/package.json +++ b/packages/rest-typings/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/rest-typings", - "version": "7.1.0-rc.3", + "version": "7.1.0", "devDependencies": { "@rocket.chat/apps-engine": "workspace:^", "@rocket.chat/eslint-config": "workspace:~", diff --git a/packages/ui-avatar/CHANGELOG.md b/packages/ui-avatar/CHANGELOG.md index bf9718796ce8..273699c706ac 100644 --- a/packages/ui-avatar/CHANGELOG.md +++ b/packages/ui-avatar/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/ui-avatar +## 9.0.0 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@13.0.0 +
+ ## 9.0.0-rc.3 ### Patch Changes diff --git a/packages/ui-avatar/package.json b/packages/ui-avatar/package.json index cb97ac0c5e88..df047c2fcfdc 100644 --- a/packages/ui-avatar/package.json +++ b/packages/ui-avatar/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-avatar", - "version": "9.0.0-rc.3", + "version": "9.0.0", "private": true, "devDependencies": { "@babel/core": "~7.26.0", @@ -30,7 +30,7 @@ ], "peerDependencies": { "@rocket.chat/fuselage": "*", - "@rocket.chat/ui-contexts": "13.0.0-rc.3", + "@rocket.chat/ui-contexts": "13.0.0", "react": "~17.0.2" }, "volta": { diff --git a/packages/ui-client/CHANGELOG.md b/packages/ui-client/CHANGELOG.md index acf2f42f549f..41dcbc65531d 100644 --- a/packages/ui-client/CHANGELOG.md +++ b/packages/ui-client/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/ui-client +## 13.0.0 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@13.0.0 + - @rocket.chat/ui-avatar@9.0.0 +
+ ## 13.0.0-rc.3 ### Patch Changes diff --git a/packages/ui-client/package.json b/packages/ui-client/package.json index 9f4e15b91db7..1b66fc2e18fb 100644 --- a/packages/ui-client/package.json +++ b/packages/ui-client/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-client", - "version": "13.0.0-rc.3", + "version": "13.0.0", "private": true, "main": "./dist/index.js", "typings": "./dist/index.d.ts", @@ -60,8 +60,8 @@ "@rocket.chat/fuselage": "*", "@rocket.chat/fuselage-hooks": "*", "@rocket.chat/icons": "*", - "@rocket.chat/ui-avatar": "9.0.0-rc.3", - "@rocket.chat/ui-contexts": "13.0.0-rc.3", + "@rocket.chat/ui-avatar": "9.0.0", + "@rocket.chat/ui-contexts": "13.0.0", "react": "*", "react-i18next": "*" }, diff --git a/packages/ui-contexts/CHANGELOG.md b/packages/ui-contexts/CHANGELOG.md index 5fa8ebc9d448..52a7fa34debe 100644 --- a/packages/ui-contexts/CHANGELOG.md +++ b/packages/ui-contexts/CHANGELOG.md @@ -1,5 +1,17 @@ # @rocket.chat/ui-contexts +## 13.0.0 + +### Patch Changes + +-
Updated dependencies [80e36bfc3938775eb26aa5576f1b9b98896e1cc4, 66ecc64fc1d4464ad2818ad04e23a09cdf221194, 6c83bf0657004ee9cf43d5c832f51826a6591165, e7edeac3bdd22da0a04b8e873d5a008e249fb4be, 32d93a0666fa1cbe857d02889e93d9bbf45bd4f0, d1e6a73796269824fb1aa7afcc7b8aa242e34e90, 661cc01237629ce83699d6c25df25d12985e88bf, ce7024af36fcde97b1da5b2731f6edc4a4c236b8, 616655585cb1c5c60d7cee97e25b17af3dfda794, e5fe727f6a2f0e60cdf7ba225e1f6caa6db2045c, 322bafd4bd1fe91ed34610501b269e4d8951944c]: + + - @rocket.chat/core-typings@7.1.0 + - @rocket.chat/i18n@1.1.0 + - @rocket.chat/rest-typings@7.1.0 + - @rocket.chat/ddp-client@0.3.10 +
+ ## 13.0.0-rc.3 ### Patch Changes diff --git a/packages/ui-contexts/package.json b/packages/ui-contexts/package.json index bcc7272f2238..d8ec91925226 100644 --- a/packages/ui-contexts/package.json +++ b/packages/ui-contexts/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-contexts", - "version": "13.0.0-rc.3", + "version": "13.0.0", "private": true, "devDependencies": { "@rocket.chat/core-typings": "workspace:^", diff --git a/packages/ui-video-conf/CHANGELOG.md b/packages/ui-video-conf/CHANGELOG.md index bc2a4ce4f775..9eb991c1b42a 100644 --- a/packages/ui-video-conf/CHANGELOG.md +++ b/packages/ui-video-conf/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/ui-video-conf +## 13.0.0 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@13.0.0 + - @rocket.chat/ui-avatar@9.0.0 +
+ ## 13.0.0-rc.3 ### Patch Changes diff --git a/packages/ui-video-conf/package.json b/packages/ui-video-conf/package.json index 5326be681132..a020dc5345ea 100644 --- a/packages/ui-video-conf/package.json +++ b/packages/ui-video-conf/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-video-conf", - "version": "13.0.0-rc.3", + "version": "13.0.0", "private": true, "main": "./dist/index.js", "typings": "./dist/index.d.ts", @@ -58,8 +58,8 @@ "@rocket.chat/fuselage-hooks": "*", "@rocket.chat/icons": "*", "@rocket.chat/styled": "*", - "@rocket.chat/ui-avatar": "9.0.0-rc.3", - "@rocket.chat/ui-contexts": "13.0.0-rc.3", + "@rocket.chat/ui-avatar": "9.0.0", + "@rocket.chat/ui-contexts": "13.0.0", "react": "~17.0.2", "react-dom": "^17.0.2" }, diff --git a/packages/ui-voip/CHANGELOG.md b/packages/ui-voip/CHANGELOG.md index 2ad4ce6c8c54..db9745d1db80 100644 --- a/packages/ui-voip/CHANGELOG.md +++ b/packages/ui-voip/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/ui-voip +## 3.0.0 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@13.0.0 + - @rocket.chat/ui-avatar@9.0.0 + - @rocket.chat/ui-client@13.0.0 +
+ ## 3.0.0-rc.3 ### Patch Changes diff --git a/packages/ui-voip/package.json b/packages/ui-voip/package.json index 347b8a33b792..1dee4a481d51 100644 --- a/packages/ui-voip/package.json +++ b/packages/ui-voip/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-voip", - "version": "3.0.0-rc.3", + "version": "3.0.0", "private": true, "main": "./dist/index.js", "typings": "./dist/index.d.ts", @@ -67,9 +67,9 @@ "@rocket.chat/fuselage-hooks": "*", "@rocket.chat/icons": "*", "@rocket.chat/styled": "*", - "@rocket.chat/ui-avatar": "9.0.0-rc.3", - "@rocket.chat/ui-client": "13.0.0-rc.3", - "@rocket.chat/ui-contexts": "13.0.0-rc.3", + "@rocket.chat/ui-avatar": "9.0.0", + "@rocket.chat/ui-client": "13.0.0", + "@rocket.chat/ui-contexts": "13.0.0", "react": "~17.0.2", "react-aria": "~3.23.1", "react-dom": "^17.0.2" diff --git a/packages/web-ui-registration/CHANGELOG.md b/packages/web-ui-registration/CHANGELOG.md index ae188c817a85..2e52b483e20d 100644 --- a/packages/web-ui-registration/CHANGELOG.md +++ b/packages/web-ui-registration/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/web-ui-registration +## 13.0.0 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@13.0.0 +
+ ## 13.0.0-rc.3 ### Patch Changes diff --git a/packages/web-ui-registration/package.json b/packages/web-ui-registration/package.json index cdd86f0c08dc..658d24c5192e 100644 --- a/packages/web-ui-registration/package.json +++ b/packages/web-ui-registration/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/web-ui-registration", - "version": "13.0.0-rc.3", + "version": "13.0.0", "private": true, "homepage": "https://rocket.chat", "main": "./dist/index.js", @@ -49,7 +49,7 @@ "peerDependencies": { "@rocket.chat/layout": "*", "@rocket.chat/tools": "0.2.2", - "@rocket.chat/ui-contexts": "13.0.0-rc.3", + "@rocket.chat/ui-contexts": "13.0.0", "@tanstack/react-query": "*", "react": "*", "react-hook-form": "*", diff --git a/yarn.lock b/yarn.lock index 354d4728a1ad..b1f456777c73 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8765,10 +8765,10 @@ __metadata: "@rocket.chat/icons": "*" "@rocket.chat/prettier-config": "*" "@rocket.chat/styled": "*" - "@rocket.chat/ui-avatar": 9.0.0-rc.2 - "@rocket.chat/ui-contexts": 13.0.0-rc.2 + "@rocket.chat/ui-avatar": 9.0.0-rc.3 + "@rocket.chat/ui-contexts": 13.0.0-rc.3 "@rocket.chat/ui-kit": 0.37.0 - "@rocket.chat/ui-video-conf": 13.0.0-rc.2 + "@rocket.chat/ui-video-conf": 13.0.0-rc.3 "@tanstack/react-query": "*" react: ~17.0.2 react-dom: "*" @@ -8853,8 +8853,8 @@ __metadata: "@rocket.chat/fuselage-tokens": "*" "@rocket.chat/message-parser": 0.31.31 "@rocket.chat/styled": "*" - "@rocket.chat/ui-client": 13.0.0-rc.2 - "@rocket.chat/ui-contexts": 13.0.0-rc.2 + "@rocket.chat/ui-client": 13.0.0-rc.3 + "@rocket.chat/ui-contexts": 13.0.0-rc.3 katex: "*" react: "*" languageName: unknown @@ -10089,7 +10089,7 @@ __metadata: typescript: "npm:~5.6.3" peerDependencies: "@rocket.chat/fuselage": "*" - "@rocket.chat/ui-contexts": 13.0.0-rc.2 + "@rocket.chat/ui-contexts": 13.0.0-rc.3 react: ~17.0.2 languageName: unknown linkType: soft @@ -10139,8 +10139,8 @@ __metadata: "@rocket.chat/fuselage": "*" "@rocket.chat/fuselage-hooks": "*" "@rocket.chat/icons": "*" - "@rocket.chat/ui-avatar": 9.0.0-rc.2 - "@rocket.chat/ui-contexts": 13.0.0-rc.2 + "@rocket.chat/ui-avatar": 9.0.0-rc.3 + "@rocket.chat/ui-contexts": 13.0.0-rc.3 react: "*" react-i18next: "*" languageName: unknown @@ -10310,8 +10310,8 @@ __metadata: "@rocket.chat/fuselage-hooks": "*" "@rocket.chat/icons": "*" "@rocket.chat/styled": "*" - "@rocket.chat/ui-avatar": 9.0.0-rc.2 - "@rocket.chat/ui-contexts": 13.0.0-rc.2 + "@rocket.chat/ui-avatar": 9.0.0-rc.3 + "@rocket.chat/ui-contexts": 13.0.0-rc.3 react: ~17.0.2 react-dom: ^17.0.2 languageName: unknown @@ -10367,9 +10367,9 @@ __metadata: "@rocket.chat/fuselage-hooks": "*" "@rocket.chat/icons": "*" "@rocket.chat/styled": "*" - "@rocket.chat/ui-avatar": 9.0.0-rc.2 - "@rocket.chat/ui-client": 13.0.0-rc.2 - "@rocket.chat/ui-contexts": 13.0.0-rc.2 + "@rocket.chat/ui-avatar": 9.0.0-rc.3 + "@rocket.chat/ui-client": 13.0.0-rc.3 + "@rocket.chat/ui-contexts": 13.0.0-rc.3 react: ~17.0.2 react-aria: ~3.23.1 react-dom: ^17.0.2 @@ -10457,7 +10457,7 @@ __metadata: peerDependencies: "@rocket.chat/layout": "*" "@rocket.chat/tools": 0.2.2 - "@rocket.chat/ui-contexts": 13.0.0-rc.2 + "@rocket.chat/ui-contexts": 13.0.0-rc.3 "@tanstack/react-query": "*" react: "*" react-hook-form: "*" From afbc3b4d598b91fa30b4e72b825af5d0d8fb0f3f Mon Sep 17 00:00:00 2001 From: Abhinav Kumar Date: Thu, 19 Dec 2024 00:12:23 +0530 Subject: [PATCH 06/28] chore: refine formatting toolbar tooltips for clarity (#34088) --- .../ui-message/client/messageBox/messageBoxFormatting.ts | 4 ++-- .../CannedResponsesComposer/CannedResponsesComposer.tsx | 2 +- .../FormattingToolbarDropdown.tsx | 4 ++-- packages/i18n/src/locales/de.i18n.json | 3 --- packages/i18n/src/locales/en.i18n.json | 6 +++--- packages/i18n/src/locales/fi.i18n.json | 3 --- packages/i18n/src/locales/hi-IN.i18n.json | 3 --- packages/i18n/src/locales/nn.i18n.json | 1 - packages/i18n/src/locales/no.i18n.json | 1 - packages/i18n/src/locales/se.i18n.json | 3 --- packages/i18n/src/locales/sv.i18n.json | 3 --- 11 files changed, 8 insertions(+), 25 deletions(-) diff --git a/apps/meteor/app/ui-message/client/messageBox/messageBoxFormatting.ts b/apps/meteor/app/ui-message/client/messageBox/messageBoxFormatting.ts index 3c35d0fee301..49391d94c4b6 100644 --- a/apps/meteor/app/ui-message/client/messageBox/messageBoxFormatting.ts +++ b/apps/meteor/app/ui-message/client/messageBox/messageBoxFormatting.ts @@ -44,7 +44,7 @@ export const formattingButtons: ReadonlyArray = [ command: 'i', }, { - label: 'Strike', + label: 'Strikethrough', icon: 'strike', pattern: '~{{text}}~', }, @@ -54,7 +54,7 @@ export const formattingButtons: ReadonlyArray = [ pattern: '`{{text}}`', }, { - label: 'Multi_line', + label: 'Multi_line_code', icon: 'multiline', pattern: '```\n{{text}}\n``` ', }, diff --git a/apps/meteor/client/omnichannel/cannedResponses/components/CannedResponsesComposer/CannedResponsesComposer.tsx b/apps/meteor/client/omnichannel/cannedResponses/components/CannedResponsesComposer/CannedResponsesComposer.tsx index 43d2b14d0628..f786328c0766 100644 --- a/apps/meteor/client/omnichannel/cannedResponses/components/CannedResponsesComposer/CannedResponsesComposer.tsx +++ b/apps/meteor/client/omnichannel/cannedResponses/components/CannedResponsesComposer/CannedResponsesComposer.tsx @@ -98,7 +98,7 @@ const CannedResponsesComposer = ({ onChange, ...props }: ComponentProps - + - + ); }; diff --git a/apps/meteor/client/views/account/preferences/PreferencesNotificationsSection.tsx b/apps/meteor/client/views/account/preferences/PreferencesNotificationsSection.tsx index b90d577524ba..2fb77f997e34 100644 --- a/apps/meteor/client/views/account/preferences/PreferencesNotificationsSection.tsx +++ b/apps/meteor/client/views/account/preferences/PreferencesNotificationsSection.tsx @@ -1,6 +1,6 @@ import type { INotificationDesktop } from '@rocket.chat/core-typings'; import type { SelectOption } from '@rocket.chat/fuselage'; -import { Accordion, Field, FieldLabel, FieldRow, FieldHint, Select, FieldGroup, ToggleSwitch, Button } from '@rocket.chat/fuselage'; +import { AccordionItem, Field, FieldLabel, FieldRow, FieldHint, Select, FieldGroup, ToggleSwitch, Button } from '@rocket.chat/fuselage'; import { useUniqueId } from '@rocket.chat/fuselage-hooks'; import type { TranslationKey } from '@rocket.chat/ui-contexts'; import { useUserPreference, useSetting } from '@rocket.chat/ui-contexts'; @@ -93,7 +93,7 @@ const PreferencesNotificationsSection = () => { const enableMobileRingingId = useUniqueId(); return ( - + {t('Desktop_Notifications')} @@ -231,7 +231,7 @@ const PreferencesNotificationsSection = () => { )} - + ); }; diff --git a/apps/meteor/client/views/account/preferences/PreferencesSoundSection.tsx b/apps/meteor/client/views/account/preferences/PreferencesSoundSection.tsx index d88ecaa99dbe..8e9979578ca7 100644 --- a/apps/meteor/client/views/account/preferences/PreferencesSoundSection.tsx +++ b/apps/meteor/client/views/account/preferences/PreferencesSoundSection.tsx @@ -1,5 +1,5 @@ import type { SelectOption } from '@rocket.chat/fuselage'; -import { Accordion, Field, FieldLabel, FieldRow, Select, FieldGroup, ToggleSwitch, FieldHint, Slider } from '@rocket.chat/fuselage'; +import { AccordionItem, Field, FieldLabel, FieldRow, Select, FieldGroup, ToggleSwitch, FieldHint, Slider } from '@rocket.chat/fuselage'; import { useUniqueId } from '@rocket.chat/fuselage-hooks'; import { useTranslation, useCustomSound } from '@rocket.chat/ui-contexts'; import React from 'react'; @@ -21,7 +21,7 @@ const PreferencesSoundSection = () => { const voipRingerVolumeId = useUniqueId(); return ( - + {t('Master_volume')} @@ -150,7 +150,7 @@ const PreferencesSoundSection = () => { - + ); }; diff --git a/apps/meteor/client/views/account/preferences/PreferencesUserPresenceSection.tsx b/apps/meteor/client/views/account/preferences/PreferencesUserPresenceSection.tsx index edfece178e52..39ee0dbc747a 100644 --- a/apps/meteor/client/views/account/preferences/PreferencesUserPresenceSection.tsx +++ b/apps/meteor/client/views/account/preferences/PreferencesUserPresenceSection.tsx @@ -1,4 +1,4 @@ -import { Accordion, Field, FieldLabel, FieldRow, NumberInput, FieldGroup, ToggleSwitch } from '@rocket.chat/fuselage'; +import { AccordionItem, Field, FieldLabel, FieldRow, NumberInput, FieldGroup, ToggleSwitch } from '@rocket.chat/fuselage'; import { useUniqueId } from '@rocket.chat/fuselage-hooks'; import React from 'react'; import { Controller, useFormContext } from 'react-hook-form'; @@ -12,7 +12,7 @@ const PreferencesUserPresenceSection = () => { const idleTimeLimit = useUniqueId(); return ( - + @@ -33,7 +33,7 @@ const PreferencesUserPresenceSection = () => { - + ); }; diff --git a/apps/meteor/client/views/account/security/AccountSecurityPage.tsx b/apps/meteor/client/views/account/security/AccountSecurityPage.tsx index 45b0e4c5eb3f..af617336f0b3 100644 --- a/apps/meteor/client/views/account/security/AccountSecurityPage.tsx +++ b/apps/meteor/client/views/account/security/AccountSecurityPage.tsx @@ -1,4 +1,4 @@ -import { Box, Accordion, ButtonGroup, Button } from '@rocket.chat/fuselage'; +import { Box, Accordion, AccordionItem, ButtonGroup, Button } from '@rocket.chat/fuselage'; import { useUniqueId } from '@rocket.chat/fuselage-hooks'; import { useSetting, useTranslation, useUser } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; @@ -47,28 +47,28 @@ const AccountSecurityPage = (): ReactElement => { {allowPasswordChange && ( - + - + )} {(twoFactorTOTP || showEmailTwoFactor) && twoFactorEnabled && ( - + {twoFactorTOTP && } {showEmailTwoFactor && } - + )} {e2eEnabled && ( - - + )} diff --git a/apps/meteor/client/views/admin/emailInbox/EmailInboxForm.tsx b/apps/meteor/client/views/admin/emailInbox/EmailInboxForm.tsx index ab92971db5ba..b7f02c5c8260 100644 --- a/apps/meteor/client/views/admin/emailInbox/EmailInboxForm.tsx +++ b/apps/meteor/client/views/admin/emailInbox/EmailInboxForm.tsx @@ -1,6 +1,7 @@ import type { IEmailInboxPayload } from '@rocket.chat/core-typings'; import { Accordion, + AccordionItem, Button, ButtonGroup, TextInput, @@ -191,7 +192,7 @@ const EmailInboxForm = ({ inboxData }: { inboxData?: IEmailInboxPayload }): Reac - + @@ -304,8 +305,8 @@ const EmailInboxForm = ({ inboxData }: { inboxData?: IEmailInboxPayload }): Reac {t('Only_Members_Selected_Department_Can_View_Channel')} - - + + @@ -426,8 +427,8 @@ const EmailInboxForm = ({ inboxData }: { inboxData?: IEmailInboxPayload }): Reac - - + + @@ -575,7 +576,7 @@ const EmailInboxForm = ({ inboxData }: { inboxData?: IEmailInboxPayload }): Reac - + diff --git a/apps/meteor/client/views/admin/featurePreview/AdminFeaturePreviewPage.tsx b/apps/meteor/client/views/admin/featurePreview/AdminFeaturePreviewPage.tsx index 615fd20cf5a6..d4adff4c2a70 100644 --- a/apps/meteor/client/views/admin/featurePreview/AdminFeaturePreviewPage.tsx +++ b/apps/meteor/client/views/admin/featurePreview/AdminFeaturePreviewPage.tsx @@ -4,6 +4,7 @@ import { Box, ToggleSwitch, Accordion, + AccordionItem, Field, FieldGroup, FieldLabel, @@ -86,7 +87,7 @@ const AdminFeaturePreviewPage = () => { {grouppedFeaturesPreview?.map(([group, features], index) => ( - + {features.map((feature) => ( @@ -107,7 +108,7 @@ const AdminFeaturePreviewPage = () => { ))} - + ))} diff --git a/apps/meteor/client/views/admin/import/NewImportPage.tsx b/apps/meteor/client/views/admin/import/NewImportPage.tsx index 54de54e095dd..34ba161de9a0 100644 --- a/apps/meteor/client/views/admin/import/NewImportPage.tsx +++ b/apps/meteor/client/views/admin/import/NewImportPage.tsx @@ -185,7 +185,7 @@ function NewImportPage() { undefined; return ( - + router.navigate('/admin/import')}> {importer && ( diff --git a/apps/meteor/client/views/admin/integrations/outgoing/history/HistoryItem.tsx b/apps/meteor/client/views/admin/integrations/outgoing/history/HistoryItem.tsx index e823172cba8a..319ab49600ad 100644 --- a/apps/meteor/client/views/admin/integrations/outgoing/history/HistoryItem.tsx +++ b/apps/meteor/client/views/admin/integrations/outgoing/history/HistoryItem.tsx @@ -1,5 +1,5 @@ import type { IIntegrationHistory, Serialized } from '@rocket.chat/core-typings'; -import { Button, Icon, Box, Accordion, Field, FieldGroup, FieldLabel, FieldRow } from '@rocket.chat/fuselage'; +import { Button, Icon, Box, AccordionItem, Field, FieldGroup, FieldLabel, FieldRow } from '@rocket.chat/fuselage'; import { useMutableCallback } from '@rocket.chat/fuselage-hooks'; import { useMethod } from '@rocket.chat/ui-contexts'; import React from 'react'; @@ -51,7 +51,7 @@ const HistoryItem = ({ data }: { data: Serialized }) => { const errorStackCode = useHighlightedCode('json', JSON.stringify(errorStack || '', null, 2)); return ( - @@ -200,7 +200,7 @@ const HistoryItem = ({ data }: { data: Serialized }) => { )} - + ); }; diff --git a/apps/meteor/client/views/admin/settings/Setting/Setting.stories.tsx b/apps/meteor/client/views/admin/settings/Setting/Setting.stories.tsx index 7705c223491a..17aef33ab60a 100644 --- a/apps/meteor/client/views/admin/settings/Setting/Setting.stories.tsx +++ b/apps/meteor/client/views/admin/settings/Setting/Setting.stories.tsx @@ -15,13 +15,6 @@ export default { argTypesRegex: '^on.*', }, }, - decorators: [ - (fn) => ( -
-
{fn()}
-
- ), - ], } satisfies Meta; export const Default: StoryFn = (args) => ; diff --git a/apps/meteor/client/views/admin/settings/Setting/inputs/AssetSettingInput.stories.tsx b/apps/meteor/client/views/admin/settings/Setting/inputs/AssetSettingInput.stories.tsx index 231d3d1a42b3..8c149c246506 100644 --- a/apps/meteor/client/views/admin/settings/Setting/inputs/AssetSettingInput.stories.tsx +++ b/apps/meteor/client/views/admin/settings/Setting/inputs/AssetSettingInput.stories.tsx @@ -10,7 +10,7 @@ export default { decorators: [ (fn) => (
-
+
{fn()}
diff --git a/apps/meteor/client/views/admin/settings/Setting/inputs/AssetSettingInput.tsx b/apps/meteor/client/views/admin/settings/Setting/inputs/AssetSettingInput.tsx index 39604cd1146e..5475841a8940 100644 --- a/apps/meteor/client/views/admin/settings/Setting/inputs/AssetSettingInput.tsx +++ b/apps/meteor/client/views/admin/settings/Setting/inputs/AssetSettingInput.tsx @@ -1,4 +1,5 @@ -import { Box, Button, Field, FieldLabel, FieldRow, Icon } from '@rocket.chat/fuselage'; +import { css } from '@rocket.chat/css-in-js'; +import { Box, Button, Field, FieldLabel, FieldRow, Icon, Palette } from '@rocket.chat/fuselage'; import { Random } from '@rocket.chat/random'; import { useToastMessageDispatch, useEndpoint, useTranslation, useUpload } from '@rocket.chat/ui-contexts'; import type { ChangeEventHandler, DragEvent, ReactElement, SyntheticEvent } from 'react'; @@ -54,13 +55,52 @@ function AssetSettingInput({ _id, label, value, asset, required, disabled, fileC } }; + const settingsFilePreview = css` + display: flex; + align-items: center; + + & input[type='file'] { + position: absolute !important; + z-index: 10000; + top: 0; + left: 0; + width: 100%; + height: 100%; + cursor: pointer; + opacity: 0; + + & * { + cursor: pointer; + } + } + + & .preview { + overflow: hidden; + width: 100px; + height: 40px; + margin-right: 0.75rem; + border-width: 1px; + border-color: ${Palette.stroke['stroke-light']}; + border-radius: 4px; + background-repeat: no-repeat; + background-position: center center; + background-size: contain; + + &.no-file { + display: flex; + align-items: center; + justify-content: center; + } + } + `; + return ( {label} -
+ {value?.url ? (
{t('Select_file')} - + )}
-
+
); diff --git a/apps/meteor/client/views/admin/settings/SettingsGroupPage/SettingsGroupPage.tsx b/apps/meteor/client/views/admin/settings/SettingsGroupPage/SettingsGroupPage.tsx index 662dd2d52c9f..54363a2df112 100644 --- a/apps/meteor/client/views/admin/settings/SettingsGroupPage/SettingsGroupPage.tsx +++ b/apps/meteor/client/views/admin/settings/SettingsGroupPage/SettingsGroupPage.tsx @@ -152,7 +152,7 @@ const SettingsGroupPage = ({ )} - {children} + {children} )} diff --git a/apps/meteor/client/views/admin/settings/SettingsGroupPage/SettingsGroupPageSkeleton.tsx b/apps/meteor/client/views/admin/settings/SettingsGroupPage/SettingsGroupPageSkeleton.tsx index ad6f93390c1d..a5c2e022299d 100644 --- a/apps/meteor/client/views/admin/settings/SettingsGroupPage/SettingsGroupPageSkeleton.tsx +++ b/apps/meteor/client/views/admin/settings/SettingsGroupPage/SettingsGroupPageSkeleton.tsx @@ -14,7 +14,7 @@ const SettingsGroupPageSkeleton = () => ( - + diff --git a/apps/meteor/client/views/admin/settings/SettingsSection/SettingsSection.tsx b/apps/meteor/client/views/admin/settings/SettingsSection/SettingsSection.tsx index de575dbad302..f1dc393b07b2 100644 --- a/apps/meteor/client/views/admin/settings/SettingsSection/SettingsSection.tsx +++ b/apps/meteor/client/views/admin/settings/SettingsSection/SettingsSection.tsx @@ -1,5 +1,5 @@ import { isSetting, isSettingColor } from '@rocket.chat/core-typings'; -import { Accordion, Box, Button, FieldGroup } from '@rocket.chat/fuselage'; +import { AccordionItem, Box, Button, FieldGroup } from '@rocket.chat/fuselage'; import { useMutableCallback } from '@rocket.chat/fuselage-hooks'; import type { TranslationKey } from '@rocket.chat/ui-contexts'; import type { ReactElement, ReactNode } from 'react'; @@ -71,7 +71,7 @@ function SettingsSection({ groupId, hasReset = true, sectionName, currentTab, so }; return ( - )} - + ); } diff --git a/apps/meteor/client/views/admin/settings/SettingsSection/SettingsSectionSkeleton.tsx b/apps/meteor/client/views/admin/settings/SettingsSection/SettingsSectionSkeleton.tsx index 69466eba374f..c47dd339170c 100644 --- a/apps/meteor/client/views/admin/settings/SettingsSection/SettingsSectionSkeleton.tsx +++ b/apps/meteor/client/views/admin/settings/SettingsSection/SettingsSectionSkeleton.tsx @@ -1,4 +1,4 @@ -import { Accordion, Box, FieldGroup, Skeleton } from '@rocket.chat/fuselage'; +import { AccordionItem, Box, FieldGroup, Skeleton } from '@rocket.chat/fuselage'; import type { ReactElement } from 'react'; import React from 'react'; @@ -6,7 +6,7 @@ import SettingSkeleton from '../Setting/SettingSkeleton'; function SettingsSectionSkeleton(): ReactElement { return ( - }> + }> @@ -16,7 +16,7 @@ function SettingsSectionSkeleton(): ReactElement { ))} - + ); } diff --git a/apps/meteor/client/views/admin/settings/groups/VoipGroupPage/VoipGroupPage.tsx b/apps/meteor/client/views/admin/settings/groups/VoipGroupPage/VoipGroupPage.tsx index 249bdab99616..63ea3c1d7c2b 100644 --- a/apps/meteor/client/views/admin/settings/groups/VoipGroupPage/VoipGroupPage.tsx +++ b/apps/meteor/client/views/admin/settings/groups/VoipGroupPage/VoipGroupPage.tsx @@ -57,7 +57,7 @@ function VoipGroupPage({ _id, onClickBack, ...group }: VoipGroupPageProps) { ) : ( - + {sections.map((sectionName) => ( ))} diff --git a/apps/meteor/client/views/admin/subscription/SubscriptionPage.tsx b/apps/meteor/client/views/admin/subscription/SubscriptionPage.tsx index aaf4f984c89e..79a25574116d 100644 --- a/apps/meteor/client/views/admin/subscription/SubscriptionPage.tsx +++ b/apps/meteor/client/views/admin/subscription/SubscriptionPage.tsx @@ -1,4 +1,4 @@ -import { Accordion, Box, Button, ButtonGroup, Callout, Grid } from '@rocket.chat/fuselage'; +import { Accordion, AccordionItem, Box, Button, ButtonGroup, Callout, Grid } from '@rocket.chat/fuselage'; import { useDebouncedValue, useSessionStorage } from '@rocket.chat/fuselage-hooks'; import { useSearchParameter, useRouter } from '@rocket.chat/ui-contexts'; import { t } from 'i18next'; @@ -131,9 +131,9 @@ const SubscriptionPage = () => { <> {showLicense && ( - +
{JSON.stringify(licensesData, null, 2)}
-
+
)} diff --git a/apps/meteor/client/views/admin/workspace/DeploymentCard/components/InstancesModal/InstancesModal.tsx b/apps/meteor/client/views/admin/workspace/DeploymentCard/components/InstancesModal/InstancesModal.tsx index 69644eda53f9..4bc791c74300 100644 --- a/apps/meteor/client/views/admin/workspace/DeploymentCard/components/InstancesModal/InstancesModal.tsx +++ b/apps/meteor/client/views/admin/workspace/DeploymentCard/components/InstancesModal/InstancesModal.tsx @@ -1,4 +1,4 @@ -import { Accordion } from '@rocket.chat/fuselage'; +import { Accordion, AccordionItem } from '@rocket.chat/fuselage'; import type { IInstance } from '@rocket.chat/rest-typings'; import React from 'react'; import { useTranslation } from 'react-i18next'; @@ -21,7 +21,7 @@ const InstancesModal = ({ instances = [], onClose }: InstancesModalProps) => { {instances.map(({ address, broadcastAuth, currentStatus, instanceRecord }) => ( - + {address} {broadcastAuth ? 'true' : 'false'} @@ -81,7 +81,7 @@ const InstancesModal = ({ instances = [], onClose }: InstancesModalProps) => { {formatDateAndTime(instanceRecord?._updatedAt)} - + ))} diff --git a/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/AppLogsItem.tsx b/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/AppLogsItem.tsx index d1d258006a12..dbc8090c5c3f 100644 --- a/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/AppLogsItem.tsx +++ b/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppLogs/AppLogsItem.tsx @@ -1,5 +1,5 @@ import type { ILogEntry } from '@rocket.chat/core-typings'; -import { Box, Accordion } from '@rocket.chat/fuselage'; +import { Box, AccordionItem } from '@rocket.chat/fuselage'; import React from 'react'; import { useTranslation } from 'react-i18next'; @@ -15,7 +15,7 @@ const AppLogsItem = ({ entries, instanceId, title, ...props }: AppLogsItemProps) const { t } = useTranslation(); return ( - + {instanceId && ( {t('Instance')}: {instanceId} @@ -24,7 +24,7 @@ const AppLogsItem = ({ entries, instanceId, title, ...props }: AppLogsItemProps) {entries.map(({ severity, timestamp, caller, args }, i) => ( ))} - + ); }; diff --git a/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppReleases/AppReleasesItem.tsx b/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppReleases/AppReleasesItem.tsx index 3269c1113d0d..0b32af78b605 100644 --- a/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppReleases/AppReleasesItem.tsx +++ b/apps/meteor/client/views/marketplace/AppDetailsPage/tabs/AppReleases/AppReleasesItem.tsx @@ -1,4 +1,4 @@ -import { Accordion, Box } from '@rocket.chat/fuselage'; +import { AccordionItem, Box } from '@rocket.chat/fuselage'; import DOMPurify from 'dompurify'; import type { ReactElement } from 'react'; import React from 'react'; @@ -36,13 +36,13 @@ const AppReleasesItem = ({ release, ...props }: ReleaseItemProps): ReactElement ); return ( - + {release.detailedChangelog?.rendered ? ( ) : ( {t('No_release_information_provided')} )} - + ); }; diff --git a/apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx b/apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx index 79ccadf99a00..745d6b4efac9 100644 --- a/apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx +++ b/apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx @@ -4,6 +4,7 @@ import { TextInput, ToggleSwitch, Accordion, + AccordionItem, FieldGroup, InputBox, TextAreaInput, @@ -56,7 +57,7 @@ const AppearanceForm = () => { return ( - + @@ -155,9 +156,9 @@ const AppearanceForm = () => { - + - + {t('Title')} @@ -232,9 +233,9 @@ const AppearanceForm = () => { - + - + @@ -309,9 +310,9 @@ const AppearanceForm = () => { - + - + @@ -362,9 +363,9 @@ const AppearanceForm = () => { - + - + @@ -393,7 +394,7 @@ const AppearanceForm = () => { - + ); }; diff --git a/apps/meteor/client/views/room/contextualBar/NotificationPreferences/components/NotificationByDevice.tsx b/apps/meteor/client/views/room/contextualBar/NotificationPreferences/components/NotificationByDevice.tsx index a0a7b56c2ef3..f741013f3c7f 100644 --- a/apps/meteor/client/views/room/contextualBar/NotificationPreferences/components/NotificationByDevice.tsx +++ b/apps/meteor/client/views/room/contextualBar/NotificationPreferences/components/NotificationByDevice.tsx @@ -1,4 +1,4 @@ -import { Box, Accordion, Icon, FieldGroup } from '@rocket.chat/fuselage'; +import { Box, AccordionItem, Icon, FieldGroup } from '@rocket.chat/fuselage'; import type { Keys as IconName } from '@rocket.chat/icons'; import type { ReactElement, ReactNode } from 'react'; import React, { memo } from 'react'; @@ -10,7 +10,7 @@ type NotificationByDeviceProps = { }; const NotificationByDevice = ({ device, icon, children }: NotificationByDeviceProps): ReactElement => ( - @@ -22,7 +22,7 @@ const NotificationByDevice = ({ device, icon, children }: NotificationByDevicePr data-qa-id={`${device}-notifications`} > {children} - + ); export default memo(NotificationByDevice); diff --git a/apps/meteor/client/views/room/modals/E2EEModals/DisableE2EEModal.tsx b/apps/meteor/client/views/room/modals/E2EEModals/DisableE2EEModal.tsx index e3b231fa9476..19626d708dcb 100644 --- a/apps/meteor/client/views/room/modals/E2EEModals/DisableE2EEModal.tsx +++ b/apps/meteor/client/views/room/modals/E2EEModals/DisableE2EEModal.tsx @@ -1,4 +1,4 @@ -import { Accordion, Box, Button } from '@rocket.chat/fuselage'; +import { Accordion, AccordionItem, Box, Button } from '@rocket.chat/fuselage'; import type { ReactElement } from 'react'; import React from 'react'; import { Trans, useTranslation } from 'react-i18next'; @@ -36,14 +36,14 @@ const DisableE2EEModal = ({ onConfirm, onCancel, roomType, canResetRoomKey, onRe {t('E2E_disable_encryption_reset_keys_description')} - + {t('E2E_reset_encryption_keys_description')} - + )} diff --git a/apps/meteor/package.json b/apps/meteor/package.json index 5da653e2fa75..6120cc43b351 100644 --- a/apps/meteor/package.json +++ b/apps/meteor/package.json @@ -247,8 +247,8 @@ "@rocket.chat/emitter": "~0.31.25", "@rocket.chat/favicon": "workspace:^", "@rocket.chat/freeswitch": "workspace:^", - "@rocket.chat/fuselage": "^0.59.4", - "@rocket.chat/fuselage-hooks": "^0.33.1", + "@rocket.chat/fuselage": "^0.60.0", + "@rocket.chat/fuselage-hooks": "^0.34.0", "@rocket.chat/fuselage-polyfills": "~0.31.25", "@rocket.chat/fuselage-toastbar": "^0.33.0", "@rocket.chat/fuselage-tokens": "^0.33.2", @@ -262,12 +262,12 @@ "@rocket.chat/license": "workspace:^", "@rocket.chat/log-format": "workspace:^", "@rocket.chat/logger": "workspace:^", - "@rocket.chat/logo": "^0.31.30", + "@rocket.chat/logo": "^0.31.31", "@rocket.chat/memo": "~0.31.25", "@rocket.chat/message-parser": "workspace:^", "@rocket.chat/model-typings": "workspace:^", "@rocket.chat/models": "workspace:^", - "@rocket.chat/mp3-encoder": "0.24.0", + "@rocket.chat/mp3-encoder": "^0.31.26", "@rocket.chat/network-broker": "workspace:^", "@rocket.chat/omnichannel-services": "workspace:^", "@rocket.chat/onboarding-ui": "~0.34.0", diff --git a/apps/uikit-playground/package.json b/apps/uikit-playground/package.json index b70bf3040f9e..c78ea9a974cd 100644 --- a/apps/uikit-playground/package.json +++ b/apps/uikit-playground/package.json @@ -17,14 +17,14 @@ "@lezer/highlight": "^1.2.1", "@rocket.chat/core-typings": "workspace:^", "@rocket.chat/css-in-js": "~0.31.25", - "@rocket.chat/fuselage": "^0.59.4", - "@rocket.chat/fuselage-hooks": "^0.33.1", + "@rocket.chat/fuselage": "^0.60.0", + "@rocket.chat/fuselage-hooks": "^0.34.0", "@rocket.chat/fuselage-polyfills": "~0.31.25", "@rocket.chat/fuselage-toastbar": "^0.33.0", "@rocket.chat/fuselage-tokens": "^0.33.2", "@rocket.chat/fuselage-ui-kit": "workspace:~", "@rocket.chat/icons": "~0.39.0", - "@rocket.chat/logo": "^0.31.30", + "@rocket.chat/logo": "^0.31.31", "@rocket.chat/styled": "~0.31.25", "@rocket.chat/ui-avatar": "workspace:^", "@rocket.chat/ui-contexts": "workspace:~", diff --git a/ee/packages/ui-theming/package.json b/ee/packages/ui-theming/package.json index efc29260f7f1..65aa842ba39c 100644 --- a/ee/packages/ui-theming/package.json +++ b/ee/packages/ui-theming/package.json @@ -4,8 +4,8 @@ "private": true, "devDependencies": { "@rocket.chat/css-in-js": "~0.31.25", - "@rocket.chat/fuselage": "^0.59.4", - "@rocket.chat/fuselage-hooks": "^0.33.1", + "@rocket.chat/fuselage": "^0.60.0", + "@rocket.chat/fuselage-hooks": "^0.34.0", "@rocket.chat/icons": "~0.39.0", "@rocket.chat/ui-contexts": "workspace:~", "@types/react": "~17.0.80", diff --git a/packages/fuselage-ui-kit/package.json b/packages/fuselage-ui-kit/package.json index d3d5bc4e53fa..493e72dfbfb7 100644 --- a/packages/fuselage-ui-kit/package.json +++ b/packages/fuselage-ui-kit/package.json @@ -52,8 +52,8 @@ "@rocket.chat/apps-engine": "workspace:^", "@rocket.chat/core-typings": "workspace:^", "@rocket.chat/eslint-config": "workspace:^", - "@rocket.chat/fuselage": "^0.59.4", - "@rocket.chat/fuselage-hooks": "^0.33.1", + "@rocket.chat/fuselage": "^0.60.0", + "@rocket.chat/fuselage-hooks": "^0.34.0", "@rocket.chat/fuselage-polyfills": "~0.31.25", "@rocket.chat/icons": "~0.39.0", "@rocket.chat/jest-presets": "workspace:~", diff --git a/packages/gazzodown/package.json b/packages/gazzodown/package.json index d494a478ac8c..178966af54d2 100644 --- a/packages/gazzodown/package.json +++ b/packages/gazzodown/package.json @@ -29,7 +29,7 @@ "@babel/core": "~7.26.0", "@rocket.chat/core-typings": "workspace:^", "@rocket.chat/css-in-js": "~0.31.25", - "@rocket.chat/fuselage": "^0.59.4", + "@rocket.chat/fuselage": "^0.60.0", "@rocket.chat/fuselage-tokens": "^0.33.2", "@rocket.chat/jest-presets": "workspace:~", "@rocket.chat/message-parser": "workspace:^", diff --git a/packages/livechat/package.json b/packages/livechat/package.json index 96913f82c650..4e01bb5acb0e 100644 --- a/packages/livechat/package.json +++ b/packages/livechat/package.json @@ -30,9 +30,9 @@ "@rocket.chat/core-typings": "workspace:^", "@rocket.chat/ddp-client": "workspace:^", "@rocket.chat/eslint-config": "workspace:^", - "@rocket.chat/fuselage-hooks": "^0.33.1", + "@rocket.chat/fuselage-hooks": "^0.34.0", "@rocket.chat/fuselage-tokens": "^0.33.2", - "@rocket.chat/logo": "^0.31.30", + "@rocket.chat/logo": "^0.31.31", "@rocket.chat/ui-contexts": "workspace:^", "@storybook/addon-essentials": "^8.4.4", "@storybook/addon-styling-webpack": "~1.0.1", diff --git a/packages/ui-avatar/package.json b/packages/ui-avatar/package.json index 642ea1391e8a..ba3a92ca4264 100644 --- a/packages/ui-avatar/package.json +++ b/packages/ui-avatar/package.json @@ -4,7 +4,7 @@ "private": true, "devDependencies": { "@babel/core": "~7.26.0", - "@rocket.chat/fuselage": "^0.59.4", + "@rocket.chat/fuselage": "^0.60.0", "@rocket.chat/ui-contexts": "workspace:^", "@types/react": "~17.0.80", "@types/react-dom": "~17.0.25", diff --git a/packages/ui-avatar/src/components/BaseAvatar.tsx b/packages/ui-avatar/src/components/BaseAvatar.tsx index 80329946fd4b..72845a42ce5a 100644 --- a/packages/ui-avatar/src/components/BaseAvatar.tsx +++ b/packages/ui-avatar/src/components/BaseAvatar.tsx @@ -6,7 +6,7 @@ import { useState } from 'react'; export type BaseAvatarProps = Omit; -const BaseAvatar = ({ url, onLoad, onError, ...props }: BaseAvatarProps) => { +const BaseAvatar = ({ url, onLoad, onError, size, ...props }: BaseAvatarProps) => { const [unloaded, setUnloaded] = useState(false); const prevUrl = usePrevious(url); @@ -21,10 +21,10 @@ const BaseAvatar = ({ url, onLoad, onError, ...props }: BaseAvatarProps) => { }); if (unloaded && url === prevUrl) { - return
diff --git a/packages/ui-video-conf/src/VideoConfPopup/__snapshots__/VideoConfPopup.spec.tsx.snap b/packages/ui-video-conf/src/VideoConfPopup/__snapshots__/VideoConfPopup.spec.tsx.snap index 358cec7d7f7d..91cb7ba7f91b 100644 --- a/packages/ui-video-conf/src/VideoConfPopup/__snapshots__/VideoConfPopup.spec.tsx.snap +++ b/packages/ui-video-conf/src/VideoConfPopup/__snapshots__/VideoConfPopup.spec.tsx.snap @@ -33,7 +33,7 @@ exports[`renders StartCall without crashing 1`] = ` + +
+ + ); +}; + +export default ComposerSelectMessages; diff --git a/apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx b/apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx index 6546a6be9245..0a52355ac58a 100644 --- a/apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx +++ b/apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx @@ -131,7 +131,11 @@ const MessageBox = ({ const callbackRef = useCallback( (node: HTMLTextAreaElement) => { - if (node === null || chat.composer) { + if (node === null && chat.composer) { + return chat.setComposerAPI(); + } + + if (chat.composer) { return; } chat.setComposerAPI(createComposerAPI(node, storageID)); diff --git a/apps/meteor/client/views/room/contextualBar/ExportMessages/ExportMessages.tsx b/apps/meteor/client/views/room/contextualBar/ExportMessages/ExportMessages.tsx index f6a621200119..8736c8a1bec3 100644 --- a/apps/meteor/client/views/room/contextualBar/ExportMessages/ExportMessages.tsx +++ b/apps/meteor/client/views/room/contextualBar/ExportMessages/ExportMessages.tsx @@ -1,18 +1,43 @@ import type { SelectOption } from '@rocket.chat/fuselage'; -import { useUniqueId } from '@rocket.chat/fuselage-hooks'; -import React, { useMemo } from 'react'; -import { FormProvider, useForm } from 'react-hook-form'; +import { + FieldError, + Field, + FieldLabel, + FieldRow, + TextAreaInput, + TextInput, + ButtonGroup, + Button, + Icon, + FieldGroup, + Select, + InputBox, + Callout, +} from '@rocket.chat/fuselage'; +import { useAutoFocus, useUniqueId } from '@rocket.chat/fuselage-hooks'; +import React, { useContext, useEffect, useMemo } from 'react'; +import { Controller, useForm } from 'react-hook-form'; import { useTranslation } from 'react-i18next'; -import FileExport from './FileExport'; -import MailExportForm from './MailExportForm'; -import { ContextualbarHeader, ContextualbarIcon, ContextualbarTitle, ContextualbarClose } from '../../../../components/Contextualbar'; +import { useDownloadExportMutation } from './useDownloadExportMutation'; +import { useRoomExportMutation } from './useRoomExportMutation'; +import { validateEmail } from '../../../../../lib/emailValidator'; +import { + ContextualbarHeader, + ContextualbarScrollableContent, + ContextualbarIcon, + ContextualbarTitle, + ContextualbarClose, + ContextualbarFooter, +} from '../../../../components/Contextualbar'; +import UserAutoCompleteMultiple from '../../../../components/UserAutoCompleteMultiple'; import { roomCoordinator } from '../../../../lib/rooms/roomCoordinator'; +import { SelectedMessageContext, useCountSelected } from '../../MessageList/contexts/SelectedMessagesContext'; import { useRoom } from '../../contexts/RoomContext'; import { useRoomToolbox } from '../../contexts/RoomToolboxContext'; -export type MailExportFormValues = { - type: 'email' | 'file'; +export type ExportMessagesFormValues = { + type: 'email' | 'file' | 'download'; dateFrom: string; dateTo: string; format: 'html' | 'json'; @@ -24,16 +49,25 @@ export type MailExportFormValues = { const ExportMessages = () => { const { t } = useTranslation(); - const room = useRoom(); - const { closeTab } = useRoomToolbox(); + const formFocus = useAutoFocus(); + const room = useRoom(); + const isE2ERoom = room.encrypted; const roomName = room?.t && roomCoordinator.getRoomName(room.t, room); - const methods = useForm({ + const { + control, + formState: { errors, isSubmitting }, + watch, + register, + setValue, + handleSubmit, + clearErrors, + } = useForm({ mode: 'onBlur', defaultValues: { - type: 'email', + type: isE2ERoom ? 'download' : 'email', dateFrom: '', dateTo: '', toUsers: [], @@ -43,18 +77,94 @@ const ExportMessages = () => { postProcess: 'sprintf', sprintf: [roomName], }), - format: 'html', + format: isE2ERoom ? 'json' : 'html', }, }); + const exportOptions = useMemo( () => [ - ['email', t('Send_via_email')], - ['file', t('Export_as_file')], + ['email', t('Send_email')], + ['file', t('Send_file_via_email')], + ['download', t('Download_file')], ], [t], ); + const outputOptions = useMemo( + () => [ + ['html', t('HTML')], + ['json', t('JSON')], + ], + [t], + ); + + const roomExportMutation = useRoomExportMutation(); + const downloadExportMutation = useDownloadExportMutation(); + + const { selectedMessageStore } = useContext(SelectedMessageContext); + const messageCount = useCountSelected(); + + const { type, toUsers } = watch(); + + useEffect(() => { + if (type !== 'file') { + selectedMessageStore.setIsSelecting(true); + } + + return (): void => { + selectedMessageStore.reset(); + }; + }, [type, selectedMessageStore]); + + useEffect(() => { + if (type === 'email') { + setValue('format', 'html'); + } + + if (type === 'download') { + setValue('format', 'json'); + } + + setValue('messagesCount', messageCount); + }, [type, setValue, messageCount]); + + const handleExport = async ({ type, toUsers, dateFrom, dateTo, format, subject, additionalEmails }: ExportMessagesFormValues) => { + const messages = selectedMessageStore.getSelectedMessages(); + + if (type === 'download') { + return downloadExportMutation.mutateAsync({ + mids: messages, + }); + } + + if (type === 'file') { + return roomExportMutation.mutateAsync({ + rid: room._id, + type: 'file', + ...(dateFrom && { dateFrom }), + ...(dateTo && { dateTo }), + format, + }); + } + + roomExportMutation.mutateAsync({ + rid: room._id, + type: 'email', + toUsers, + toEmails: additionalEmails?.split(','), + subject, + messages, + }); + }; + const formId = useUniqueId(); + const methodField = useUniqueId(); + const formatField = useUniqueId(); + const toUsersField = useUniqueId(); + const dateFromField = useUniqueId(); + const dateToField = useUniqueId(); + const additionalEmailsField = useUniqueId(); + const subjectField = useUniqueId(); return ( <> @@ -63,14 +173,176 @@ const ExportMessages = () => { {t('Export_Messages')} - - {methods.watch('type') === 'email' && ( - - )} - {methods.watch('type') === 'file' && ( - - )} - + +
+ + + {t('Method')} + + ( + + )} + /> + + + {type === 'file' && ( + <> + + {t('Date_From')} + + } + /> + + + + {t('Date_to')} + + } + /> + + + + )} + {type === 'email' && ( + <> + + {t('To_users')} + + ( + { + onChange(value); + clearErrors('additionalEmails'); + }} + onBlur={onBlur} + name={name} + /> + )} + /> + + + + {t('To_additional_emails')} + + { + if (additionalEmails === '') { + return undefined; + } + + const emails = additionalEmails?.split(',').map((email) => email.trim()); + if (Array.isArray(emails) && emails.every((email) => validateEmail(email.trim()))) { + return undefined; + } + + return t('Mail_Message_Invalid_emails', { postProcess: 'sprintf', sprintf: [additionalEmails] }); + }, + validateToUsers: (additionalEmails) => { + if (additionalEmails !== '' || toUsers?.length > 0) { + return undefined; + } + + return t('Mail_Message_Missing_to'); + }, + }, + }} + render={({ field }) => ( + } + aria-describedby={`${additionalEmailsField}-error`} + aria-invalid={Boolean(errors?.additionalEmails?.message)} + error={errors?.additionalEmails?.message} + /> + )} + /> + + {errors?.additionalEmails && ( + + {errors.additionalEmails.message} + + )} + + + {t('Subject')} + + ( + } /> + )} + /> + + + + )} + {type !== 'file' && ( + <> + (messagesCount > 0 ? undefined : t('Mail_Message_No_messages_selected_select_all')), + })} + /> + {errors.messagesCount && ( + + + {errors.messagesCount.message} + + + )} + + )} + +
+
+ + + + + + ); }; diff --git a/apps/meteor/client/views/room/contextualBar/ExportMessages/FileExport.tsx b/apps/meteor/client/views/room/contextualBar/ExportMessages/FileExport.tsx deleted file mode 100644 index 2d4a3bf0030c..000000000000 --- a/apps/meteor/client/views/room/contextualBar/ExportMessages/FileExport.tsx +++ /dev/null @@ -1,105 +0,0 @@ -import type { IRoom } from '@rocket.chat/core-typings'; -import type { SelectOption } from '@rocket.chat/fuselage'; -import { Field, FieldLabel, FieldRow, Select, ButtonGroup, Button, FieldGroup, InputBox } from '@rocket.chat/fuselage'; -import { useAutoFocus, useUniqueId } from '@rocket.chat/fuselage-hooks'; -import React, { useMemo } from 'react'; -import { Controller, useFormContext } from 'react-hook-form'; -import { useTranslation } from 'react-i18next'; - -import type { MailExportFormValues } from './ExportMessages'; -import { useRoomExportMutation } from './useRoomExportMutation'; -import { ContextualbarScrollableContent, ContextualbarFooter } from '../../../../components/Contextualbar'; - -type FileExportProps = { - formId: string; - rid: IRoom['_id']; - onCancel: () => void; - exportOptions: SelectOption[]; -}; - -const FileExport = ({ formId, rid, exportOptions, onCancel }: FileExportProps) => { - const { t } = useTranslation(); - const { control, handleSubmit } = useFormContext(); - const roomExportMutation = useRoomExportMutation(); - const formFocus = useAutoFocus(); - - const outputOptions = useMemo( - () => [ - ['html', t('HTML')], - ['json', t('JSON')], - ], - [t], - ); - - const handleExport = ({ dateFrom, dateTo, format }: MailExportFormValues) => { - roomExportMutation.mutateAsync({ - rid, - type: 'file', - ...(dateFrom && { dateFrom }), - ...(dateTo && { dateTo }), - format, - }); - }; - - const typeField = useUniqueId(); - const dateFromField = useUniqueId(); - const dateToField = useUniqueId(); - const formatField = useUniqueId(); - - return ( - <> - -
- - - {t('Method')} - - } - /> - - - -
-
- - - - - - - - ); -}; - -export default FileExport; diff --git a/apps/meteor/client/views/room/contextualBar/ExportMessages/MailExportForm.tsx b/apps/meteor/client/views/room/contextualBar/ExportMessages/MailExportForm.tsx deleted file mode 100644 index b6f0e4b88bf2..000000000000 --- a/apps/meteor/client/views/room/contextualBar/ExportMessages/MailExportForm.tsx +++ /dev/null @@ -1,218 +0,0 @@ -import type { IRoom } from '@rocket.chat/core-typings'; -import { css } from '@rocket.chat/css-in-js'; -import type { SelectOption } from '@rocket.chat/fuselage'; -import { - FieldError, - Field, - FieldLabel, - FieldRow, - TextAreaInput, - TextInput, - ButtonGroup, - Button, - Box, - Icon, - Callout, - FieldGroup, - Select, -} from '@rocket.chat/fuselage'; -import { useAutoFocus, useMutableCallback, useUniqueId } from '@rocket.chat/fuselage-hooks'; -import React, { useEffect, useContext } from 'react'; -import { Controller, useFormContext } from 'react-hook-form'; -import { useTranslation } from 'react-i18next'; - -import type { MailExportFormValues } from './ExportMessages'; -import { useRoomExportMutation } from './useRoomExportMutation'; -import { validateEmail } from '../../../../../lib/emailValidator'; -import { ContextualbarScrollableContent, ContextualbarFooter } from '../../../../components/Contextualbar'; -import UserAutoCompleteMultiple from '../../../../components/UserAutoCompleteMultiple'; -import { SelectedMessageContext, useCountSelected } from '../../MessageList/contexts/SelectedMessagesContext'; - -type MailExportFormProps = { - formId: string; - rid: IRoom['_id']; - onCancel: () => void; - exportOptions: SelectOption[]; -}; - -const MailExportForm = ({ formId, rid, onCancel, exportOptions }: MailExportFormProps) => { - const { t } = useTranslation(); - const formFocus = useAutoFocus(); - - const { - watch, - setValue, - control, - register, - formState: { errors, isDirty, isSubmitting }, - handleSubmit, - clearErrors, - } = useFormContext(); - const roomExportMutation = useRoomExportMutation(); - - const { selectedMessageStore } = useContext(SelectedMessageContext); - const messages = selectedMessageStore.getSelectedMessages(); - - const count = useCountSelected(); - - const clearSelection = useMutableCallback(() => { - selectedMessageStore.clearStore(); - }); - - useEffect(() => { - selectedMessageStore.setIsSelecting(true); - return (): void => { - selectedMessageStore.reset(); - }; - }, [selectedMessageStore]); - - const { toUsers } = watch(); - - useEffect(() => { - setValue('messagesCount', messages.length); - }, [setValue, messages.length]); - - const handleExport = async ({ toUsers, subject, additionalEmails }: MailExportFormValues) => { - roomExportMutation.mutateAsync({ - rid, - type: 'email', - toUsers, - toEmails: additionalEmails?.split(','), - subject, - messages, - }); - }; - - const clickable = css` - cursor: pointer; - `; - - const methodField = useUniqueId(); - const toUsersField = useUniqueId(); - const additionalEmailsField = useUniqueId(); - const subjectField = useUniqueId(); - - return ( - <> - -
- - - {t('Method')} - - (messagesCount > 0 ? undefined : t('Mail_Message_No_messages_selected_select_all')), - })} - /> - {errors.messagesCount && {errors.messagesCount.message}} - - - {t('To_users')} - - ( - { - onChange(value); - clearErrors('additionalEmails'); - }} - onBlur={onBlur} - name={name} - /> - )} - /> - - - - {t('To_additional_emails')} - - { - const emails = additionalEmails?.split(',').map((email) => email.trim()); - if (Array.isArray(emails) && emails.every((email) => validateEmail(email.trim()))) { - return undefined; - } - - return t('Mail_Message_Invalid_emails', { postProcess: 'sprintf', sprintf: [additionalEmails] }); - }, - validateToUsers: (additionalEmails) => { - if (additionalEmails !== '' || toUsers?.length > 0) { - return undefined; - } - - return t('Mail_Message_Missing_to'); - }, - }, - }} - render={({ field }) => ( - } - aria-describedby={`${additionalEmailsField}-error`} - aria-invalid={Boolean(errors?.additionalEmails?.message)} - error={errors?.additionalEmails?.message} - /> - )} - /> - - {errors?.additionalEmails && ( - - {errors.additionalEmails.message} - - )} - - - {t('Subject')} - - } />} - /> - - - -
-
- - - - - - - - ); -}; - -export default MailExportForm; diff --git a/apps/meteor/client/views/room/contextualBar/ExportMessages/useDownloadExportMutation.ts b/apps/meteor/client/views/room/contextualBar/ExportMessages/useDownloadExportMutation.ts new file mode 100644 index 000000000000..f35f153da8bb --- /dev/null +++ b/apps/meteor/client/views/room/contextualBar/ExportMessages/useDownloadExportMutation.ts @@ -0,0 +1,50 @@ +import type { IMessage } from '@rocket.chat/core-typings'; +import { useToastMessageDispatch, useUser } from '@rocket.chat/ui-contexts'; +import { useMutation } from '@tanstack/react-query'; +import type { FindOptions } from 'mongodb'; +import { useTranslation } from 'react-i18next'; + +import { Messages } from '../../../../../app/models/client'; +import { downloadJsonAs } from '../../../../lib/download'; +import { useRoom } from '../../contexts/RoomContext'; + +const messagesFields: FindOptions = { projection: { _id: 1, ts: 1, u: 1, msg: 1, _updatedAt: 1, tlm: 1, replies: 1, tmid: 1 } }; + +export const useDownloadExportMutation = () => { + const { t } = useTranslation(); + const room = useRoom(); + const user = useUser(); + const dispatchToastMessage = useToastMessageDispatch(); + + return useMutation({ + mutationFn: async ({ mids }: { mids: IMessage['_id'][] }) => { + const messages = Messages.find( + { + $or: [{ _id: { $in: mids } }, { tmid: { $in: mids } }], + }, + messagesFields, + ).fetch(); + + const fileData = { + roomId: room._id, + roomName: room.fname || room.name, + userExport: { + id: user?._id, + username: user?.username, + name: user?.name, + roles: user?.roles, + }, + exportDate: new Date().toISOString(), + messages, + }; + + return downloadJsonAs(fileData, `exportedMessages-${new Date().toISOString()}`); + }, + onError: (error) => { + dispatchToastMessage({ type: 'error', message: error }); + }, + onSuccess: () => { + dispatchToastMessage({ type: 'success', message: t('Messages_exported_successfully') }); + }, + }); +}; diff --git a/apps/meteor/client/views/room/providers/SelectedMessagesProvider.tsx b/apps/meteor/client/views/room/providers/SelectedMessagesProvider.tsx index 4100751037ff..e70156126df0 100644 --- a/apps/meteor/client/views/room/providers/SelectedMessagesProvider.tsx +++ b/apps/meteor/client/views/room/providers/SelectedMessagesProvider.tsx @@ -4,8 +4,6 @@ import React, { useMemo } from 'react'; import { SelectedMessageContext } from '../MessageList/contexts/SelectedMessagesContext'; -// data-qa-select - export const selectedMessageStore = new (class SelectMessageStore extends Emitter< { change: undefined; @@ -14,8 +12,20 @@ export const selectedMessageStore = new (class SelectMessageStore extends Emitte > { store = new Set(); + availableMessages = new Set(); + isSelecting = false; + addAvailableMessage(mid: string): void { + this.availableMessages.add(mid); + this.emit('change'); + } + + removeAvailableMessage(mid: string): void { + this.availableMessages.delete(mid); + this.emit('change'); + } + setIsSelecting(isSelecting: boolean): void { this.isSelecting = isSelecting; this.emit('toggleIsSelecting', isSelecting); @@ -49,6 +59,10 @@ export const selectedMessageStore = new (class SelectMessageStore extends Emitte return this.store.size; } + availableMessagesCount(): number { + return this.availableMessages.size; + } + clearStore(): void { const selectedMessages = this.getSelectedMessages(); this.store.clear(); @@ -61,6 +75,11 @@ export const selectedMessageStore = new (class SelectMessageStore extends Emitte this.isSelecting = false; this.emit('toggleIsSelecting', false); } + + toggleAll(mids: string[]): void { + this.store = new Set([...this.store, ...mids]); + this.emit('change'); + } })(); type SelectedMessagesProviderProps = { diff --git a/apps/meteor/tests/e2e/e2e-encryption.spec.ts b/apps/meteor/tests/e2e/e2e-encryption.spec.ts index 04d01d5a7c71..cecb6fd525d4 100644 --- a/apps/meteor/tests/e2e/e2e-encryption.spec.ts +++ b/apps/meteor/tests/e2e/e2e-encryption.spec.ts @@ -231,6 +231,20 @@ test.describe.serial('e2e-encryption initial setup', () => { ); await expect(poHomeChannel.content.nthMessage(0).locator('.rcx-icon--name-key')).toBeVisible(); }); + + test('should display only the download file method when exporting messages in an e2ee room', async ({ page }) => { + await page.goto('/home'); + const channelName = faker.string.uuid(); + await poHomeChannel.sidenav.createEncryptedChannel(channelName); + await expect(page).toHaveURL(`/group/${channelName}`); + + await poHomeChannel.dismissToast(); + await expect(poHomeChannel.content.encryptedRoomHeaderIcon).toBeVisible(); + + await poHomeChannel.tabs.kebab.click({ force: true }); + await poHomeChannel.tabs.btnExportMessages.click(); + await expect(poHomeChannel.tabs.exportMessages.downloadFileMethod).toBeVisible(); + }); }); test.describe.serial('e2e-encryption', () => { diff --git a/apps/meteor/tests/e2e/export-messages.spec.ts b/apps/meteor/tests/e2e/export-messages.spec.ts new file mode 100644 index 000000000000..dffb6b4d5edb --- /dev/null +++ b/apps/meteor/tests/e2e/export-messages.spec.ts @@ -0,0 +1,72 @@ +import { Users } from './fixtures/userStates'; +import { HomeChannel, Utils } from './page-objects'; +import { createTargetChannel } from './utils'; +import { test, expect } from './utils/test'; + +test.use({ storageState: Users.admin.state }); + +test.describe.serial('export-messages', () => { + let poHomeChannel: HomeChannel; + let poUtils: Utils; + let targetChannel: string; + + test.beforeAll(async ({ api }) => { + targetChannel = await createTargetChannel(api); + }); + + test.beforeEach(async ({ page }) => { + poHomeChannel = new HomeChannel(page); + poUtils = new Utils(page); + + await page.goto('/home'); + }); + + test('should all export methods be available in targetChannel', async () => { + await poHomeChannel.sidenav.openChat(targetChannel); + await poHomeChannel.tabs.kebab.click({ force: true }); + await poHomeChannel.tabs.btnExportMessages.click(); + await expect(poHomeChannel.tabs.exportMessages.sendEmailMethod).not.toBeDisabled(); + + await poHomeChannel.tabs.exportMessages.sendEmailMethod.click(); + await expect(poHomeChannel.tabs.exportMessages.getMethodByName('Send email')).toBeVisible(); + await expect(poHomeChannel.tabs.exportMessages.getMethodByName('Send file via email')).toBeVisible(); + await expect(poHomeChannel.tabs.exportMessages.getMethodByName('Download file')).toBeVisible(); + }); + + test('should display an error when trying to send email without filling to users or to additional emails', async () => { + await poHomeChannel.sidenav.openChat(targetChannel); + await poHomeChannel.content.sendMessage('hello world'); + await poHomeChannel.tabs.kebab.click({ force: true }); + await poHomeChannel.tabs.btnExportMessages.click(); + + await poHomeChannel.content.getMessageByText('hello world').click(); + await poHomeChannel.tabs.exportMessages.btnSend.click(); + + await expect( + poUtils.getAlertByText('You must select one or more users or provide one or more email addresses, separated by commas'), + ).toBeVisible(); + }); + + test('should display an error when trying to send email without selecting any message', async () => { + await poHomeChannel.sidenav.openChat(targetChannel); + await poHomeChannel.tabs.kebab.click({ force: true }); + await poHomeChannel.tabs.btnExportMessages.click(); + + await poHomeChannel.tabs.exportMessages.textboxAdditionalEmails.fill('mail@mail.com'); + await poHomeChannel.tabs.exportMessages.btnSend.click(); + + await expect(poUtils.getAlertByText(`You haven't selected any messages`)).toBeVisible(); + }); + + test('should be able to send messages after closing export messages', async () => { + await poHomeChannel.sidenav.openChat(targetChannel); + await poHomeChannel.tabs.kebab.click({ force: true }); + await poHomeChannel.tabs.btnExportMessages.click(); + + await poHomeChannel.content.getMessageByText('hello world').click(); + await poHomeChannel.tabs.exportMessages.btnCancel.click(); + await poHomeChannel.content.sendMessage('hello export'); + + await expect(poHomeChannel.content.getMessageByText('hello export')).toBeVisible(); + }); +}); diff --git a/apps/meteor/tests/e2e/page-objects/fragments/home-content.ts b/apps/meteor/tests/e2e/page-objects/fragments/home-content.ts index 59df066d8163..088d8dd3d647 100644 --- a/apps/meteor/tests/e2e/page-objects/fragments/home-content.ts +++ b/apps/meteor/tests/e2e/page-objects/fragments/home-content.ts @@ -391,7 +391,7 @@ export class HomeContent { } getSystemMessageByText(text: string): Locator { - return this.page.locator('[aria-roledescription="system message"]', { hasText: text }); + return this.page.locator('[role="listitem"][aria-roledescription="system message"]', { hasText: text }); } getMessageByText(text: string): Locator { diff --git a/apps/meteor/tests/e2e/page-objects/fragments/home-flextab-exportMessages.ts b/apps/meteor/tests/e2e/page-objects/fragments/home-flextab-exportMessages.ts new file mode 100644 index 000000000000..ddf78b7f4388 --- /dev/null +++ b/apps/meteor/tests/e2e/page-objects/fragments/home-flextab-exportMessages.ts @@ -0,0 +1,33 @@ +import type { Page } from '@playwright/test'; + +export class HomeFlextabExportMessages { + private readonly page: Page; + + constructor(page: Page) { + this.page = page; + } + + get sendEmailMethod() { + return this.page.getByLabel('Send email'); + } + + get downloadFileMethod() { + return this.page.getByLabel('Download file'); + } + + getMethodByName(name: string) { + return this.page.getByRole('option', { name }); + } + + get textboxAdditionalEmails() { + return this.page.getByRole('textbox', { name: 'To additional emails' }); + } + + get btnSend() { + return this.page.locator('role=button[name="Send"]'); + } + + get btnCancel() { + return this.page.locator('role=button[name="Cancel"]'); + } +} diff --git a/apps/meteor/tests/e2e/page-objects/fragments/home-flextab.ts b/apps/meteor/tests/e2e/page-objects/fragments/home-flextab.ts index 6e22bea99faf..a19cf72d5172 100644 --- a/apps/meteor/tests/e2e/page-objects/fragments/home-flextab.ts +++ b/apps/meteor/tests/e2e/page-objects/fragments/home-flextab.ts @@ -1,6 +1,7 @@ import type { Locator, Page } from '@playwright/test'; import { HomeFlextabChannels } from './home-flextab-channels'; +import { HomeFlextabExportMessages } from './home-flextab-exportMessages'; import { HomeFlextabMembers } from './home-flextab-members'; import { HomeFlextabNotificationPreferences } from './home-flextab-notificationPreferences'; import { HomeFlextabRoom } from './home-flextab-room'; @@ -16,12 +17,15 @@ export class HomeFlextab { readonly notificationPreferences: HomeFlextabNotificationPreferences; + readonly exportMessages: HomeFlextabExportMessages; + constructor(page: Page) { this.page = page; this.members = new HomeFlextabMembers(page); this.room = new HomeFlextabRoom(page); this.channels = new HomeFlextabChannels(page); this.notificationPreferences = new HomeFlextabNotificationPreferences(page); + this.exportMessages = new HomeFlextabExportMessages(page); } get btnTabMembers(): Locator { @@ -48,6 +52,10 @@ export class HomeFlextab { return this.page.locator('role=menuitem[name="Notifications Preferences"]'); } + get btnExportMessages(): Locator { + return this.page.locator('role=menuitem[name="Export messages"]'); + } + get btnE2EERoomSetupDisableE2E(): Locator { return this.page.locator('[data-qa-id=ToolBoxAction-key]'); } diff --git a/apps/meteor/tests/e2e/page-objects/utils.ts b/apps/meteor/tests/e2e/page-objects/utils.ts index 066c5eac153f..15fb0b88b986 100644 --- a/apps/meteor/tests/e2e/page-objects/utils.ts +++ b/apps/meteor/tests/e2e/page-objects/utils.ts @@ -26,4 +26,10 @@ export class Utils { get btnModalConfirmDelete() { return this.page.locator('.rcx-modal >> button >> text="Delete"'); } + + getAlertByText(text: string): Locator { + return this.page.locator('[role="alert"]', { + hasText: text, + }); + } } diff --git a/packages/i18n/src/locales/de.i18n.json b/packages/i18n/src/locales/de.i18n.json index 0d8218149ad6..d3c5cb1eae9d 100644 --- a/packages/i18n/src/locales/de.i18n.json +++ b/packages/i18n/src/locales/de.i18n.json @@ -3272,7 +3272,6 @@ "Message_VideoRecorderEnabledDescription": "Erfordert, dass der Medientyp 'video/webm' in den \"Datei-Upload\"-Einstellungen als Medientyp akzeptiert wird", "messages": "Nachrichten", "Messages": "Nachrichten", - "Messages_selected": "Ausgewählte Nachrichten", "Messages_sent": "Nachrichten versandt", "Messages_that_are_sent_to_the_Incoming_WebHook_will_be_posted_here": "Nachrichten, die an den eingehenden Webhook gesendet werden, werden hier veröffentlicht", "Meta": "Metadaten", @@ -5506,4 +5505,4 @@ "Enterprise": "Unternehmen", "UpgradeToGetMore_engagement-dashboard_Title": "Analytics", "UpgradeToGetMore_auditing_Title": "Nachrichtenüberprüfung" -} +} \ No newline at end of file diff --git a/packages/i18n/src/locales/en.i18n.json b/packages/i18n/src/locales/en.i18n.json index 8b8a0b5e4b1b..e9c78cc644f9 100644 --- a/packages/i18n/src/locales/en.i18n.json +++ b/packages/i18n/src/locales/en.i18n.json @@ -26,7 +26,6 @@ "__roomName__encryption_keys_need_to_be_updated": "{{roomName}} encryption keys need to be updated to give you access. Another room member needs to be online for this to happen.", "removed__username__as__role_": "removed {{username}} as {{role}}", "set__username__as__role_": "set {{username}} as {{role}}", - "sequential_message": "sequential message", "This_room_encryption_has_been_enabled_by__username_": "This room's encryption has been enabled by {{username}}", "This_room_encryption_has_been_disabled_by__username_": "This room's encryption has been disabled by {{username}}", "Third_party_login": "Third-party login", @@ -1067,6 +1066,7 @@ "clean-channel-history_description": "Permission to Clear the history from channels", "clear": "Clear", "Clear_all_unreads_question": "Clear all unreads?", + "Clear_selection": "Clear selection", "clear_cache_now": "Clear Cache Now", "Clear_filters": "Clear filters", "clear_history": "Clear History", @@ -1813,6 +1813,7 @@ "Download": "Download", "Download_Destkop_App": "Download Desktop App", "Download_Disabled": "Download disabled", + "Download_file": "Download file", "Download_Info": "Download info", "Download_My_Data": "Download My Data (HTML)", "Download_Pending_Avatars": "Download Pending Avatars", @@ -2319,7 +2320,7 @@ "Expiration": "Expiration", "Expiration_(Days)": "Expiration (Days)", "Export_as_file": "Export as file", - "Export_Messages": "Export Messages", + "Export_Messages": "Export messages", "Export_My_Data": "Export My Data (JSON)", "expression": "Expression", "Extended": "Extended", @@ -3774,7 +3775,8 @@ "Message_VideoRecorderEnabledDescription": "Requires 'video/webm' files to be an accepted media type within 'File Upload' settings.", "messages": "messages", "Messages": "Messages", - "Messages_selected": "Messages selected", + "__count__messages_selected": "{{count}} messages selected", + "Messages_exported_successfully": "Messages exported successfully", "Messages_sent": "Messages sent", "Message_sent": "Message sent", "Message_viewed": "Message viewed", @@ -4975,8 +4977,9 @@ "Send_a_test_push_to_my_user": "Send a test push to my user", "Send_confirmation_email": "Send confirmation email", "Send_data_into_RocketChat_in_realtime": "Send data into Rocket.Chat in real-time.", - "Send_email": "Send Email", + "Send_email": "Send email", "Send_Email_SMTP_Warning": "Set up the SMTP server in email settings to enable.", + "Send_file_via_email": "Send file via email", "Send_invitation_email": "Send invitation email", "Send_invitation_email_error": "You haven't provided any valid email address.", "Send_invitation_email_info": "You can send multiple email invitations at once.", @@ -6685,6 +6688,7 @@ "Go_to_href": "Go to: {{href}}", "Anyone_can_send_new_messages": "Anyone can send new messages", "Select_messages_to_hide": "Select messages to hide", + "Select__count__messages": "Select {{count}} messages", "Name_cannot_have_special_characters": "Name cannot have spaces or special characters", "Resize": "Resize", "Zoom_out": "Zoom out", diff --git a/packages/i18n/src/locales/fi.i18n.json b/packages/i18n/src/locales/fi.i18n.json index 0f7abeb50c71..6365656bf6cc 100644 --- a/packages/i18n/src/locales/fi.i18n.json +++ b/packages/i18n/src/locales/fi.i18n.json @@ -3319,7 +3319,6 @@ "Message_VideoRecorderEnabledDescription": "Vaatii 'video/webm'-tiedostot hyväksytyksi mediatyypiksi 'Tiedoston lataus'-asetuksissa.", "messages": "viestit", "Messages": "Viestit", - "Messages_selected": "Valitut viestit", "Messages_sent": "Lähetetyt viestit", "Messages_that_are_sent_to_the_Incoming_WebHook_will_be_posted_here": "Saapuvaan WebHookiin lähetetyt viestit julkaistaan tässä.", "Meta": "Meta", @@ -5719,4 +5718,4 @@ "Theme_Appearence": "Teeman ulkoasu", "Enterprise": "Yritys", "UpgradeToGetMore_engagement-dashboard_Title": "Analytics" -} +} \ No newline at end of file diff --git a/packages/i18n/src/locales/hi-IN.i18n.json b/packages/i18n/src/locales/hi-IN.i18n.json index cbf6c1a11f13..1a6a29a71cd6 100644 --- a/packages/i18n/src/locales/hi-IN.i18n.json +++ b/packages/i18n/src/locales/hi-IN.i18n.json @@ -3454,7 +3454,6 @@ "Message_VideoRecorderEnabledDescription": "'फ़ाइल अपलोड' सेटिंग्स के अंतर्गत 'वीडियो/वेबएम' फ़ाइलों को एक स्वीकृत मीडिया प्रकार होना आवश्यक है।", "messages": "संदेशों", "Messages": "संदेशों", - "Messages_selected": "संदेश चयनित", "Messages_sent": "संदेश भेजे गए", "Messages_that_are_sent_to_the_Incoming_WebHook_will_be_posted_here": "इनकमिंग वेबहुक पर भेजे गए संदेश यहां पोस्ट किए जाएंगे।", "Meta": "मेटा", @@ -6103,4 +6102,4 @@ "Unlimited_seats": "असीमित सीटें", "Unlimited_MACs": "असीमित एमएसी", "Unlimited_seats_MACs": "असीमित सीटें और एमएसी" -} +} \ No newline at end of file diff --git a/packages/i18n/src/locales/hu.i18n.json b/packages/i18n/src/locales/hu.i18n.json index e5b68aeddbee..90b0c1d8ef82 100644 --- a/packages/i18n/src/locales/hu.i18n.json +++ b/packages/i18n/src/locales/hu.i18n.json @@ -3199,7 +3199,6 @@ "Message_VideoRecorderEnabledDescription": "Azt igényli, hogy a „video/webm” fájlok elfogadott médiatípus legyen a „Fájlfeltöltés” beállításaiban.", "messages": "üzenetek", "Messages": "Üzenetek", - "Messages_selected": "Üzenetek kijelölve", "Messages_sent": "Üzenetek elküldve", "Messages_that_are_sent_to_the_Incoming_WebHook_will_be_posted_here": "A bejövő webhorogra küldött üzenetek itt lesznek beküldve.", "Meta": "Meta", @@ -5407,4 +5406,4 @@ "Enterprise": "Vállalati", "UpgradeToGetMore_engagement-dashboard_Title": "Analitika", "UpgradeToGetMore_auditing_Title": "Üzenet ellenőrzés" -} +} \ No newline at end of file diff --git a/packages/i18n/src/locales/nn.i18n.json b/packages/i18n/src/locales/nn.i18n.json index d81230c554d1..9b9f6935a254 100644 --- a/packages/i18n/src/locales/nn.i18n.json +++ b/packages/i18n/src/locales/nn.i18n.json @@ -2855,7 +2855,6 @@ "Message_VideoRecorderEnabledDescription": "Krever at video / webm-filer skal være en akseptert medietype i \"Filopplastings\" -innstillinger.", "messages": "meldinger", "Messages": "meldinger", - "Messages_selected": "Meldinger er valgt", "Messages_sent": "Meldinger sendt", "Messages_that_are_sent_to_the_Incoming_WebHook_will_be_posted_here": "Meldinger som sendes til Incoming WebHook vil bli lagt ut her.", "Meta": "Meta", @@ -4559,4 +4558,4 @@ "free_per_month_user": "$0 per måned per bruker", "UpgradeToGetMore_engagement-dashboard_Title": "Analytics", "Buy_more": "Kjøp mer" -} +} \ No newline at end of file diff --git a/packages/i18n/src/locales/no.i18n.json b/packages/i18n/src/locales/no.i18n.json index 3baf4ebc7215..952b0ca9b711 100644 --- a/packages/i18n/src/locales/no.i18n.json +++ b/packages/i18n/src/locales/no.i18n.json @@ -2855,7 +2855,6 @@ "Message_VideoRecorderEnabledDescription": "Krever at video / webm-filer skal være en akseptert medietype i \"Filopplastings\" -innstillinger.", "messages": "meldinger", "Messages": "meldinger", - "Messages_selected": "Meldinger er valgt", "Messages_sent": "Meldinger sendt", "Messages_that_are_sent_to_the_Incoming_WebHook_will_be_posted_here": "Meldinger som sendes til Incoming WebHook vil bli lagt ut her.", "Meta": "Meta", @@ -4561,4 +4560,4 @@ "free_per_month_user": "$0 per måned per bruker", "UpgradeToGetMore_engagement-dashboard_Title": "Analytics", "Buy_more": "Kjøp mer" -} +} \ No newline at end of file diff --git a/packages/i18n/src/locales/pl.i18n.json b/packages/i18n/src/locales/pl.i18n.json index 3a58a1a4c4eb..f43c37775fa3 100644 --- a/packages/i18n/src/locales/pl.i18n.json +++ b/packages/i18n/src/locales/pl.i18n.json @@ -26,7 +26,6 @@ "__roomName__encryption_keys_need_to_be_updated": "{{roomName}} klucze szyfrowania muszą zostać zaktualizowane, aby umożliwić dostęp. Aby tak się stało, inny członek pokoju musi być online.", "removed__username__as__role_": "usunięto {{username}} jako {{role}}", "set__username__as__role_": "ustaw {{username}} jako {{role}}", - "sequential_message": "komunikat sekwencyjny", "This_room_encryption_has_been_enabled_by__username_": "Użytkownik {{username}} włączył szyfrowanie w tym pokoju", "This_room_encryption_has_been_disabled_by__username_": "Użytkownik {{username}} wyłączył szyfrowanie w tym pokoju", "Third_party_login": "Logowanie przez stronę trzecią", @@ -3204,7 +3203,6 @@ "Message_VideoRecorderEnabledDescription": "Wymaga plików \"wideo / webm\", aby były akceptowanym typem mediów w ustawieniach \"Przesyłanie pliku\".", "messages": "Wiadomości", "Messages": "Wiadomości", - "Messages_selected": "Wybrane wiadomości", "Messages_sent": "Wiadomości wysłane", "Messages_that_are_sent_to_the_Incoming_WebHook_will_be_posted_here": "Wiadomości, które zostaną przesłane przez WebHook będą publikowane tutaj.", "Meta": "Meta", @@ -5405,4 +5403,4 @@ "Broadcast_hint_enabled": "Tylko właściciele {{roomType}} mogą pisać nowe wiadomości, ale każdy może odpowiadać w wątku", "Anyone_can_send_new_messages": "Każdy może wysyłać nowe wiadomości", "Select_messages_to_hide": "Wybierz wiadomości do ukrycia" -} +} \ No newline at end of file diff --git a/packages/i18n/src/locales/se.i18n.json b/packages/i18n/src/locales/se.i18n.json index 39a5595b0525..3ac677c4dcbd 100644 --- a/packages/i18n/src/locales/se.i18n.json +++ b/packages/i18n/src/locales/se.i18n.json @@ -24,7 +24,6 @@ "__roomName__encryption_keys_need_to_be_updated": "{{roomName}} encryption keys need to be updated to give you access. Another room member needs to be online for this to happen.", "removed__username__as__role_": "removed {{username}} as {{role}}", "set__username__as__role_": "set {{username}} as {{role}}", - "sequential_message": "sequential message", "This_room_encryption_has_been_enabled_by__username_": "This room's encryption has been enabled by {{username}}", "This_room_encryption_has_been_disabled_by__username_": "This room's encryption has been disabled by {{username}}", "Third_party_login": "Third-party login", @@ -3679,7 +3678,6 @@ "Message_VideoRecorderEnabledDescription": "Requires 'video/webm' files to be an accepted media type within 'File Upload' settings.", "messages": "messages", "Messages": "Messages", - "Messages_selected": "Messages selected", "Messages_sent": "Messages sent", "Message_sent": "Message sent", "Message_viewed": "Message viewed", @@ -6576,4 +6574,4 @@ "Sidepanel_navigation_description": "Display channels and/or discussions associated with teams by default. This allows team owners to customize communication methods to best meet their team’s needs. This is currently in feature preview and will be a premium capability once fully released.", "Show_channels_description": "Show team channels in second sidebar", "Show_discussions_description": "Show team discussions in second sidebar" -} +} \ No newline at end of file diff --git a/packages/i18n/src/locales/sv.i18n.json b/packages/i18n/src/locales/sv.i18n.json index 8615418f947c..69b59f03c321 100644 --- a/packages/i18n/src/locales/sv.i18n.json +++ b/packages/i18n/src/locales/sv.i18n.json @@ -3324,7 +3324,6 @@ "Message_VideoRecorderEnabledDescription": "Kräver \"video/webm\"-filer för att vara en accepterad medietyp inom inställningarna \"Filuppladdning\".", "messages": "Meddelanden", "Messages": "Meddelanden", - "Messages_selected": "Valda meddelanden", "Messages_sent": "Skickade meddelanden", "Messages_that_are_sent_to_the_Incoming_WebHook_will_be_posted_here": "Meddelanden som skickas till inkommande WebHook kommer att publiceras här.", "Meta": "Meta", @@ -5721,4 +5720,4 @@ "Uninstall_grandfathered_app": "Avinstallera {{appName}}?", "Enterprise": "Enterprise", "UpgradeToGetMore_engagement-dashboard_Title": "Analytics" -} +} \ No newline at end of file diff --git a/packages/ui-composer/src/MessageFooterCallout/MessageFooterCalloutContent.tsx b/packages/ui-composer/src/MessageFooterCallout/MessageFooterCalloutContent.tsx index deab14822f83..2d5c87b57d34 100644 --- a/packages/ui-composer/src/MessageFooterCallout/MessageFooterCalloutContent.tsx +++ b/packages/ui-composer/src/MessageFooterCallout/MessageFooterCalloutContent.tsx @@ -1,14 +1,13 @@ import { Box } from '@rocket.chat/fuselage'; -import type { ReactElement, ReactNode } from 'react'; +import type { ComponentProps } from 'react'; import { forwardRef } from 'react'; -const MessageFooterCalloutContent = forwardRef< - HTMLButtonElement, - { - children: ReactNode; - } ->(function MessageFooterCalloutContent(props, ref): ReactElement { - return ; -}); +type MessageFooterCalloutContentProps = ComponentProps; + +const MessageFooterCalloutContent = forwardRef( + function MessageFooterCalloutContent(props, ref) { + return ; + }, +); export default MessageFooterCalloutContent; From 278af14a55da31111af72217f7ee013604d5a134 Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Thu, 19 Dec 2024 16:09:00 -0300 Subject: [PATCH 16/28] regression: fix error observe (#34222) --- .../client/providers/OmnichannelProvider.tsx | 21 +++++++------------ 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/apps/meteor/client/providers/OmnichannelProvider.tsx b/apps/meteor/client/providers/OmnichannelProvider.tsx index aeb83530e059..0080c340b5d5 100644 --- a/apps/meteor/client/providers/OmnichannelProvider.tsx +++ b/apps/meteor/client/providers/OmnichannelProvider.tsx @@ -52,6 +52,8 @@ const OmnichannelProvider = ({ children }: OmnichannelProviderProps) => { OmnichannelSortingMechanismSettingType.Timestamp, ); + const lastQueueSize = useRef(0); + const loggerRef = useRef(new ClientLogger('OmnichannelProvider')); const hasAccess = usePermission('view-l-room'); const canViewOmnichannelQueue = usePermission('view-livechat-queue'); @@ -151,20 +153,11 @@ const OmnichannelProvider = ({ children }: OmnichannelProviderProps) => { ); useEffect(() => { - const observer = LivechatInquiry.find( - { status: LivechatInquiryStatus.QUEUED }, - { - sort: getOmniChatSortQuery(omnichannelSortingMechanism), - limit: omnichannelPoolMaxIncoming, - }, - ).observe({ - added: (_inquiry) => { - KonchatNotification.newRoom(); - }, - }); - - return () => observer.stop(); - }, [omnichannelPoolMaxIncoming, omnichannelSortingMechanism]); + if (lastQueueSize.current < (queue?.length ?? 0)) { + KonchatNotification.newRoom(); + } + lastQueueSize.current = queue?.length ?? 0; + }, [queue?.length]); useOmnichannelContinuousSoundNotification(queue ?? []); From ed02a335e45797ba142d2592c417e7a0a4ab59d5 Mon Sep 17 00:00:00 2001 From: Martin Schoeler Date: Thu, 19 Dec 2024 17:01:35 -0300 Subject: [PATCH 17/28] fix: race condition in livechat popout mode cross origin (#34158) --- .changeset/new-mails-add.md | 5 +++++ .../src/components/Screen/ScreenProvider.tsx | 18 +++++++++++++++--- packages/livechat/src/lib/hooks.ts | 4 ++-- packages/livechat/src/widget.ts | 13 +++---------- 4 files changed, 25 insertions(+), 15 deletions(-) create mode 100644 .changeset/new-mails-add.md diff --git a/.changeset/new-mails-add.md b/.changeset/new-mails-add.md new file mode 100644 index 000000000000..87446ac8b4c1 --- /dev/null +++ b/.changeset/new-mails-add.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/livechat": patch +--- + +Fixes issue that caused different sessions when opening a livechat popover in cross domain diff --git a/packages/livechat/src/components/Screen/ScreenProvider.tsx b/packages/livechat/src/components/Screen/ScreenProvider.tsx index aa1dd61c59be..2bccafd60c6f 100644 --- a/packages/livechat/src/components/Screen/ScreenProvider.tsx +++ b/packages/livechat/src/components/Screen/ScreenProvider.tsx @@ -4,6 +4,7 @@ import { useCallback, useContext, useEffect, useState } from 'preact/hooks'; import { parse } from 'query-string'; import { isActiveSession } from '../../helpers/isActiveSession'; +import { createOrUpdateGuest, evaluateChangesAndLoadConfigByFields } from '../../lib/hooks'; import { loadConfig } from '../../lib/main'; import { parentCall } from '../../lib/parentCall'; import { loadMessages } from '../../lib/room'; @@ -76,7 +77,7 @@ export const ScreenProvider: FunctionalComponent = ({ children }) => { } = useContext(StoreContext); const { department, name, email } = iframe.guest || {}; const { color, position: configPosition, background } = config.theme || {}; - const { livechatLogo, hideWatermark = false } = config.settings || {}; + const { livechatLogo, hideWatermark = false, registrationForm } = config.settings || {}; const { color: customColor, @@ -137,15 +138,26 @@ export const ScreenProvider: FunctionalComponent = ({ children }) => { const dismissNotification = () => !isActiveSession(); - const checkPoppedOutWindow = useCallback(() => { + const checkPoppedOutWindow = useCallback(async () => { // Checking if the window is poppedOut and setting parent minimized if yes for the restore purpose const poppedOut = parse(window.location.search).mode === 'popout'; + const { token = '' } = parse(window.location.search); setPopedOut(poppedOut); if (poppedOut) { dispatch({ minimized: false, undocked: true }); } - }, [dispatch]); + + if (token && typeof token === 'string') { + if (registrationForm && !name && !email) { + dispatch({ token }); + return; + } + await evaluateChangesAndLoadConfigByFields(async () => { + await createOrUpdateGuest({ token }); + }); + } + }, [dispatch, email, name, registrationForm]); useEffect(() => { checkPoppedOutWindow(); diff --git a/packages/livechat/src/lib/hooks.ts b/packages/livechat/src/lib/hooks.ts index e1a980fe65e3..cdfde40f16e5 100644 --- a/packages/livechat/src/lib/hooks.ts +++ b/packages/livechat/src/lib/hooks.ts @@ -11,7 +11,7 @@ import { createToken } from './random'; import { loadMessages } from './room'; import Triggers from './triggers'; -const evaluateChangesAndLoadConfigByFields = async (fn: () => Promise) => { +export const evaluateChangesAndLoadConfigByFields = async (fn: () => Promise) => { const oldStore = JSON.parse( JSON.stringify({ user: store.state.user || {}, @@ -42,7 +42,7 @@ const evaluateChangesAndLoadConfigByFields = async (fn: () => Promise) => } }; -const createOrUpdateGuest = async (guest: StoreState['guest']) => { +export const createOrUpdateGuest = async (guest: StoreState['guest']) => { if (!guest) { return; } diff --git a/packages/livechat/src/widget.ts b/packages/livechat/src/widget.ts index 234d61f87096..ca46ab944913 100644 --- a/packages/livechat/src/widget.ts +++ b/packages/livechat/src/widget.ts @@ -489,20 +489,13 @@ const api: InternalWidgetAPI = { if (!config.url) { throw new Error('Config.url is not set!'); } + const urlToken = token && `&token=${token}`; + api.popup = window.open( - `${config.url}${config.url.lastIndexOf('?') > -1 ? '&' : '?'}mode=popout`, + `${config.url}${config.url.lastIndexOf('?') > -1 ? '&' : '?'}mode=popout${urlToken}`, 'livechat-popout', `width=${WIDGET_OPEN_WIDTH}, height=${widgetHeight}, toolbars=no`, ); - - const data = { - src: 'rocketchat', - fn: 'setGuestToken', - args: [token], - }; - - api.popup?.postMessage(data, '*'); - api.popup?.focus(); }, removeWidget() { From 76f6239ff1a9f34f163c03c140c4ceba62563b4e Mon Sep 17 00:00:00 2001 From: Douglas Gubert Date: Thu, 19 Dec 2024 18:21:34 -0300 Subject: [PATCH 18/28] fix(apps): runtime orchestration fixes (#34205) --- .changeset/blue-items-raise.md | 22 +++++++++++++++++++ .changeset/gold-comics-taste.md | 22 +++++++++++++++++++ .changeset/proud-planets-applaud.md | 22 +++++++++++++++++++ .../server/lib/getAppsStatistics.ts | 8 +++---- packages/apps-engine/deno-runtime/deno.lock | 15 ++----------- .../deno-runtime/lib/metricsCollector.ts | 15 +++++++++++-- .../apps-engine/deno-runtime/lib/parseArgs.ts | 11 ++++++++++ packages/apps-engine/deno-runtime/main.ts | 5 ++++- packages/apps-engine/src/server/AppManager.ts | 2 +- packages/apps-engine/src/server/ProxiedApp.ts | 4 ++-- .../runtime/deno/AppsEngineDenoRuntime.ts | 8 +++++++ .../server/runtime/deno/LivenessManager.ts | 13 +++++++++-- 12 files changed, 121 insertions(+), 26 deletions(-) create mode 100644 .changeset/blue-items-raise.md create mode 100644 .changeset/gold-comics-taste.md create mode 100644 .changeset/proud-planets-applaud.md create mode 100644 packages/apps-engine/deno-runtime/lib/parseArgs.ts diff --git a/.changeset/blue-items-raise.md b/.changeset/blue-items-raise.md new file mode 100644 index 000000000000..7b5592a9efb2 --- /dev/null +++ b/.changeset/blue-items-raise.md @@ -0,0 +1,22 @@ +--- +'@rocket.chat/fuselage-ui-kit': patch +'@rocket.chat/instance-status': patch +'@rocket.chat/ui-theming': patch +'@rocket.chat/model-typings': patch +'@rocket.chat/ui-video-conf': patch +'@rocket.chat/uikit-playground': patch +'@rocket.chat/core-typings': patch +'@rocket.chat/rest-typings': patch +'@rocket.chat/apps-engine': patch +'@rocket.chat/ui-composer': patch +'@rocket.chat/ui-contexts': patch +'@rocket.chat/gazzodown': patch +'@rocket.chat/ui-avatar': patch +'@rocket.chat/ui-client': patch +'@rocket.chat/livechat': patch +'@rocket.chat/ui-voip': patch +'@rocket.chat/i18n': patch +'@rocket.chat/meteor': patch +--- + +Fixes an error where the engine would not retry a subprocess restart if the last attempt failed diff --git a/.changeset/gold-comics-taste.md b/.changeset/gold-comics-taste.md new file mode 100644 index 000000000000..c9f864a0ffb5 --- /dev/null +++ b/.changeset/gold-comics-taste.md @@ -0,0 +1,22 @@ +--- +'@rocket.chat/fuselage-ui-kit': patch +'@rocket.chat/instance-status': patch +'@rocket.chat/ui-theming': patch +'@rocket.chat/model-typings': patch +'@rocket.chat/ui-video-conf': patch +'@rocket.chat/uikit-playground': patch +'@rocket.chat/core-typings': patch +'@rocket.chat/rest-typings': patch +'@rocket.chat/apps-engine': patch +'@rocket.chat/ui-composer': patch +'@rocket.chat/ui-contexts': patch +'@rocket.chat/gazzodown': patch +'@rocket.chat/ui-avatar': patch +'@rocket.chat/ui-client': patch +'@rocket.chat/livechat': patch +'@rocket.chat/ui-voip': patch +'@rocket.chat/i18n': patch +'@rocket.chat/meteor': patch +--- + +Fixes error propagation when trying to get the status of apps in some cases diff --git a/.changeset/proud-planets-applaud.md b/.changeset/proud-planets-applaud.md new file mode 100644 index 000000000000..7f692f780271 --- /dev/null +++ b/.changeset/proud-planets-applaud.md @@ -0,0 +1,22 @@ +--- +'@rocket.chat/fuselage-ui-kit': patch +'@rocket.chat/instance-status': patch +'@rocket.chat/ui-theming': patch +'@rocket.chat/model-typings': patch +'@rocket.chat/ui-video-conf': patch +'@rocket.chat/uikit-playground': patch +'@rocket.chat/core-typings': patch +'@rocket.chat/rest-typings': patch +'@rocket.chat/apps-engine': patch +'@rocket.chat/ui-composer': patch +'@rocket.chat/ui-contexts': patch +'@rocket.chat/gazzodown': patch +'@rocket.chat/ui-avatar': patch +'@rocket.chat/ui-client': patch +'@rocket.chat/livechat': patch +'@rocket.chat/ui-voip': patch +'@rocket.chat/i18n': patch +'@rocket.chat/meteor': patch +--- + +Fixes wrong data being reported to total failed apps metrics and statistics diff --git a/apps/meteor/app/statistics/server/lib/getAppsStatistics.ts b/apps/meteor/app/statistics/server/lib/getAppsStatistics.ts index 40c8e1946e36..90e05d192356 100644 --- a/apps/meteor/app/statistics/server/lib/getAppsStatistics.ts +++ b/apps/meteor/app/statistics/server/lib/getAppsStatistics.ts @@ -41,7 +41,7 @@ async function _getAppsStatistics(): Promise { totalInstalled++; const status = await app.getStatus(); - const storageItem = await app.getStorageItem(); + const storageItem = app.getStorageItem(); if (storageItem.installationSource === AppInstallationSource.PRIVATE) { totalPrivateApps++; @@ -51,12 +51,10 @@ async function _getAppsStatistics(): Promise { } } - if (status === AppStatus.MANUALLY_DISABLED) { - totalFailed++; - } - if (AppStatusUtils.isEnabled(status)) { totalActive++; + } else if (status !== AppStatus.MANUALLY_DISABLED) { + totalFailed++; } }), ); diff --git a/packages/apps-engine/deno-runtime/deno.lock b/packages/apps-engine/deno-runtime/deno.lock index 86cebf98f63a..1154e7709f11 100644 --- a/packages/apps-engine/deno-runtime/deno.lock +++ b/packages/apps-engine/deno-runtime/deno.lock @@ -90,18 +90,7 @@ "https://deno.land/std@0.203.0/testing/bdd.ts": "3f446df5ef8e856a869e8eec54c8482590415741ff0b6358a00c43486cc15769", "https://deno.land/std@0.203.0/testing/mock.ts": "6576b4aa55ee20b1990d656a78fff83599e190948c00e9f25a7f3ac5e9d6492d", "https://deno.land/std@0.216.0/io/types.ts": "748bbb3ac96abda03594ef5a0db15ce5450dcc6c0d841c8906f8b10ac8d32c96", - "https://deno.land/std@0.216.0/io/write_all.ts": "24aac2312bb21096ae3ae0b102b22c26164d3249dff96dbac130958aa736f038" - }, - "workspace": { - "dependencies": [ - "npm:@msgpack/msgpack@3.0.0-beta2", - "npm:@rocket.chat/ui-kit@^0.31.22", - "npm:acorn-walk@8.2.0", - "npm:acorn@8.10.0", - "npm:astring@1.8.6", - "npm:jsonrpc-lite@2.2.0", - "npm:stack-trace@0.0.10", - "npm:uuid@8.3.2" - ] + "https://deno.land/std@0.216.0/io/write_all.ts": "24aac2312bb21096ae3ae0b102b22c26164d3249dff96dbac130958aa736f038", + "https://jsr.io/@std/cli/1.0.9/parse_args.ts": "29ac18602d8836d2723cab1d90111ff954acc369f184626a3f9f677e3185caef" } } diff --git a/packages/apps-engine/deno-runtime/lib/metricsCollector.ts b/packages/apps-engine/deno-runtime/lib/metricsCollector.ts index c257b6c8a35b..273ef2463d59 100644 --- a/packages/apps-engine/deno-runtime/lib/metricsCollector.ts +++ b/packages/apps-engine/deno-runtime/lib/metricsCollector.ts @@ -3,6 +3,7 @@ import { Queue } from "./messenger.ts"; export function collectMetrics() { return { + pid: Deno.pid, queueSize: Queue.getCurrentSize(), } }; @@ -15,6 +16,16 @@ export async function sendMetrics() { await writeAll(Deno.stderr, encoder.encode(JSON.stringify(metrics))); } -export function startMetricsReport() { - setInterval(sendMetrics, 5000); +let intervalId: number; + +export function startMetricsReport(frequencyInMs = 5000) { + if (intervalId) { + throw new Error('There is already an active metrics report'); + } + + intervalId = setInterval(sendMetrics, frequencyInMs); +} + +export function abortMetricsReport() { + clearInterval(intervalId); } diff --git a/packages/apps-engine/deno-runtime/lib/parseArgs.ts b/packages/apps-engine/deno-runtime/lib/parseArgs.ts new file mode 100644 index 000000000000..10c59cbca3a7 --- /dev/null +++ b/packages/apps-engine/deno-runtime/lib/parseArgs.ts @@ -0,0 +1,11 @@ +import { parseArgs as $parseArgs } from "https://jsr.io/@std/cli/1.0.9/parse_args.ts"; + +export type ParsedArgs = { + subprocess: string; + spawnId: number; + metricsReportFrequencyInMs?: number; +} + +export function parseArgs(args: string[]): ParsedArgs { + return $parseArgs(args); +} diff --git a/packages/apps-engine/deno-runtime/main.ts b/packages/apps-engine/deno-runtime/main.ts index 3983c8d52407..596128952168 100644 --- a/packages/apps-engine/deno-runtime/main.ts +++ b/packages/apps-engine/deno-runtime/main.ts @@ -23,6 +23,7 @@ import handleApp from './handlers/app/handler.ts'; import handleScheduler from './handlers/scheduler-handler.ts'; import registerErrorListeners from './error-handlers.ts'; import { startMetricsReport } from "./lib/metricsCollector.ts"; +import { parseArgs } from "./lib/parseArgs.ts"; type Handlers = { app: typeof handleApp; @@ -128,8 +129,10 @@ async function main() { } } +const mainArgs = parseArgs(Deno.args); + registerErrorListeners(); main(); -startMetricsReport(); +startMetricsReport(mainArgs.metricsReportFrequencyInMs); diff --git a/packages/apps-engine/src/server/AppManager.ts b/packages/apps-engine/src/server/AppManager.ts index 0bb930b723a1..0ea7e998e995 100644 --- a/packages/apps-engine/src/server/AppManager.ts +++ b/packages/apps-engine/src/server/AppManager.ts @@ -271,7 +271,7 @@ export class AppManager { const prl = new ProxiedApp(this, item, { // Maybe we should have an "EmptyRuntime" class for this? getStatus() { - return AppStatus.COMPILER_ERROR_DISABLED; + return Promise.resolve(AppStatus.COMPILER_ERROR_DISABLED); }, } as unknown as DenoRuntimeSubprocessController); diff --git a/packages/apps-engine/src/server/ProxiedApp.ts b/packages/apps-engine/src/server/ProxiedApp.ts index 4307f9c9fc93..7810ab362422 100644 --- a/packages/apps-engine/src/server/ProxiedApp.ts +++ b/packages/apps-engine/src/server/ProxiedApp.ts @@ -1,5 +1,5 @@ import type { AppManager } from './AppManager'; -import type { AppStatus } from '../definition/AppStatus'; +import { AppStatus } from '../definition/AppStatus'; import { AppsEngineException } from '../definition/exceptions'; import type { IAppAuthorInfo, IAppInfo } from '../definition/metadata'; import { AppMethod } from '../definition/metadata'; @@ -79,7 +79,7 @@ export class ProxiedApp { } public async getStatus(): Promise { - return this.appRuntime.getStatus(); + return this.appRuntime.getStatus().catch(() => AppStatus.UNKNOWN); } public async setStatus(status: AppStatus, silent?: boolean): Promise { diff --git a/packages/apps-engine/src/server/runtime/deno/AppsEngineDenoRuntime.ts b/packages/apps-engine/src/server/runtime/deno/AppsEngineDenoRuntime.ts index 983b0a9343d3..fec78b835984 100644 --- a/packages/apps-engine/src/server/runtime/deno/AppsEngineDenoRuntime.ts +++ b/packages/apps-engine/src/server/runtime/deno/AppsEngineDenoRuntime.ts @@ -88,6 +88,11 @@ export class DenoRuntimeSubprocessController extends EventEmitter { private state: 'uninitialized' | 'ready' | 'invalid' | 'restarting' | 'unknown' | 'stopped'; + /** + * Incremental id that keeps track of how many times we've spawned a process for this app + */ + private spawnId = 0; + private readonly debug: debug.Debugger; private readonly options = { @@ -149,6 +154,8 @@ export class DenoRuntimeSubprocessController extends EventEmitter { denoWrapperPath, '--subprocess', this.appPackage.info.id, + '--spawnId', + String(this.spawnId++), ]; // If the app doesn't request any permissions, it gets the default set of permissions, which includes "networking" @@ -296,6 +303,7 @@ export class DenoRuntimeSubprocessController extends EventEmitter { logger.info('Successfully restarted app subprocess'); } catch (e) { logger.error("Failed to restart app's subprocess", { error: e.message || e }); + throw e; } finally { await this.logStorage.storeEntries(AppConsole.toStorageEntry(this.getAppId(), logger)); } diff --git a/packages/apps-engine/src/server/runtime/deno/LivenessManager.ts b/packages/apps-engine/src/server/runtime/deno/LivenessManager.ts index b4c8dfb5d520..3f363c5402f1 100644 --- a/packages/apps-engine/src/server/runtime/deno/LivenessManager.ts +++ b/packages/apps-engine/src/server/runtime/deno/LivenessManager.ts @@ -7,10 +7,11 @@ import type { ProcessMessenger } from './ProcessMessenger'; const COMMAND_PING = '_zPING'; const defaultOptions: LivenessManager['options'] = { - pingRequestTimeout: 10000, + pingRequestTimeout: 1000, pingFrequencyInMS: 10000, consecutiveTimeoutLimit: 4, maxRestarts: Infinity, + restartAttemptDelayInMS: 1000, }; /** @@ -36,6 +37,9 @@ export class LivenessManager { // Limit of times we can try to restart a process maxRestarts: number; + + // Time to delay the next restart attempt after a failed one + restartAttemptDelayInMS: number; }; private subprocess: ChildProcess; @@ -198,7 +202,12 @@ export class LivenessManager { pid: this.subprocess.pid, }); - await this.controller.restartApp(); + try { + await this.controller.restartApp(); + } catch (e) { + this.debug('Restart attempt failed. Retrying in %dms', this.options.restartAttemptDelayInMS); + setTimeout(() => this.restartProcess('Failed restart attempt'), this.options.restartAttemptDelayInMS); + } this.pingTimeoutConsecutiveCount = 0; this.restartCount++; From 2e4af86f6463166ba4d0b37b153b89ab246e112a Mon Sep 17 00:00:00 2001 From: Matheus Barbosa Silva <36537004+matheusbsilva137@users.noreply.github.com> Date: Thu, 19 Dec 2024 21:24:34 -0300 Subject: [PATCH 19/28] feat: Collect new statistics for the Contact Identification feature (#33895) Co-authored-by: Pierre Lehnen <55164754+pierre-lehnen-rc@users.noreply.github.com> Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com> --- .changeset/perfect-ties-tell.md | 21 +++++++ .../app/importer/server/classes/Importer.ts | 11 +++- .../classes/converters/RecordConverter.ts | 14 ++++- .../server/lib/contacts/updateContact.ts | 21 +++++-- .../lib/getContactVerificationStatistics.ts | 41 ++++++++++++ .../app/statistics/server/lib/statistics.ts | 2 + .../contactInfo/AdvancedContactModal.tsx | 22 ++++++- .../meteor/ee/server/patches/mergeContacts.ts | 15 +++-- .../server/settings/contact-verification.ts | 25 ++++++++ .../server/lib/mergeContacts.spec.ts | 7 +++ .../server/models/raw/LivechatContacts.ts | 63 +++++++++++++++++++ packages/core-typings/src/IStats.ts | 16 +++++ .../src/models/ILivechatContactsModel.ts | 17 ++++- 13 files changed, 259 insertions(+), 16 deletions(-) create mode 100644 .changeset/perfect-ties-tell.md create mode 100644 apps/meteor/app/statistics/server/lib/getContactVerificationStatistics.ts diff --git a/.changeset/perfect-ties-tell.md b/.changeset/perfect-ties-tell.md new file mode 100644 index 000000000000..e129fa0937c8 --- /dev/null +++ b/.changeset/perfect-ties-tell.md @@ -0,0 +1,21 @@ +--- +"@rocket.chat/meteor": minor +"@rocket.chat/core-typings": minor +"@rocket.chat/model-typings": minor +--- + +Adds statistics related to the new **Contact Identification** feature: +- `totalContacts`: Total number of contacts; +- `totalUnknownContacts`: Total number of unknown contacts; +- `totalMergedContacts`: Total number of merged contacts; +- `totalConflicts`: Total number of merge conflicts; +- `totalResolvedConflicts`: Total number of resolved conflicts; +- `totalBlockedContacts`: Total number of blocked contacts; +- `totalPartiallyBlockedContacts`: Total number of partially blocked contacts; +- `totalFullyBlockedContacts`: Total number of fully blocked contacts; +- `totalVerifiedContacts`: Total number of verified contacts; +- `avgChannelsPerContact`: Average number of channels per contact; +- `totalContactsWithoutChannels`: Number of contacts without channels; +- `totalImportedContacts`: Total number of imported contacts; +- `totalUpsellViews`: Total number of "Advanced Contact Management" Upsell CTA views; +- `totalUpsellClicks`: Total number of "Advanced Contact Management" Upsell CTA clicks; diff --git a/apps/meteor/app/importer/server/classes/Importer.ts b/apps/meteor/app/importer/server/classes/Importer.ts index 49430c101d45..32834ed15c4a 100644 --- a/apps/meteor/app/importer/server/classes/Importer.ts +++ b/apps/meteor/app/importer/server/classes/Importer.ts @@ -18,7 +18,7 @@ import { ImportDataConverter } from './ImportDataConverter'; import type { ConverterOptions } from './ImportDataConverter'; import { ImporterProgress } from './ImporterProgress'; import { ImporterWebsocket } from './ImporterWebsocket'; -import { notifyOnSettingChangedById } from '../../../lib/server/lib/notifyListener'; +import { notifyOnSettingChanged, notifyOnSettingChangedById } from '../../../lib/server/lib/notifyListener'; import { t } from '../../../utils/lib/i18n'; import { ProgressStep, ImportPreparingStartedStates } from '../../lib/ImporterProgressStep'; import type { ImporterInfo } from '../definitions/ImporterInfo'; @@ -183,6 +183,13 @@ export class Importer { } }; + const afterContactsBatchFn = async (successCount: number) => { + const { value } = await Settings.incrementValueById('Contacts_Importer_Count', successCount, { returnDocument: 'after' }); + if (value) { + void notifyOnSettingChanged(value); + } + }; + const onErrorFn = async () => { await this.addCountCompleted(1); }; @@ -197,7 +204,7 @@ export class Importer { await this.converter.convertUsers({ beforeImportFn, afterImportFn, onErrorFn, afterBatchFn }); await this.updateProgress(ProgressStep.IMPORTING_CONTACTS); - await this.converter.convertContacts({ beforeImportFn, afterImportFn, onErrorFn }); + await this.converter.convertContacts({ beforeImportFn, afterImportFn, onErrorFn, afterBatchFn: afterContactsBatchFn }); await this.updateProgress(ProgressStep.IMPORTING_CHANNELS); await this.converter.convertChannels(startedByUserId, { beforeImportFn, afterImportFn, onErrorFn }); diff --git a/apps/meteor/app/importer/server/classes/converters/RecordConverter.ts b/apps/meteor/app/importer/server/classes/converters/RecordConverter.ts index 9003fe4bd416..d530b96212d7 100644 --- a/apps/meteor/app/importer/server/classes/converters/RecordConverter.ts +++ b/apps/meteor/app/importer/server/classes/converters/RecordConverter.ts @@ -27,6 +27,8 @@ export class RecordConverter Promise } = {}): Promise { const records = await this.getDataToImport(); this.skippedCount = 0; this.failedCount = 0; + this.newCount = 0; for await (const record of records) { const { _id } = record; @@ -214,8 +218,11 @@ export class RecordConverter { diff --git a/apps/meteor/app/livechat/server/lib/contacts/updateContact.ts b/apps/meteor/app/livechat/server/lib/contacts/updateContact.ts index 752bb62b301f..023568bd11de 100644 --- a/apps/meteor/app/livechat/server/lib/contacts/updateContact.ts +++ b/apps/meteor/app/livechat/server/lib/contacts/updateContact.ts @@ -1,5 +1,5 @@ import type { ILivechatContact, ILivechatContactChannel } from '@rocket.chat/core-typings'; -import { LivechatContacts, LivechatInquiry, LivechatRooms, Subscriptions } from '@rocket.chat/models'; +import { LivechatContacts, LivechatInquiry, LivechatRooms, Settings, Subscriptions } from '@rocket.chat/models'; import { getAllowedCustomFields } from './getAllowedCustomFields'; import { validateContactManager } from './validateContactManager'; @@ -8,6 +8,7 @@ import { notifyOnSubscriptionChangedByVisitorIds, notifyOnRoomChangedByContactId, notifyOnLivechatInquiryChangedByVisitorIds, + notifyOnSettingChanged, } from '../../../../lib/server/lib/notifyListener'; export type UpdateContactParams = { @@ -24,9 +25,12 @@ export type UpdateContactParams = { export async function updateContact(params: UpdateContactParams): Promise { const { contactId, name, emails, phones, customFields: receivedCustomFields, contactManager, channels, wipeConflicts } = params; - const contact = await LivechatContacts.findOneById>(contactId, { - projection: { _id: 1, name: 1, customFields: 1 }, - }); + const contact = await LivechatContacts.findOneById>( + contactId, + { + projection: { _id: 1, name: 1, customFields: 1, conflictingFields: 1 }, + }, + ); if (!contact) { throw new Error('error-contact-not-found'); @@ -36,6 +40,15 @@ export async function updateContact(params: UpdateContactParams): Promise customField._id); const currentCustomFieldsIds = Object.keys(contact.customFields || {}); diff --git a/apps/meteor/app/statistics/server/lib/getContactVerificationStatistics.ts b/apps/meteor/app/statistics/server/lib/getContactVerificationStatistics.ts new file mode 100644 index 000000000000..f1072451c972 --- /dev/null +++ b/apps/meteor/app/statistics/server/lib/getContactVerificationStatistics.ts @@ -0,0 +1,41 @@ +import type { IStats } from '@rocket.chat/core-typings'; +import { LivechatContacts } from '@rocket.chat/models'; + +import { settings } from '../../../settings/server'; + +export async function getContactVerificationStatistics(): Promise { + const [ + totalContacts, + totalUnknownContacts, + [{ totalConflicts, avgChannelsPerContact } = { totalConflicts: 0, avgChannelsPerContact: 0 }], + totalBlockedContacts, + totalFullyBlockedContacts, + totalVerifiedContacts, + totalContactsWithoutChannels, + ] = await Promise.all([ + LivechatContacts.estimatedDocumentCount(), + LivechatContacts.countUnknown(), + LivechatContacts.getStatistics().toArray(), + LivechatContacts.countBlocked(), + LivechatContacts.countFullyBlocked(), + LivechatContacts.countVerified(), + LivechatContacts.countContactsWithoutChannels(), + ]); + + return { + totalContacts, + totalUnknownContacts, + totalMergedContacts: settings.get('Merged_Contacts_Count'), + totalConflicts, + totalResolvedConflicts: settings.get('Resolved_Conflicts_Count'), + totalBlockedContacts, + totalPartiallyBlockedContacts: totalBlockedContacts - totalFullyBlockedContacts, + totalFullyBlockedContacts, + totalVerifiedContacts, + avgChannelsPerContact, + totalContactsWithoutChannels, + totalImportedContacts: settings.get('Contacts_Importer_Count'), + totalUpsellViews: settings.get('Advanced_Contact_Upsell_Views_Count'), + totalUpsellClicks: settings.get('Advanced_Contact_Upsell_Clicks_Count'), + }; +} diff --git a/apps/meteor/app/statistics/server/lib/statistics.ts b/apps/meteor/app/statistics/server/lib/statistics.ts index 25d93a6985c3..12f24cd3bc10 100644 --- a/apps/meteor/app/statistics/server/lib/statistics.ts +++ b/apps/meteor/app/statistics/server/lib/statistics.ts @@ -30,6 +30,7 @@ import { MongoInternals } from 'meteor/mongo'; import moment from 'moment'; import { getAppsStatistics } from './getAppsStatistics'; +import { getContactVerificationStatistics } from './getContactVerificationStatistics'; import { getStatistics as getEnterpriseStatistics } from './getEEStatistics'; import { getImporterStatistics } from './getImporterStatistics'; import { getServicesStatistics } from './getServicesStatistics'; @@ -477,6 +478,7 @@ export const statistics = { statistics.services = await getServicesStatistics(); statistics.importer = getImporterStatistics(); statistics.videoConf = await VideoConf.getStatistics(); + statistics.contactVerification = await getContactVerificationStatistics(); // If getSettingsStatistics() returns an error, save as empty object. statsPms.push( diff --git a/apps/meteor/client/views/omnichannel/contactInfo/AdvancedContactModal.tsx b/apps/meteor/client/views/omnichannel/contactInfo/AdvancedContactModal.tsx index 884197bf0749..88f100e3e992 100644 --- a/apps/meteor/client/views/omnichannel/contactInfo/AdvancedContactModal.tsx +++ b/apps/meteor/client/views/omnichannel/contactInfo/AdvancedContactModal.tsx @@ -1,5 +1,5 @@ -import { useRole } from '@rocket.chat/ui-contexts'; -import React from 'react'; +import { useRole, useEndpoint } from '@rocket.chat/ui-contexts'; +import React, { useEffect } from 'react'; import { useTranslation } from 'react-i18next'; import { getURL } from '../../../../app/utils/client/getURL'; @@ -18,6 +18,22 @@ const AdvancedContactModal = ({ onCancel }: AdvancedContactModalProps) => { const hasLicense = useHasLicenseModule('contact-id-verification') as boolean; const { shouldShowUpsell, handleManageSubscription } = useUpsellActions(hasLicense); const openExternalLink = useExternalLink(); + const eventStats = useEndpoint('POST', '/v1/statistics.telemetry'); + + const handleUpsellClick = async () => { + eventStats({ + params: [{ eventName: 'updateCounter', settingsId: 'Advanced_Contact_Upsell_Clicks_Count' }], + }); + return handleManageSubscription(); + }; + + useEffect(() => { + if (shouldShowUpsell) { + eventStats({ + params: [{ eventName: 'updateCounter', settingsId: 'Advanced_Contact_Upsell_Views_Count' }], + }); + } + }, [eventStats, shouldShowUpsell]); return ( { onClose={onCancel} onCancel={shouldShowUpsell ? onCancel : () => openExternalLink('https://go.rocket.chat/i/omnichannel-docs')} cancelText={!shouldShowUpsell ? t('Learn_more') : undefined} - onConfirm={shouldShowUpsell ? handleManageSubscription : undefined} + onConfirm={shouldShowUpsell ? handleUpsellClick : undefined} annotation={!shouldShowUpsell && !isAdmin ? t('Ask_enable_advanced_contact_profile') : undefined} /> ); diff --git a/apps/meteor/ee/server/patches/mergeContacts.ts b/apps/meteor/ee/server/patches/mergeContacts.ts index 1f93e1731a82..30d5b03d0cfb 100644 --- a/apps/meteor/ee/server/patches/mergeContacts.ts +++ b/apps/meteor/ee/server/patches/mergeContacts.ts @@ -1,8 +1,9 @@ import type { ILivechatContact, ILivechatContactChannel, ILivechatContactVisitorAssociation } from '@rocket.chat/core-typings'; import { License } from '@rocket.chat/license'; -import { LivechatContacts, LivechatRooms } from '@rocket.chat/models'; +import { LivechatContacts, LivechatRooms, Settings } from '@rocket.chat/models'; import type { ClientSession } from 'mongodb'; +import { notifyOnSettingChanged } from '../../../app/lib/server/lib/notifyListener'; import { isSameChannel } from '../../../app/livechat/lib/isSameChannel'; import { ContactMerger } from '../../../app/livechat/server/lib/contacts/ContactMerger'; import { mergeContacts } from '../../../app/livechat/server/lib/contacts/mergeContacts'; @@ -41,10 +42,16 @@ export const runMergeContacts = async ( const similarContactIds = similarContacts.map((c) => c._id); const { deletedCount } = await LivechatContacts.deleteMany({ _id: { $in: similarContactIds } }, { session }); + + const { value } = await Settings.incrementValueById('Merged_Contacts_Count', similarContacts.length, { returnDocument: 'after' }); + if (value) { + void notifyOnSettingChanged(value); + } logger.info({ - msg: `${deletedCount} contacts have been deleted and merged`, - deletedContactIds: similarContactIds, - contactId, + msg: 'contacts have been deleted and merged with a contact', + similarContactIds, + deletedCount, + originalContactId: originalContact._id, }); logger.debug({ msg: 'Updating rooms with new contact id', contactId }); diff --git a/apps/meteor/ee/server/settings/contact-verification.ts b/apps/meteor/ee/server/settings/contact-verification.ts index 78d04b7dc1d7..b62b164a7b90 100644 --- a/apps/meteor/ee/server/settings/contact-verification.ts +++ b/apps/meteor/ee/server/settings/contact-verification.ts @@ -4,6 +4,31 @@ export const addSettings = async (): Promise => { const omnichannelEnabledQuery = { _id: 'Livechat_enabled', value: true }; return settingsRegistry.addGroup('Omnichannel', async function () { + await this.add('Merged_Contacts_Count', 0, { + type: 'int', + hidden: true, + }); + + await this.add('Resolved_Conflicts_Count', 0, { + type: 'int', + hidden: true, + }); + + await this.add('Contacts_Importer_Count', 0, { + type: 'int', + hidden: true, + }); + + await this.add('Advanced_Contact_Upsell_Views_Count', 0, { + type: 'int', + hidden: true, + }); + + await this.add('Advanced_Contact_Upsell_Clicks_Count', 0, { + type: 'int', + hidden: true, + }); + return this.with( { enterprise: true, diff --git a/apps/meteor/ee/tests/unit/apps/livechat-enterprise/server/lib/mergeContacts.spec.ts b/apps/meteor/ee/tests/unit/apps/livechat-enterprise/server/lib/mergeContacts.spec.ts index 0fb40fa04bdd..5e4b285c7a3b 100644 --- a/apps/meteor/ee/tests/unit/apps/livechat-enterprise/server/lib/mergeContacts.spec.ts +++ b/apps/meteor/ee/tests/unit/apps/livechat-enterprise/server/lib/mergeContacts.spec.ts @@ -11,6 +11,9 @@ const modelsMock = { LivechatRooms: { updateMergedContactIds: sinon.stub(), }, + Settings: { + incrementValueById: sinon.stub(), + }, }; const contactMergerStub = { @@ -22,6 +25,7 @@ const { runMergeContacts } = proxyquire.noCallThru().load('../../../../../../ser '../../../app/livechat/server/lib/contacts/mergeContacts': { mergeContacts: { patch: sinon.stub() } }, '../../../app/livechat/server/lib/contacts/ContactMerger': { ContactMerger: contactMergerStub }, '../../../app/livechat-enterprise/server/lib/logger': { logger: { info: sinon.stub(), debug: sinon.stub() } }, + '../../../app/lib/server/lib/notifyListener': { notifyOnSettingChanged: sinon.stub() }, '@rocket.chat/models': modelsMock, }); @@ -45,6 +49,7 @@ describe('mergeContacts', () => { modelsMock.LivechatContacts.findSimilarVerifiedContacts.reset(); modelsMock.LivechatContacts.deleteMany.reset(); modelsMock.LivechatRooms.updateMergedContactIds.reset(); + modelsMock.Settings.incrementValueById.reset(); contactMergerStub.getAllFieldsFromContact.reset(); contactMergerStub.mergeFieldsIntoContact.reset(); modelsMock.LivechatContacts.deleteMany.resolves({ deletedCount: 0 }); @@ -102,6 +107,7 @@ describe('mergeContacts', () => { modelsMock.LivechatContacts.findOneById.resolves(originalContact); modelsMock.LivechatContacts.findSimilarVerifiedContacts.resolves([similarContact]); + modelsMock.Settings.incrementValueById.resolves({ value: undefined }); await runMergeContacts(() => undefined, 'contactId', { visitorId: 'visitorId', source: { type: 'sms' } }); @@ -114,5 +120,6 @@ describe('mergeContacts', () => { expect(modelsMock.LivechatContacts.deleteMany.calledOnceWith({ _id: { $in: ['differentId'] } })).to.be.true; expect(modelsMock.LivechatRooms.updateMergedContactIds.calledOnceWith(['differentId'], 'contactId')).to.be.true; + expect(modelsMock.Settings.incrementValueById.calledOnceWith('Merged_Contacts_Count', 1)).to.be.true; }); }); diff --git a/apps/meteor/server/models/raw/LivechatContacts.ts b/apps/meteor/server/models/raw/LivechatContacts.ts index 796edb3bc059..43a5f5204e60 100644 --- a/apps/meteor/server/models/raw/LivechatContacts.ts +++ b/apps/meteor/server/models/raw/LivechatContacts.ts @@ -21,9 +21,11 @@ import type { UpdateFilter, UpdateOptions, FindOneAndUpdateOptions, + AggregationCursor, } from 'mongodb'; import { BaseRaw } from './BaseRaw'; +import { readSecondaryPreferred } from '../../database/readSecondaryPreferred'; export class LivechatContactsRaw extends BaseRaw implements ILivechatContactsModel { constructor(db: Db, trash?: Collection>) { @@ -76,6 +78,22 @@ export class LivechatContactsRaw extends BaseRaw implements IL sparse: true, unique: false, }, + { + key: { channels: 1 }, + unique: false, + }, + { + key: { 'channels.blocked': 1 }, + sparse: true, + }, + { + key: { 'channels.verified': 1 }, + sparse: true, + }, + { + key: { unknown: 1 }, + unique: false, + }, ]; } @@ -272,4 +290,49 @@ export class LivechatContactsRaw extends BaseRaw implements IL return this.countDocuments(filter); } + + countUnknown(): Promise { + return this.countDocuments({ unknown: true }, { readPreference: readSecondaryPreferred() }); + } + + countBlocked(): Promise { + return this.countDocuments({ 'channels.blocked': true }, { readPreference: readSecondaryPreferred() }); + } + + countFullyBlocked(): Promise { + return this.countDocuments( + { + 'channels.blocked': true, + 'channels': { $not: { $elemMatch: { $or: [{ blocked: false }, { blocked: { $exists: false } }] } } }, + }, + { readPreference: readSecondaryPreferred() }, + ); + } + + countVerified(): Promise { + return this.countDocuments({ 'channels.verified': true }, { readPreference: readSecondaryPreferred() }); + } + + countContactsWithoutChannels(): Promise { + return this.countDocuments({ channels: { $size: 0 } }, { readPreference: readSecondaryPreferred() }); + } + + getStatistics(): AggregationCursor<{ totalConflicts: number; avgChannelsPerContact: number }> { + return this.col.aggregate<{ totalConflicts: number; avgChannelsPerContact: number }>( + [ + { + $group: { + _id: null, + totalConflicts: { + $sum: { $size: { $cond: [{ $isArray: '$conflictingFields' }, '$conflictingFields', []] } }, + }, + avgChannelsPerContact: { + $avg: { $size: { $cond: [{ $isArray: '$channels' }, '$channels', []] } }, + }, + }, + }, + ], + { allowDiskUse: true, readPreference: readSecondaryPreferred() }, + ); + } } diff --git a/packages/core-typings/src/IStats.ts b/packages/core-typings/src/IStats.ts index 9aab9cd96f87..df179989de95 100644 --- a/packages/core-typings/src/IStats.ts +++ b/packages/core-typings/src/IStats.ts @@ -237,4 +237,20 @@ export interface IStats { webRTCEnabledForOmnichannel: boolean; omnichannelWebRTCCalls: number; statsToken?: string; + contactVerification: { + totalContacts: number; + totalUnknownContacts: number; + totalMergedContacts: number; + totalConflicts: number; + totalResolvedConflicts: number; + totalBlockedContacts: number; + totalPartiallyBlockedContacts: number; + totalFullyBlockedContacts: number; + totalVerifiedContacts: number; + avgChannelsPerContact: number; + totalContactsWithoutChannels: number; + totalImportedContacts: number; + totalUpsellViews: number; + totalUpsellClicks: number; + }; } diff --git a/packages/model-typings/src/models/ILivechatContactsModel.ts b/packages/model-typings/src/models/ILivechatContactsModel.ts index 8501271ab5f4..00702018bc6a 100644 --- a/packages/model-typings/src/models/ILivechatContactsModel.ts +++ b/packages/model-typings/src/models/ILivechatContactsModel.ts @@ -5,7 +5,16 @@ import type { ILivechatContactVisitorAssociation, ILivechatVisitor, } from '@rocket.chat/core-typings'; -import type { Document, FindCursor, FindOneAndUpdateOptions, FindOptions, UpdateFilter, UpdateOptions, UpdateResult } from 'mongodb'; +import type { + AggregationCursor, + Document, + FindCursor, + FindOneAndUpdateOptions, + FindOptions, + UpdateFilter, + UpdateOptions, + UpdateResult, +} from 'mongodb'; import type { Updater } from '../updater'; import type { FindPaginated, IBaseModel, InsertionModel } from './IBaseModel'; @@ -49,4 +58,10 @@ export interface ILivechatContactsModel extends IBaseModel { setVerifiedUpdateQuery(verified: boolean, contactUpdater: Updater): Updater; setFieldAndValueUpdateQuery(field: string, value: string, contactUpdater: Updater): Updater; countByContactInfo({ contactId, email, phone }: { contactId?: string; email?: string; phone?: string }): Promise; + countUnknown(): Promise; + countBlocked(): Promise; + countFullyBlocked(): Promise; + countVerified(): Promise; + countContactsWithoutChannels(): Promise; + getStatistics(): AggregationCursor<{ totalConflicts: number; avgChannelsPerContact: number }>; } From 149c3b56d45ce0d23bd3e408d00c4afdc747c6af Mon Sep 17 00:00:00 2001 From: Pierre Lehnen <55164754+pierre-lehnen-rc@users.noreply.github.com> Date: Thu, 19 Dec 2024 23:19:43 -0300 Subject: [PATCH 20/28] chore: improve videoconf client-side error handling (#34069) --- apps/meteor/client/lib/VideoConfManager.ts | 137 +++++++++++------- .../client/providers/VideoConfProvider.tsx | 16 ++ packages/i18n/src/locales/en.i18n.json | 7 + 3 files changed, 106 insertions(+), 54 deletions(-) diff --git a/apps/meteor/client/lib/VideoConfManager.ts b/apps/meteor/client/lib/VideoConfManager.ts index 99ec760fba91..2fa07eba885f 100644 --- a/apps/meteor/client/lib/VideoConfManager.ts +++ b/apps/meteor/client/lib/VideoConfManager.ts @@ -84,9 +84,7 @@ type VideoConfEvents = { // When join call 'call/join': CurrentCallParams; - 'join/error': { error: string }; - - 'start/error': { error: string }; + 'error': { error: string }; 'capabilities/changed': void; }; @@ -112,6 +110,8 @@ export const VideoConfManager = new (class VideoConfManager extends Emitter(); this.dismissedCalls = new Set(); this._preferences = { mic: true, cam: false }; @@ -161,18 +162,19 @@ export const VideoConfManager = new (class VideoConfManager extends Emitter { if (!this.userId || this.isBusy()) { + this.emitError('error-videoconf-cant-start-call-with-manager-busy'); throw new Error('Video manager is busy.'); } - debug && console.log(`[VideoConf] Starting new call on room ${roomId}`); + this.debugLog(`[VideoConf] Starting new call on room ${roomId}`); this.startingNewCall = true; this.emit('calling/changed'); const { data } = await sdk.rest.post('/v1/video-conference.start', { roomId, title, allowRinging: true }).catch((e: any) => { - debug && console.error(`[VideoConf] Failed to start new call on room ${roomId}`); + console.error(`[VideoConf] Failed to start new call on room ${roomId}`, e); this.startingNewCall = false; this.emit('calling/changed'); - this.emit('start/error', { error: e?.xhr?.responseJSON?.error || 'unknown-error' }); + this.emitError(e?.xhr?.responseJSON?.error || 'error-videoconf-unexpected'); return Promise.reject(e); }); @@ -197,14 +199,15 @@ export const VideoConfManager = new (class VideoConfManager extends Emitter { const { capabilities } = await sdk.rest.get('/v1/video-conference.capabilities').catch((e: any) => { - debug && console.error(`[VideoConf] Failed to load video conference capabilities`); + console.error(`[VideoConf] Failed to load video conference capabilities`, e); + this.emitError(); return Promise.reject(e); }); @@ -273,7 +278,7 @@ export const VideoConfManager = new (class VideoConfManager extends Emitter this.dismissedCalls.delete(callId), CALL_TIMEOUT * 20); @@ -318,11 +327,11 @@ export const VideoConfManager = new (class VideoConfManager extends Emitter { - debug && console.log(`[VideoConf] Joining call ${callId}.`); + this.debugLog(`[VideoConf] Joining call ${callId}.`); if (this.incomingDirectCalls.has(callId)) { const data = this.incomingDirectCalls.get(callId); if (data?.acceptTimeout) { - debug && console.log('[VideoConf] Clearing acceptance timeout'); + this.debugLog('[VideoConf] Clearing acceptance timeout'); clearTimeout(data.acceptTimeout); } this.removeIncomingCall(callId); @@ -368,17 +381,18 @@ export const VideoConfManager = new (class VideoConfManager extends Emitter { - debug && console.error(`[VideoConf] Failed to join call ${callId}`); - this.emit('join/error', { error: e?.xhr?.responseJSON?.error || 'unknown-error' }); + console.error(`[VideoConf] Failed to join call ${callId}`, e); + this.emitError(e?.xhr?.responseJSON?.error || 'error-videoconf-join-failed'); return Promise.reject(e); }); if (!url) { + this.emitError('error-videoconf-missing-url'); throw new Error('Failed to get video conference URL.'); } - debug && console.log(`[VideoConf] Opening ${url}.`); + this.debugLog(`[VideoConf] Opening ${url}.`); this.emit('call/join', { url, callId, providerName }); } @@ -390,10 +404,22 @@ export const VideoConfManager = new (class VideoConfManager extends Emitter= 1) && console.log(...args); + } + + private warnLog(...args: any[]): void { + (debug || this._logLevel >= 1) && console.warn(...args); + } + + private debugLog(...args: any[]): void { + (debug || this._logLevel >= 2) && console.log(...args); + } + private rejectIncomingCallsFromUser(userId: string): void { for (const [, { callId, uid }] of this.incomingDirectCalls) { if (userId === uid) { - debug && console.log(`[VideoConf] Rejecting old incoming call from user ${userId}`); + this.debugLog(`[VideoConf] Rejecting old incoming call from user ${userId}`); this.rejectIncomingCall(callId); } } @@ -401,6 +427,7 @@ export const VideoConfManager = new (class VideoConfManager extends Emitter { if (this.currentCallHandler || this.currentCallData) { + this.emitError('error-videoconf-cant-start-call-with-manager-busy'); throw new Error('Video Conference State Error.'); } @@ -408,7 +435,7 @@ export const VideoConfManager = new (class VideoConfManager extends Emitter { if (!this.currentCallHandler) { - debug && console.warn(`[VideoConf] Ringing interval was not properly cleared.`); + this.warnLog(`[VideoConf] Ringing interval was not properly cleared.`); return; } @@ -419,19 +446,19 @@ export const VideoConfManager = new (class VideoConfManager extends Emitter { const joined = this.currentCallData?.joined; - debug && console.log(`[VideoConf] Stop ringing user ${uid}.`); + this.debugLog(`[VideoConf] Stop ringing user ${uid}.`); if (this.currentCallHandler) { clearInterval(this.currentCallHandler); this.currentCallHandler = undefined; @@ -439,7 +466,7 @@ export const VideoConfManager = new (class VideoConfManager extends Emitter { if (!action || typeof action !== 'string') { - debug && console.error('[VideoConf] Invalid action received.'); + this.warnLog('[VideoConf] Invalid action received.', action, params); return; } if (!params || typeof params !== 'object' || !params.callId || !params.uid || !params.rid) { - debug && console.error('[VideoConf] Invalid params received.'); + this.warnLog('[VideoConf] Invalid params received.', action, params); return; } @@ -515,7 +542,7 @@ export const VideoConfManager = new (class VideoConfManager extends Emitter { - debug && console.log(`[VideoConf] connecting user ${userId}`); + console.log(`[VideoConf] connecting user ${userId}`); this.userId = userId; const { stop, ready } = sdk.stream('notify-user', [`${userId}/video-conference`], (data) => this.onVideoConfNotification(data)); @@ -531,25 +558,25 @@ export const VideoConfManager = new (class VideoConfManager extends Emitter { const [outgoing, setOutgoing] = useState(); const handleOpenCall = useVideoConfOpenCall(); + const dispatchToastMessage = useToastMessageDispatch(); + const { t } = useTranslation(); + const logLevel = useSetting('Log_Level', 0); + + useEffect(() => VideoConfManager.setLogLevel(logLevel), [logLevel]); useEffect( () => @@ -21,6 +28,15 @@ const VideoConfContextProvider = ({ children }: { children: ReactNode }): ReactE [handleOpenCall], ); + useEffect( + () => + VideoConfManager.on('error', (props) => { + const message = t(props.error?.startsWith('error-') ? props.error : 'error-videoconf-unexpected'); + dispatchToastMessage({ type: 'error', message }); + }), + [dispatchToastMessage, t], + ); + useEffect(() => { VideoConfManager.on('direct/stopped', () => setOutgoing(undefined)); VideoConfManager.on('calling/ended', () => setOutgoing(undefined)); diff --git a/packages/i18n/src/locales/en.i18n.json b/packages/i18n/src/locales/en.i18n.json index e9c78cc644f9..98cf3b1ef86f 100644 --- a/packages/i18n/src/locales/en.i18n.json +++ b/packages/i18n/src/locales/en.i18n.json @@ -2260,6 +2260,13 @@ "error-user-registration-disabled": "User registration is disabled", "error-user-registration-secret": "User registration is only allowed via Secret URL", "error-validating-department-chat-closing-tags": "At least one closing tag is required when the department requires tag(s) on closing conversations.", + "error-videoconf-cant-start-call-with-manager-busy": "Unable to start a new call due to the current state of other calls.", + "error-videoconf-direct-call-accept-timeout": "No response from remote user after notifying the call was accepted.", + "error-videoconf-direct-call-accept-canceled": "The remote user hang up before we had time to accept the call.", + "error-videoconf-direct-call-accept-ended": "The server ended the call before we had time to accept it.", + "error-videoconf-join-failed": "Unexpected Server Error while joining call.", + "error-videoconf-missing-url": "Failed to get the conference's URL.", + "error-videoconf-unexpected": "Unexpected Conference Call Error", "error-no-permission-team-channel": "You don't have permission to add this channel to the team", "error-no-owner-channel": "Only owners can add this channel to the team", "error-unable-to-update-priority": "Unable to update priority", From f90b1c99bdf4d89350a70c9ef4c2d12ed3784fd8 Mon Sep 17 00:00:00 2001 From: gabriellsh <40830821+gabriellsh@users.noreply.github.com> Date: Fri, 20 Dec 2024 10:09:27 -0300 Subject: [PATCH 21/28] fix: Switch language button in login page not displaying language name (#34197) --- .changeset/kind-crabs-live.md | 6 ++++++ apps/meteor/tests/e2e/login.spec.ts | 19 +++++++++++++++++++ packages/i18n/src/locales/en.i18n.json | 2 +- packages/i18n/src/locales/es.i18n.json | 2 +- packages/i18n/src/locales/fi.i18n.json | 2 +- packages/i18n/src/locales/hi-IN.i18n.json | 2 +- packages/i18n/src/locales/hu.i18n.json | 2 +- packages/i18n/src/locales/nn.i18n.json | 2 +- packages/i18n/src/locales/no.i18n.json | 2 +- packages/i18n/src/locales/se.i18n.json | 2 +- packages/i18n/src/locales/sv.i18n.json | 2 +- 11 files changed, 34 insertions(+), 9 deletions(-) create mode 100644 .changeset/kind-crabs-live.md diff --git a/.changeset/kind-crabs-live.md b/.changeset/kind-crabs-live.md new file mode 100644 index 000000000000..93b2218f828b --- /dev/null +++ b/.changeset/kind-crabs-live.md @@ -0,0 +1,6 @@ +--- +"@rocket.chat/meteor": patch +"@rocket.chat/i18n": patch +--- + +fixes "Change to language" button in login page not displaying the target language diff --git a/apps/meteor/tests/e2e/login.spec.ts b/apps/meteor/tests/e2e/login.spec.ts index 63e4949c31d9..75340c64506b 100644 --- a/apps/meteor/tests/e2e/login.spec.ts +++ b/apps/meteor/tests/e2e/login.spec.ts @@ -2,6 +2,7 @@ import { faker } from '@faker-js/faker'; import { DEFAULT_USER_CREDENTIALS } from './config/constants'; import { Utils, Registration } from './page-objects'; +import { setSettingValueById } from './utils/setSettingValueById'; import { test, expect } from './utils/test'; test.describe.parallel('Login', () => { @@ -15,6 +16,10 @@ test.describe.parallel('Login', () => { await page.goto('/home'); }); + test.afterAll(async ({ api }) => { + await setSettingValueById(api, 'Language', 'en'); + }); + test('should not have any accessibility violations', async ({ makeAxeBuilder }) => { const results = await makeAxeBuilder().analyze(); expect(results.violations).toEqual([]); @@ -50,4 +55,18 @@ test.describe.parallel('Login', () => { await expect(poUtils.mainContent).toBeVisible(); }); }); + + test('Should correctly display switch language button', async ({ page, api }) => { + expect((await setSettingValueById(api, 'Language', 'pt-BR')).status()).toBe(200); + + const button = page.getByRole('button', { name: 'Change to português (Brasil)' }); + await button.click(); + + await expect(page.getByRole('button', { name: 'Fazer Login' })).toBeVisible(); + + const buttonEnglish = page.getByRole('button', { name: 'Change to English' }); + await buttonEnglish.click(); + + await expect(page.getByRole('button', { name: 'Login' })).toBeVisible(); + }); }); diff --git a/packages/i18n/src/locales/en.i18n.json b/packages/i18n/src/locales/en.i18n.json index 98cf3b1ef86f..e9c452eaa45c 100644 --- a/packages/i18n/src/locales/en.i18n.json +++ b/packages/i18n/src/locales/en.i18n.json @@ -6315,7 +6315,7 @@ "registration.component.login": "Login", "registration.component.login.userNotFound": "User not found", "registration.component.login.incorrectPassword": "Incorrect password", - "registration.component.switchLanguage": "Change to <1>{{name}}", + "registration.component.switchLanguage": "Change to <2>{{name}}", "registration.component.resetPassword": "Reset password", "registration.component.form.emailOrUsername": "Email or username", "registration.component.form.username": "Username", diff --git a/packages/i18n/src/locales/es.i18n.json b/packages/i18n/src/locales/es.i18n.json index fc1362aa7eeb..31b3b41aefb1 100644 --- a/packages/i18n/src/locales/es.i18n.json +++ b/packages/i18n/src/locales/es.i18n.json @@ -4788,7 +4788,7 @@ "registration.component.login": "Iniciar sesión", "registration.component.login.userNotFound": "Usuario no encontrado", "registration.component.login.incorrectPassword": "Contraseña incorrecta", - "registration.component.switchLanguage": "Cambiar a <1>{{name}}", + "registration.component.switchLanguage": "Cambiar a <2>{{name}}", "registration.component.resetPassword": "Reestablecer contraseña", "registration.component.form.username": "Nombre de usuario", "registration.component.form.name": "Nombre", diff --git a/packages/i18n/src/locales/fi.i18n.json b/packages/i18n/src/locales/fi.i18n.json index 6365656bf6cc..b1435822c864 100644 --- a/packages/i18n/src/locales/fi.i18n.json +++ b/packages/i18n/src/locales/fi.i18n.json @@ -5505,7 +5505,7 @@ "registration.component.login": "Kirjaudu", "registration.component.login.userNotFound": "Käyttäjää ei löydy", "registration.component.login.incorrectPassword": "Väärä salasana", - "registration.component.switchLanguage": "Vaihda kieleksi <1>{{name}}", + "registration.component.switchLanguage": "Vaihda kieleksi <2>{{name}}", "registration.component.resetPassword": "Nollaa salasana", "registration.component.form.emailOrUsername": "Sähköpostiosoite tai käyttäjätunnus", "registration.component.form.username": "Käyttäjätunnus", diff --git a/packages/i18n/src/locales/hi-IN.i18n.json b/packages/i18n/src/locales/hi-IN.i18n.json index 1a6a29a71cd6..35dd69ec28ac 100644 --- a/packages/i18n/src/locales/hi-IN.i18n.json +++ b/packages/i18n/src/locales/hi-IN.i18n.json @@ -5792,7 +5792,7 @@ "registration.component.login": "लॉग इन करें", "registration.component.login.userNotFound": "उपयोगकर्ता नहीं मिला", "registration.component.login.incorrectPassword": "गलत पासवर्ड", - "registration.component.switchLanguage": "<1>{{name}} में बदलें", + "registration.component.switchLanguage": "<2>{{name}} में बदलें", "registration.component.resetPassword": "पासवर्ड रीसेट", "registration.component.form.emailOrUsername": "ईमेल या उपयोगकर्ता का नाम", "registration.component.form.username": "उपयोगकर्ता नाम", diff --git a/packages/i18n/src/locales/hu.i18n.json b/packages/i18n/src/locales/hu.i18n.json index 90b0c1d8ef82..9f2ed6f082aa 100644 --- a/packages/i18n/src/locales/hu.i18n.json +++ b/packages/i18n/src/locales/hu.i18n.json @@ -5299,7 +5299,7 @@ "registration.component.login": "Bejelentkezés", "registration.component.login.userNotFound": "A felhasználó nem található", "registration.component.login.incorrectPassword": "Hibás jelszó", - "registration.component.switchLanguage": "Átváltás <1>{{name}}", + "registration.component.switchLanguage": "Átváltás <2>{{name}}", "registration.component.resetPassword": "Jelszó visszaállítása", "registration.component.form.emailOrUsername": "E-mail-cím vagy felhasználónév", "registration.component.form.username": "Felhasználónév", diff --git a/packages/i18n/src/locales/nn.i18n.json b/packages/i18n/src/locales/nn.i18n.json index 9b9f6935a254..6637364b8265 100644 --- a/packages/i18n/src/locales/nn.i18n.json +++ b/packages/i18n/src/locales/nn.i18n.json @@ -4475,7 +4475,7 @@ "registration.component.login": "Logg inn", "registration.component.login.userNotFound": "Bruker ikke funnet", "registration.component.login.incorrectPassword": "feil passord", - "registration.component.switchLanguage": "Bytt til <1>{{name}}", + "registration.component.switchLanguage": "Bytt til <2>{{name}}", "registration.component.resetPassword": "Tilbakestilling av passord", "registration.component.form.username": "Brukernavn", "registration.component.form.name": "Navn", diff --git a/packages/i18n/src/locales/no.i18n.json b/packages/i18n/src/locales/no.i18n.json index 952b0ca9b711..39a50fbad692 100644 --- a/packages/i18n/src/locales/no.i18n.json +++ b/packages/i18n/src/locales/no.i18n.json @@ -4475,7 +4475,7 @@ "registration.component.login": "Logg inn", "registration.component.login.userNotFound": "Bruker ikke funnet", "registration.component.login.incorrectPassword": "feil passord", - "registration.component.switchLanguage": "Bytt til <1>{{name}}", + "registration.component.switchLanguage": "Bytt til <2>{{name}}", "registration.component.resetPassword": "Tilbakestilling av passord", "registration.component.form.username": "Brukernavn", "registration.component.form.name": "Navn", diff --git a/packages/i18n/src/locales/se.i18n.json b/packages/i18n/src/locales/se.i18n.json index 3ac677c4dcbd..2c2512c9aba6 100644 --- a/packages/i18n/src/locales/se.i18n.json +++ b/packages/i18n/src/locales/se.i18n.json @@ -6172,7 +6172,7 @@ "registration.component.login": "Login", "registration.component.login.userNotFound": "User not found", "registration.component.login.incorrectPassword": "Incorrect password", - "registration.component.switchLanguage": "Change to <1>{{name}}", + "registration.component.switchLanguage": "Change to <2>{{name}}", "registration.component.resetPassword": "Reset password", "registration.component.form.emailOrUsername": "Email or username", "registration.component.form.username": "Username", diff --git a/packages/i18n/src/locales/sv.i18n.json b/packages/i18n/src/locales/sv.i18n.json index 69b59f03c321..d097e915b2e4 100644 --- a/packages/i18n/src/locales/sv.i18n.json +++ b/packages/i18n/src/locales/sv.i18n.json @@ -5513,7 +5513,7 @@ "registration.component.login": "Logga in", "registration.component.login.userNotFound": "Användare inte hittad", "registration.component.login.incorrectPassword": "Felaktigt lösenord", - "registration.component.switchLanguage": "Växla till <1>{{name}}", + "registration.component.switchLanguage": "Växla till <2>{{name}}", "registration.component.resetPassword": "Återställ lösenord", "registration.component.form.emailOrUsername": "E-postadress eller användarnamn", "registration.component.form.username": "Användarnamn", From 475120dc19fb8cc400fd8af21559cd6f3cc17eb8 Mon Sep 17 00:00:00 2001 From: Pierre Lehnen <55164754+pierre-lehnen-rc@users.noreply.github.com> Date: Fri, 20 Dec 2024 11:29:53 -0300 Subject: [PATCH 22/28] feat: keep VoIP history (#34004) Co-authored-by: Diego Sampaio Co-authored-by: Kevin Aleman --- .changeset/lemon-stingrays-invite.md | 9 + .../local-services/voip-freeswitch/service.ts | 543 +++++++++++++++++- apps/meteor/server/lib/videoConfTypes.ts | 14 +- apps/meteor/server/models/FreeSwitchCall.ts | 6 + apps/meteor/server/models/FreeSwitchEvent.ts | 6 + .../server/models/raw/FreeSwitchCall.ts | 28 + .../server/models/raw/FreeSwitchEvent.ts | 40 ++ apps/meteor/server/models/raw/Users.js | 9 + .../server/models/raw/VideoConference.ts | 8 + apps/meteor/server/models/startup.ts | 2 + .../services/video-conference/service.ts | 37 +- .../src/types/IVideoConfService.ts | 3 + packages/core-typings/src/IVideoConference.ts | 36 +- packages/core-typings/src/utils.ts | 8 +- .../core-typings/src/voip/IFreeSwitchCall.ts | 64 +++ .../core-typings/src/voip/IFreeSwitchEvent.ts | 113 ++++ packages/core-typings/src/voip/index.ts | 2 + packages/freeswitch/src/connect.ts | 9 +- packages/freeswitch/src/index.ts | 1 + packages/freeswitch/src/listenToEvents.ts | 37 ++ packages/model-typings/src/index.ts | 2 + .../src/models/IFreeSwitchCallModel.ts | 9 + .../src/models/IFreeSwitchEventModel.ts | 10 + .../model-typings/src/models/IUsersModel.ts | 1 + .../src/models/IVideoConferenceModel.ts | 5 +- packages/models/src/index.ts | 4 + .../src/convertSubObjectsIntoPaths.spec.ts | 117 ++++ .../tools/src/convertSubObjectsIntoPaths.ts | 16 + packages/tools/src/index.ts | 2 + packages/tools/src/objectMap.spec.ts | 93 +++ packages/tools/src/objectMap.ts | 35 ++ 31 files changed, 1254 insertions(+), 15 deletions(-) create mode 100644 .changeset/lemon-stingrays-invite.md create mode 100644 apps/meteor/server/models/FreeSwitchCall.ts create mode 100644 apps/meteor/server/models/FreeSwitchEvent.ts create mode 100644 apps/meteor/server/models/raw/FreeSwitchCall.ts create mode 100644 apps/meteor/server/models/raw/FreeSwitchEvent.ts create mode 100644 packages/core-typings/src/voip/IFreeSwitchCall.ts create mode 100644 packages/core-typings/src/voip/IFreeSwitchEvent.ts create mode 100644 packages/freeswitch/src/listenToEvents.ts create mode 100644 packages/model-typings/src/models/IFreeSwitchCallModel.ts create mode 100644 packages/model-typings/src/models/IFreeSwitchEventModel.ts create mode 100644 packages/tools/src/convertSubObjectsIntoPaths.spec.ts create mode 100644 packages/tools/src/convertSubObjectsIntoPaths.ts create mode 100644 packages/tools/src/objectMap.spec.ts create mode 100644 packages/tools/src/objectMap.ts diff --git a/.changeset/lemon-stingrays-invite.md b/.changeset/lemon-stingrays-invite.md new file mode 100644 index 000000000000..eb57df68c636 --- /dev/null +++ b/.changeset/lemon-stingrays-invite.md @@ -0,0 +1,9 @@ +--- +'@rocket.chat/model-typings': minor +'@rocket.chat/core-typings': minor +'@rocket.chat/freeswitch': minor +'@rocket.chat/models': minor +'@rocket.chat/meteor': minor +--- + +Allows Rocket.Chat to store call events. diff --git a/apps/meteor/ee/server/local-services/voip-freeswitch/service.ts b/apps/meteor/ee/server/local-services/voip-freeswitch/service.ts index 2eccecc96a00..41010f41ad55 100644 --- a/apps/meteor/ee/server/local-services/voip-freeswitch/service.ts +++ b/apps/meteor/ee/server/local-services/voip-freeswitch/service.ts @@ -1,14 +1,63 @@ -import { type IVoipFreeSwitchService, ServiceClassInternal } from '@rocket.chat/core-services'; -import type { FreeSwitchExtension } from '@rocket.chat/core-typings'; -import { getDomain, getUserPassword, getExtensionList, getExtensionDetails } from '@rocket.chat/freeswitch'; +import { type IVoipFreeSwitchService, ServiceClassInternal, ServiceStarter } from '@rocket.chat/core-services'; +import type { + DeepPartial, + IFreeSwitchEventCall, + IFreeSwitchEventCaller, + IFreeSwitchEvent, + FreeSwitchExtension, + IFreeSwitchCall, + IFreeSwitchCallEventType, + IFreeSwitchCallEvent, + AtLeast, +} from '@rocket.chat/core-typings'; +import { isKnownFreeSwitchEventType } from '@rocket.chat/core-typings'; +import { getDomain, getUserPassword, getExtensionList, getExtensionDetails, listenToEvents } from '@rocket.chat/freeswitch'; +import type { InsertionModel } from '@rocket.chat/model-typings'; +import { FreeSwitchCall, FreeSwitchEvent, Users } from '@rocket.chat/models'; +import { objectMap, wrapExceptions } from '@rocket.chat/tools'; +import type { WithoutId } from 'mongodb'; +import { MongoError } from 'mongodb'; import { settings } from '../../../../app/settings/server'; export class VoipFreeSwitchService extends ServiceClassInternal implements IVoipFreeSwitchService { protected name = 'voip-freeswitch'; + private serviceStarter: ServiceStarter; + constructor() { super(); + + this.serviceStarter = new ServiceStarter(() => Promise.resolve(this.startEvents())); + this.onEvent('watch.settings', async ({ setting }): Promise => { + if (setting._id === 'VoIP_TeamCollab_Enabled' && setting.value === true) { + void this.serviceStarter.start(); + } + }); + } + + private listening = false; + + public async started(): Promise { + void this.serviceStarter.start(); + } + + private startEvents(): void { + if (this.listening) { + return; + } + + try { + // #ToDo: Reconnection + // #ToDo: Only connect from one rocket.chat instance + void listenToEvents( + async (...args) => wrapExceptions(() => this.onFreeSwitchEvent(...args)).suppress(), + this.getConnectionSettings(), + ); + this.listening = true; + } catch (_e) { + this.listening = false; + } } private getConnectionSettings(): { host: string; port: number; password: string; timeout: number } { @@ -33,6 +82,494 @@ export class VoipFreeSwitchService extends ServiceClassInternal implements IVoip }; } + private async onFreeSwitchEvent(eventName: string, data: Record): Promise { + const uniqueId = data['Unique-ID']; + if (!uniqueId) { + return; + } + + // Using a set to avoid duplicates + const callIds = new Set( + [data['Channel-Call-UUID'], data.variable_call_uuid].filter((callId) => Boolean(callId) && callId !== '0') as string[], + ); + const event = await this.parseEventData(eventName, data); + + // If for some reason the event had different callIds, save a copy of it for each of them + if (callIds.size > 1) { + await Promise.all( + callIds.values().map((callId) => + this.registerEvent({ + ...event, + call: { + ...event.call, + UUID: callId, + }, + }), + ), + ); + return; + } + + await this.registerEvent(event); + } + + private getDetailedEventName(eventName: string, eventData: Record): string { + if (eventName === 'CHANNEL_STATE') { + return `CHANNEL_STATE=${eventData['Channel-State']}`; + } + + if (eventName === 'CHANNEL_CALLSTATE') { + return `CHANNEL_CALLSTATE=${eventData['Channel-Call-State']}`; + } + + return eventName; + } + + private filterOutMissingData>(data: T): DeepPartial { + return objectMap( + data, + ({ key, value }) => { + if (!value || value === '0') { + return; + } + + if (typeof value === 'object' && !Object.keys(value).length) { + return; + } + + return { key, value }; + }, + true, + ) as DeepPartial; + } + + private async parseEventData( + eventName: string, + eventData: Record, + ): Promise>> { + const filteredData: Record = Object.fromEntries( + Object.entries(eventData).filter(([_, value]) => value !== undefined), + ) as Record; + + const detaildEventName = this.getDetailedEventName(eventName, filteredData); + const state = eventData['Channel-State']; + const sequence = eventData['Event-Sequence']; + const previousCallState = eventData['Original-Channel-Call-State']; + const callState = eventData['Channel-Call-State']; + const answerState = eventData['Answer-State']; + const hangupCause = eventData['Hangup-Cause']; + const direction = eventData['Call-Direction']; + const channelName = eventData['Channel-Name']; + + const otherLegUniqueId = eventData['Other-Leg-Unique-ID']; + const loopbackLegUniqueId = eventData.variable_other_loopback_leg_uuid; + const loopbackFromUniqueId = eventData.variable_other_loopback_from_uuid; + const oldUniqueId = eventData['Old-Unique-ID']; + + const channelUniqueId = eventData['Unique-ID']; + const referencedIds = [otherLegUniqueId, loopbackLegUniqueId, loopbackFromUniqueId, oldUniqueId].filter((id) => + Boolean(id), + ) as string[]; + const timestamp = eventData['Event-Date-Timestamp']; + const firedAt = this.parseTimestamp(eventData['Event-Date-Timestamp']); + + const durationStr = eventData.variable_duration; + const duration = (durationStr && parseInt(durationStr)) || 0; + + const call: Partial = { + UUID: (eventData['Channel-Call-UUID'] !== '0' && eventData['Channel-Call-UUID']) || eventData.variable_call_uuid, + answerState, + state: callState, + previousState: previousCallState, + presenceId: eventData['Channel-Presence-ID'], + sipId: eventData.variable_sip_call_id, + authorized: eventData.variable_sip_authorized, + hangupCause, + duration, + + from: { + user: eventData.variable_sip_from_user, + stripped: eventData.variable_sip_from_user_stripped, + port: eventData.variable_sip_from_port, + uri: eventData.variable_sip_from_uri, + host: eventData.variable_sip_from_host, + full: eventData.variable_sip_full_from, + }, + + req: { + user: eventData.variable_sip_req_user, + port: eventData.variable_sip_req_port, + uri: eventData.variable_sip_req_uri, + host: eventData.variable_sip_req_host, + }, + + to: { + user: eventData.variable_sip_to_user, + port: eventData.variable_sip_to_port, + uri: eventData.variable_sip_to_uri, + full: eventData.variable_sip_full_to, + dialedExtension: eventData.variable_dialed_extension, + dialedUser: eventData.variable_dialed_user, + }, + + contact: { + user: eventData.variable_sip_contact_user, + uri: eventData.variable_sip_contact_uri, + host: eventData.variable_sip_contact_host, + }, + + via: { + full: eventData.variable_sip_full_via, + host: eventData.variable_sip_via_host, + rport: eventData.variable_sip_via_rport, + }, + }; + + const caller: Partial = { + uniqueId: eventData['Caller-Unique-ID'], + direction: eventData['Caller-Direction'], + username: eventData['Caller-Username'], + networkAddr: eventData['Caller-Network-Addr'], + ani: eventData['Caller-ANI'], + destinationNumber: eventData['Caller-Destination-Number'], + source: eventData['Caller-Source'], + context: eventData['Caller-Context'], + name: eventData['Caller-Caller-ID-Name'], + number: eventData['Caller-Caller-ID-Number'], + originalCaller: { + name: eventData['Caller-Orig-Caller-ID-Name'], + number: eventData['Caller-Orig-Caller-ID-Number'], + }, + privacy: { + hideName: eventData['Caller-Privacy-Hide-Name'], + hideNumber: eventData['Caller-Privacy-Hide-Number'], + }, + channel: { + name: eventData['Caller-Channel-Name'], + createdTime: eventData['Caller-Channel-Created-Time'], + }, + }; + + return this.filterOutMissingData({ + channelUniqueId, + eventName, + detaildEventName, + sequence, + state, + previousCallState, + callState, + timestamp, + firedAt, + answerState, + hangupCause, + referencedIds, + receivedAt: new Date(), + channelName, + direction, + caller, + call, + eventData: filteredData, + }) as InsertionModel>; + } + + private parseTimestamp(timestamp: string | undefined): Date | undefined { + if (!timestamp || timestamp === '0') { + return undefined; + } + + const value = parseInt(timestamp); + if (Number.isNaN(value)) { + return undefined; + } + + const timeValue = Math.floor(value / 1000); + return new Date(timeValue); + } + + private async registerEvent(event: InsertionModel>): Promise { + try { + await FreeSwitchEvent.registerEvent(event); + if (event.eventName === 'CHANNEL_DESTROY' && event.call?.UUID) { + await this.computeCall(event.call?.UUID); + } + } catch (error) { + // avoid logging that an event was duplicated from mongo + if (error instanceof MongoError && error.code === 11000) { + return; + } + + throw error; + } + } + + private getEventType(event: IFreeSwitchEvent): IFreeSwitchCallEventType { + const { eventName, state, callState } = event; + + const modifiedEventName = eventName.toUpperCase().replace('CHANNEL_', '').replace('_COMPLETE', ''); + + if (isKnownFreeSwitchEventType(modifiedEventName)) { + return modifiedEventName; + } + + if (modifiedEventName === 'STATE') { + if (!state) { + return 'OTHER_STATE'; + } + + const modifiedState = state.toUpperCase().replace('CS_', ''); + if (isKnownFreeSwitchEventType(modifiedState)) { + return modifiedState; + } + } + + if (modifiedEventName === 'CALLSTATE') { + if (!callState) { + return 'OTHER_CALL_STATE'; + } + + const modifiedCallState = callState.toUpperCase().replace('CS_', ''); + if (isKnownFreeSwitchEventType(modifiedCallState)) { + return modifiedCallState; + } + } + + return 'OTHER'; + } + + private identifyCallerFromEvent(event: IFreeSwitchEvent): string { + if (event.call?.from?.user) { + return event.call.from.user; + } + + if (event.caller?.username) { + return event.caller.username; + } + + if (event.caller?.number) { + return event.caller.number; + } + + if (event.caller?.ani) { + return event.caller.ani; + } + + return ''; + } + + private identifyCalleeFromEvent(event: IFreeSwitchEvent): string { + if (event.call?.to?.dialedExtension) { + return event.call.to.dialedExtension; + } + + if (event.call?.to?.dialedUser) { + return event.call.to.dialedUser; + } + + return ''; + } + + private isImportantEvent(event: IFreeSwitchEvent): boolean { + return Object.keys(event).some((key) => key.startsWith('variable_')); + } + + private async computeCall(callUUID: string): Promise { + const allEvents = await FreeSwitchEvent.findAllByCallUUID(callUUID).toArray(); + const call: InsertionModel = { + UUID: callUUID, + channels: [], + events: [], + }; + + // Sort events by both sequence and timestamp, but only when they are present + const sortedEvents = allEvents.sort((event1: IFreeSwitchEvent, event2: IFreeSwitchEvent) => { + if (event1.sequence && event2.sequence) { + return event1.sequence.localeCompare(event2.sequence); + } + + if (event1.firedAt && event2.firedAt) { + return event1.firedAt.valueOf() - event2.firedAt.valueOf(); + } + + if (event1.sequence || event2.sequence) { + return (event1.sequence || '').localeCompare(event2.sequence || ''); + } + + return (event1.firedAt?.valueOf() || 0) - (event2.firedAt?.valueOf() || 0); + }); + + const fromUser = new Set(); + const toUser = new Set(); + let isVoicemailCall = false; + for (const event of sortedEvents) { + if (event.channelUniqueId && !call.channels.includes(event.channelUniqueId)) { + call.channels.push(event.channelUniqueId); + } + + const eventType = this.getEventType(event); + fromUser.add(this.identifyCallerFromEvent(event)); + toUser.add(this.identifyCalleeFromEvent(event)); + + // when a call enters the voicemail, we receive one/or many events with the channelName = loopback/voicemail-x + // where X appears to be a letter + isVoicemailCall = event.channelName?.includes('voicemail') || isVoicemailCall; + + const hasUsefulCallData = this.isImportantEvent(event); + + const callEvent = this.filterOutMissingData({ + type: eventType, + caller: event.caller, + ...(hasUsefulCallData && { call: event.call }), + + otherType: event.eventData['Other-Type'], + otherChannelId: event.eventData['Other-Leg-Unique-ID'], + }) as AtLeast; + + if (call.events[call.events.length - 1]?.type === eventType) { + const previousEvent = call.events.pop() as IFreeSwitchCallEvent; + + call.events.push({ + ...previousEvent, + ...callEvent, + caller: { + ...previousEvent.caller, + ...callEvent.caller, + }, + ...((previousEvent.call || callEvent.call) && { + call: { + ...previousEvent.call, + ...callEvent.call, + from: { + ...previousEvent.call?.from, + ...callEvent.call?.from, + }, + req: { + ...previousEvent.call?.req, + ...callEvent.call?.req, + }, + to: { + ...previousEvent.call?.to, + ...callEvent.call?.to, + }, + contact: { + ...previousEvent.call?.contact, + ...callEvent.call?.contact, + }, + via: { + ...previousEvent.call?.via, + ...callEvent.call?.via, + }, + }, + }), + }); + continue; + } + + call.events.push({ + ...callEvent, + eventName: event.eventName, + sequence: event.sequence, + channelUniqueId: event.channelUniqueId, + timestamp: event.timestamp, + firedAt: event.firedAt, + }); + } + + if (fromUser.size) { + const callerIds = [...fromUser].filter((e) => !!e); + const user = await Users.findOneByFreeSwitchExtensions(callerIds, { + projection: { _id: 1, username: 1, name: 1, avatarETag: 1, freeSwitchExtension: 1 }, + }); + + if (user) { + call.from = { + _id: user._id, + username: user.username, + name: user.name, + avatarETag: user.avatarETag, + freeSwitchExtension: user.freeSwitchExtension, + }; + } + } + + if (toUser.size) { + const calleeIds = [...toUser].filter((e) => !!e); + const user = await Users.findOneByFreeSwitchExtensions(calleeIds, { + projection: { _id: 1, username: 1, name: 1, avatarETag: 1, freeSwitchExtension: 1 }, + }); + if (user) { + call.to = { + _id: user._id, + username: user.username, + name: user.name, + avatarETag: user.avatarETag, + freeSwitchExtension: user.freeSwitchExtension, + }; + } + } + + // A call has 2 channels at max + // If it has 3 or more channels, it's a forwarded call + if (call.channels.length >= 3) { + const originalCalls = await FreeSwitchCall.findAllByChannelUniqueIds(call.channels, { projection: { events: 0 } }).toArray(); + if (originalCalls.length) { + call.forwardedFrom = originalCalls; + } + } + + // Call originated from us but destination and destination is another user = internal + if (call.from && call.to) { + call.direction = 'internal'; + } + + // Call originated from us but destination is not on server = external outbound + if (call.from && !call.to) { + call.direction = 'external_outbound'; + } + + // Call originated from a user outside server but received by a user in our side = external inbound + if (!call.from && call.to) { + call.direction = 'external_inbound'; + } + + // Call ended up in voicemail of another user = voicemail + if (isVoicemailCall) { + call.voicemail = true; + } + + call.duration = this.computeCallDuration(call); + + await FreeSwitchCall.registerCall(call); + } + + private computeCallDuration(call: InsertionModel): number { + if (!call.events.length) { + return 0; + } + + const channelAnswerEvent = call.events.find((e) => e.eventName === 'CHANNEL_ANSWER'); + if (!channelAnswerEvent?.timestamp) { + return 0; + } + + const answer = this.parseTimestamp(channelAnswerEvent.timestamp); + if (!answer) { + return 0; + } + + const channelHangupEvent = call.events.find((e) => e.eventName === 'CHANNEL_HANGUP_COMPLETE'); + if (!channelHangupEvent?.timestamp) { + // We dont have a hangup but we have an answer, assume hangup is === destroy time + return new Date().getTime() - answer.getTime(); + } + + const hangup = this.parseTimestamp(channelHangupEvent.timestamp); + if (!hangup) { + return 0; + } + + return hangup.getTime() - answer.getTime(); + } + async getDomain(): Promise { const options = this.getConnectionSettings(); return getDomain(options); diff --git a/apps/meteor/server/lib/videoConfTypes.ts b/apps/meteor/server/lib/videoConfTypes.ts index d899539c3ba7..7529115745d5 100644 --- a/apps/meteor/server/lib/videoConfTypes.ts +++ b/apps/meteor/server/lib/videoConfTypes.ts @@ -1,4 +1,11 @@ -import type { AtLeast, IRoom, VideoConferenceCreateData, VideoConferenceType } from '@rocket.chat/core-typings'; +import type { + AtLeast, + ExternalVideoConference, + IRoom, + VideoConference, + VideoConferenceCreateData, + VideoConferenceType, +} from '@rocket.chat/core-typings'; type RoomRequiredFields = AtLeast; type VideoConferenceTypeCondition = (room: RoomRequiredFields, allowRinging: boolean) => Promise; @@ -34,6 +41,11 @@ export const videoConfTypes = { return { type: 'videoconference' }; }, + + isCallManagedByApp(call: VideoConference): call is ExternalVideoConference { + return call.type !== 'voip'; + }, }; +videoConfTypes.registerVideoConferenceType('voip', async () => false); videoConfTypes.registerVideoConferenceType({ type: 'livechat' }, async ({ t }) => t === 'l'); diff --git a/apps/meteor/server/models/FreeSwitchCall.ts b/apps/meteor/server/models/FreeSwitchCall.ts new file mode 100644 index 000000000000..97b470538e80 --- /dev/null +++ b/apps/meteor/server/models/FreeSwitchCall.ts @@ -0,0 +1,6 @@ +import { registerModel } from '@rocket.chat/models'; + +import { db } from '../database/utils'; +import { FreeSwitchCallRaw } from './raw/FreeSwitchCall'; + +registerModel('IFreeSwitchCallModel', new FreeSwitchCallRaw(db)); diff --git a/apps/meteor/server/models/FreeSwitchEvent.ts b/apps/meteor/server/models/FreeSwitchEvent.ts new file mode 100644 index 000000000000..cab4d7daa2e4 --- /dev/null +++ b/apps/meteor/server/models/FreeSwitchEvent.ts @@ -0,0 +1,6 @@ +import { registerModel } from '@rocket.chat/models'; + +import { db } from '../database/utils'; +import { FreeSwitchEventRaw } from './raw/FreeSwitchEvent'; + +registerModel('IFreeSwitchEventModel', new FreeSwitchEventRaw(db)); diff --git a/apps/meteor/server/models/raw/FreeSwitchCall.ts b/apps/meteor/server/models/raw/FreeSwitchCall.ts new file mode 100644 index 000000000000..2be10e0d29d3 --- /dev/null +++ b/apps/meteor/server/models/raw/FreeSwitchCall.ts @@ -0,0 +1,28 @@ +import type { IFreeSwitchCall, RocketChatRecordDeleted } from '@rocket.chat/core-typings'; +import type { IFreeSwitchCallModel, InsertionModel } from '@rocket.chat/model-typings'; +import type { Collection, Db, FindCursor, FindOptions, IndexDescription, WithoutId } from 'mongodb'; + +import { BaseRaw } from './BaseRaw'; + +export class FreeSwitchCallRaw extends BaseRaw implements IFreeSwitchCallModel { + constructor(db: Db, trash?: Collection>) { + super(db, 'freeswitch_calls', trash); + } + + protected modelIndexes(): IndexDescription[] { + return [{ key: { UUID: 1 } }, { key: { channels: 1 } }]; + } + + public async registerCall(call: WithoutId>): Promise { + await this.findOneAndUpdate({ UUID: call.UUID }, { $set: call }, { upsert: true }); + } + + public findAllByChannelUniqueIds(uniqueIds: string[], options?: FindOptions): FindCursor { + return this.find( + { + channels: { $in: uniqueIds }, + }, + options, + ); + } +} diff --git a/apps/meteor/server/models/raw/FreeSwitchEvent.ts b/apps/meteor/server/models/raw/FreeSwitchEvent.ts new file mode 100644 index 000000000000..236f891cee0d --- /dev/null +++ b/apps/meteor/server/models/raw/FreeSwitchEvent.ts @@ -0,0 +1,40 @@ +import type { IFreeSwitchEvent, RocketChatRecordDeleted } from '@rocket.chat/core-typings'; +import type { IFreeSwitchEventModel, InsertionModel } from '@rocket.chat/model-typings'; +import type { IndexDescription, Collection, Db, FindOptions, FindCursor, WithoutId, InsertOneResult } from 'mongodb'; + +import { BaseRaw } from './BaseRaw'; + +export class FreeSwitchEventRaw extends BaseRaw implements IFreeSwitchEventModel { + constructor(db: Db, trash?: Collection>) { + super(db, 'freeswitch_events', trash); + } + + protected modelIndexes(): IndexDescription[] { + return [ + { key: { channelUniqueId: 1, sequence: 1 }, unique: true }, + { key: { 'call.UUID': 1 } }, + // Allow 15 days of events to be saved + { key: { _updatedAt: 1 }, expireAfterSeconds: 30 * 24 * 60 * 15 }, + ]; + } + + public async registerEvent(event: WithoutId>): Promise> { + return this.insertOne(event); + } + + public findAllByCallUUID(callUUID: string, options?: FindOptions): FindCursor { + return this.find({ 'call.UUID': callUUID }, options); + } + + public findAllByChannelUniqueIds( + uniqueIds: string[], + options?: FindOptions, + ): FindCursor { + return this.find( + { + channelUniqueId: { $in: uniqueIds }, + }, + options, + ); + } +} diff --git a/apps/meteor/server/models/raw/Users.js b/apps/meteor/server/models/raw/Users.js index 0e5832b2aad9..04df04af5939 100644 --- a/apps/meteor/server/models/raw/Users.js +++ b/apps/meteor/server/models/raw/Users.js @@ -2485,6 +2485,15 @@ export class UsersRaw extends BaseRaw { ); } + findOneByFreeSwitchExtensions(freeSwitchExtensions, options = {}) { + return this.findOne( + { + freeSwitchExtension: { $in: freeSwitchExtensions }, + }, + options, + ); + } + findAssignedFreeSwitchExtensions() { return this.findUsersWithAssignedFreeSwitchExtensions({ projection: { diff --git a/apps/meteor/server/models/raw/VideoConference.ts b/apps/meteor/server/models/raw/VideoConference.ts index 5d18d9892038..0f631cf2d301 100644 --- a/apps/meteor/server/models/raw/VideoConference.ts +++ b/apps/meteor/server/models/raw/VideoConference.ts @@ -5,6 +5,7 @@ import type { IUser, IRoom, RocketChatRecordDeleted, + IVoIPVideoConference, } from '@rocket.chat/core-typings'; import { VideoConferenceStatus } from '@rocket.chat/core-typings'; import type { FindPaginated, InsertionModel, IVideoConferenceModel } from '@rocket.chat/model-typings'; @@ -136,6 +137,13 @@ export class VideoConferenceRaw extends BaseRaw implements IVid return (await this.insertOne(call)).insertedId; } + public async createVoIP(call: InsertionModel): Promise { + const { externalId, ...data } = call; + + const doc = await this.findOneAndUpdate({ externalId }, { $set: data }, { upsert: true, returnDocument: 'after' }); + return doc.value?._id; + } + public updateOneById( _id: string, update: UpdateFilter | Partial, diff --git a/apps/meteor/server/models/startup.ts b/apps/meteor/server/models/startup.ts index c3ecc381f7f0..a03c2265c683 100644 --- a/apps/meteor/server/models/startup.ts +++ b/apps/meteor/server/models/startup.ts @@ -15,6 +15,8 @@ import './EmojiCustom'; import './ExportOperations'; import './FederationKeys'; import './FederationServers'; +import './FreeSwitchCall'; +import './FreeSwitchEvent'; import './ImportData'; import './InstanceStatus'; import './IntegrationHistory'; diff --git a/apps/meteor/server/services/video-conference/service.ts b/apps/meteor/server/services/video-conference/service.ts index 1675029ef03b..694f92d014a6 100644 --- a/apps/meteor/server/services/video-conference/service.ts +++ b/apps/meteor/server/services/video-conference/service.ts @@ -21,6 +21,8 @@ import type { VideoConferenceCapabilities, VideoConferenceCreateData, Optional, + ExternalVideoConference, + IVoIPVideoConference, } from '@rocket.chat/core-typings'; import { VideoConferenceStatus, @@ -29,6 +31,7 @@ import { isLivechatVideoConference, } from '@rocket.chat/core-typings'; import { Logger } from '@rocket.chat/logger'; +import type { InsertionModel } from '@rocket.chat/model-typings'; import { Users, VideoConference as VideoConferenceModel, Rooms, Messages, Subscriptions } from '@rocket.chat/models'; import { Random } from '@rocket.chat/random'; import type { PaginatedResult } from '@rocket.chat/rest-typings'; @@ -140,7 +143,7 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf public async join(uid: IUser['_id'] | undefined, callId: VideoConference['_id'], options: VideoConferenceJoinOptions): Promise { return wrapExceptions(async () => { const call = await VideoConferenceModel.findOneById(callId); - if (!call || call.endedAt) { + if (!call || call.endedAt || !videoConfTypes.isCallManagedByApp(call)) { throw new Error('invalid-call'); } @@ -175,6 +178,10 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf throw new Error('invalid-call'); } + if (!videoConfTypes.isCallManagedByApp(call)) { + return []; + } + if (!videoConfProviders.isProviderAvailable(call.providerName)) { throw new Error('video-conf-provider-unavailable'); } @@ -454,6 +461,16 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf return true; } + public async createVoIP(data: InsertionModel): Promise { + return wrapExceptions(async () => VideoConferenceModel.createVoIP(data)).catch((err) => { + logger.error({ + name: 'Error on VideoConf.createVoIP', + err, + }); + throw err; + }); + } + private notifyUser( userId: IUser['_id'], action: string, @@ -855,7 +872,7 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf } private async joinCall( - call: VideoConference, + call: ExternalVideoConference, user: AtLeast | undefined, options: VideoConferenceJoinOptions, ): Promise { @@ -885,7 +902,7 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf return room?.fname || room?.name || rid; } - private async generateNewUrl(call: VideoConference): Promise { + private async generateNewUrl(call: ExternalVideoConference): Promise { if (!videoConfProviders.isProviderAvailable(call.providerName)) { throw new Error('video-conf-provider-unavailable'); } @@ -944,7 +961,7 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf } private async getUrl( - call: VideoConference, + call: ExternalVideoConference, user?: AtLeast, options: VideoConferenceJoinOptions = {}, ): Promise { @@ -987,6 +1004,10 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf throw new Error('video-conf-data-not-found'); } + if (!videoConfTypes.isCallManagedByApp(call)) { + return; + } + if (!videoConfProviders.isProviderAvailable(call.providerName)) { throw new Error('video-conf-provider-unavailable'); } @@ -1001,6 +1022,10 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf throw new Error('video-conf-data-not-found'); } + if (!videoConfTypes.isCallManagedByApp(call)) { + return; + } + if (!videoConfProviders.isProviderAvailable(call.providerName)) { throw new Error('video-conf-provider-unavailable'); } @@ -1015,6 +1040,10 @@ export class VideoConfService extends ServiceClassInternal implements IVideoConf throw new Error('video-conf-data-not-found'); } + if (!videoConfTypes.isCallManagedByApp(call)) { + return; + } + if (!videoConfProviders.isProviderAvailable(call.providerName)) { throw new Error('video-conf-provider-unavailable'); } diff --git a/packages/core-services/src/types/IVideoConfService.ts b/packages/core-services/src/types/IVideoConfService.ts index 4f007229b98d..3c21db2f677b 100644 --- a/packages/core-services/src/types/IVideoConfService.ts +++ b/packages/core-services/src/types/IVideoConfService.ts @@ -2,11 +2,13 @@ import type { IRoom, IStats, IUser, + IVoIPVideoConference, VideoConference, VideoConferenceCapabilities, VideoConferenceCreateData, VideoConferenceInstructions, } from '@rocket.chat/core-typings'; +import type { InsertionModel } from '@rocket.chat/model-typings'; import type { PaginatedResult } from '@rocket.chat/rest-typings'; import type * as UiKit from '@rocket.chat/ui-kit'; @@ -41,4 +43,5 @@ export interface IVideoConfService { params: { callId: VideoConference['_id']; uid: IUser['_id']; rid: IRoom['_id'] }, ): Promise; assignDiscussionToConference(callId: VideoConference['_id'], rid: IRoom['_id'] | undefined): Promise; + createVoIP(data: InsertionModel): Promise; } diff --git a/packages/core-typings/src/IVideoConference.ts b/packages/core-typings/src/IVideoConference.ts index 334e1fd6a0e2..c3c084865156 100644 --- a/packages/core-typings/src/IVideoConference.ts +++ b/packages/core-typings/src/IVideoConference.ts @@ -29,7 +29,7 @@ export type LivechatInstructions = { callId: string; }; -export type VideoConferenceType = DirectCallInstructions['type'] | ConferenceInstructions['type'] | LivechatInstructions['type']; +export type VideoConferenceType = DirectCallInstructions['type'] | ConferenceInstructions['type'] | LivechatInstructions['type'] | 'voip'; export interface IVideoConferenceUser extends Pick, '_id' | 'username' | 'name' | 'avatarETag'> { ts: Date; @@ -73,7 +73,32 @@ export interface ILivechatVideoConference extends IVideoConference { type: 'livechat'; } -export type VideoConference = IDirectVideoConference | IGroupVideoConference | ILivechatVideoConference; +export interface IVoIPVideoConferenceData {} + +export type IVoIPVideoConference = IVideoConference & { + type: 'voip'; + externalId: string; + + callerExtension?: string; + calleeExtension?: string; + external?: boolean; + transferred?: boolean; + duration?: number; + + events: { + outgoing?: boolean; + hold?: boolean; + park?: boolean; + bridge?: boolean; + answer?: boolean; + }; +}; + +export type ExternalVideoConference = IDirectVideoConference | IGroupVideoConference | ILivechatVideoConference; + +export type InternalVideoConference = IVoIPVideoConference; + +export type VideoConference = ExternalVideoConference | InternalVideoConference; export type VideoConferenceInstructions = DirectCallInstructions | ConferenceInstructions | LivechatInstructions; @@ -89,11 +114,16 @@ export const isLivechatVideoConference = (call: VideoConference | undefined | nu return call?.type === 'livechat'; }; +export const isVoIPVideoConference = (call: VideoConference | undefined | null): call is IVoIPVideoConference => { + return call?.type === 'voip'; +}; + type GroupVideoConferenceCreateData = Omit & { createdBy: IUser['_id'] }; type DirectVideoConferenceCreateData = Omit & { createdBy: IUser['_id'] }; type LivechatVideoConferenceCreateData = Omit & { createdBy: IUser['_id'] }; +type VoIPVideoConferenceCreateData = Omit & { createdBy: IUser['_id'] }; export type VideoConferenceCreateData = AtLeast< - DirectVideoConferenceCreateData | GroupVideoConferenceCreateData | LivechatVideoConferenceCreateData, + DirectVideoConferenceCreateData | GroupVideoConferenceCreateData | LivechatVideoConferenceCreateData | VoIPVideoConferenceCreateData, 'createdBy' | 'type' | 'rid' | 'providerName' | 'providerData' >; diff --git a/packages/core-typings/src/utils.ts b/packages/core-typings/src/utils.ts index c00d8c3f5a7d..2e20ebc48c84 100644 --- a/packages/core-typings/src/utils.ts +++ b/packages/core-typings/src/utils.ts @@ -40,5 +40,11 @@ export type ValueOfUnion> = T extends any ? (K extends export type ValueOfOptional> = T extends undefined ? undefined : T extends object ? ValueOfUnion : null; export type DeepPartial = { - [P in keyof T]?: T[P] extends (infer U)[] ? DeepPartial[] : T[P] extends object | undefined ? DeepPartial : T[P]; + [P in keyof T]?: T[P] extends (infer U)[] | undefined + ? DeepPartial[] + : T[P] extends Date | undefined + ? T[P] + : T[P] extends object | undefined + ? DeepPartial + : T[P]; }; diff --git a/packages/core-typings/src/voip/IFreeSwitchCall.ts b/packages/core-typings/src/voip/IFreeSwitchCall.ts new file mode 100644 index 000000000000..b0f8043f78fc --- /dev/null +++ b/packages/core-typings/src/voip/IFreeSwitchCall.ts @@ -0,0 +1,64 @@ +import type { IRocketChatRecord } from '../IRocketChatRecord'; +import type { IUser } from '../IUser'; +import type { IFreeSwitchEventCall, IFreeSwitchEventCaller } from './IFreeSwitchEvent'; + +export interface IFreeSwitchCall extends IRocketChatRecord { + UUID: string; + channels: string[]; + events: IFreeSwitchCallEvent[]; + from?: Pick; + to?: Pick; + forwardedFrom?: Omit[]; + direction?: 'internal' | 'external_inbound' | 'external_outbound'; + voicemail?: boolean; + duration?: number; +} + +const knownEventTypes = [ + 'NEW', + 'INIT', + 'CREATE', + 'DESTROY', + 'ANSWER', + 'HANGUP', + 'BRIDGE', + 'UNBRIDGE', + 'OUTGOING', + 'PARK', + 'UNPARK', + 'HOLD', + 'UNHOLD', + 'ORIGINATE', + 'UUID', + 'REPORTING', + 'ROUTING', + 'RINGING', + 'ACTIVE', + 'EARLY', + 'RING_WAIT', + 'EXECUTE', + 'CONSUME_MEDIA', + 'EXCHANGE_MEDIA', + 'OTHER', + 'OTHER_STATE', + 'OTHER_CALL_STATE', +] as const; + +export type IFreeSwitchCallEventType = (typeof knownEventTypes)[number]; + +export const isKnownFreeSwitchEventType = (eventName: string): eventName is IFreeSwitchCallEventType => + knownEventTypes.includes(eventName as any); + +export type IFreeSwitchCallEvent = { + eventName: string; + type: IFreeSwitchCallEventType; + sequence?: string; + channelUniqueId?: string; + timestamp?: string; + firedAt?: Date; + caller?: IFreeSwitchEventCaller; + call?: IFreeSwitchEventCall; + + otherType?: string; + otherChannelId?: string; +}; diff --git a/packages/core-typings/src/voip/IFreeSwitchEvent.ts b/packages/core-typings/src/voip/IFreeSwitchEvent.ts new file mode 100644 index 000000000000..a1cc3e7eafe9 --- /dev/null +++ b/packages/core-typings/src/voip/IFreeSwitchEvent.ts @@ -0,0 +1,113 @@ +import type { IRocketChatRecord } from '../IRocketChatRecord'; + +export interface IFreeSwitchEvent extends IRocketChatRecord { + channelUniqueId?: string; + eventName: string; + detaildEventName: string; + + sequence?: string; + state?: string; + previousCallState?: string; + callState?: string; + timestamp?: string; + + firedAt?: Date; + answerState?: string; + hangupCause?: string; + + referencedIds?: string[]; + receivedAt?: Date; + + channelName?: string; + direction?: string; + + caller?: IFreeSwitchEventCaller; + call?: IFreeSwitchEventCall; + + eventData: Record; +} + +export interface IFreeSwitchEventCall { + UUID?: string; + answerState?: string; + state?: string; + previousState?: string; + presenceId?: string; + sipId?: string; + authorized?: string; + hangupCause?: string; + duration?: number; + + from?: { + user?: string; + stripped?: string; + port?: string; + uri?: string; + host?: string; + full?: string; + + userId?: string; + }; + + req?: { + user?: string; + port?: string; + uri?: string; + host?: string; + + userId?: string; + }; + + to?: { + user?: string; + port?: string; + uri?: string; + full?: string; + dialedExtension?: string; + dialedUser?: string; + + userId?: string; + }; + + contact?: { + user?: string; + uri?: string; + host?: string; + + userId?: string; + }; + + via?: { + full?: string; + host?: string; + rport?: string; + + userId?: string; + }; +} + +export interface IFreeSwitchEventCaller { + uniqueId?: string; + direction?: string; + username?: string; + networkAddr?: string; + ani?: string; + destinationNumber?: string; + source?: string; + context?: string; + name?: string; + number?: string; + + originalCaller?: { + name?: string; + number?: string; + }; + privacy?: { + hideName?: string; + hideNumber?: string; + }; + channel?: { + name?: string; + createdTime?: string; + }; +} diff --git a/packages/core-typings/src/voip/index.ts b/packages/core-typings/src/voip/index.ts index 0a83a01d70bc..edede37e6cdc 100644 --- a/packages/core-typings/src/voip/index.ts +++ b/packages/core-typings/src/voip/index.ts @@ -17,3 +17,5 @@ export * from './IVoipClientEvents'; export * from './VoIPUserConfiguration'; export * from './VoIpCallerInfo'; export * from './ICallDetails'; +export * from './IFreeSwitchCall'; +export * from './IFreeSwitchEvent'; diff --git a/packages/freeswitch/src/connect.ts b/packages/freeswitch/src/connect.ts index 6ea3741edc42..2d6d74295af1 100644 --- a/packages/freeswitch/src/connect.ts +++ b/packages/freeswitch/src/connect.ts @@ -6,7 +6,12 @@ import { logger } from './logger'; const defaultPassword = 'ClueCon'; -export async function connect(options?: { host?: string; port?: number; password?: string }): Promise { +export type EventNames = Parameters; + +export async function connect( + options?: { host?: string; port?: number; password?: string }, + customEventNames: EventNames = [], +): Promise { const host = options?.host ?? '127.0.0.1'; const port = options?.port ?? 8021; const password = options?.password ?? defaultPassword; @@ -26,7 +31,7 @@ export async function connect(options?: { host?: string; port?: number; password await currentCall.onceAsync('freeswitch_auth_request', 20_000, 'FreeSwitchClient expected authentication request'); await currentCall.auth(password); currentCall.auto_cleanup(); - await currentCall.event_json('CHANNEL_EXECUTE_COMPLETE', 'BACKGROUND_JOB'); + await currentCall.event_json('CHANNEL_EXECUTE_COMPLETE', 'BACKGROUND_JOB', ...customEventNames); } catch (error) { logger.error('FreeSwitchClient: connect error', error); reject(error); diff --git a/packages/freeswitch/src/index.ts b/packages/freeswitch/src/index.ts index 30272ff42df9..6248f38c97d5 100644 --- a/packages/freeswitch/src/index.ts +++ b/packages/freeswitch/src/index.ts @@ -1 +1,2 @@ export * from './commands'; +export * from './listenToEvents'; diff --git a/packages/freeswitch/src/listenToEvents.ts b/packages/freeswitch/src/listenToEvents.ts new file mode 100644 index 000000000000..c108a9890baa --- /dev/null +++ b/packages/freeswitch/src/listenToEvents.ts @@ -0,0 +1,37 @@ +import type { FreeSwitchResponse } from 'esl'; + +import { connect, type EventNames } from './connect'; + +export async function listenToEvents( + callback: (eventName: string, data: Record) => Promise, + options?: { host?: string; port?: number; password?: string }, +): Promise { + const eventsToListen: EventNames = [ + 'CHANNEL_CALLSTATE', + 'CHANNEL_STATE', + 'CHANNEL_CREATE', + 'CHANNEL_DESTROY', + 'CHANNEL_ANSWER', + 'CHANNEL_HANGUP', + 'CHANNEL_HANGUP_COMPLETE', + 'CHANNEL_BRIDGE', + 'CHANNEL_UNBRIDGE', + 'CHANNEL_OUTGOING', + 'CHANNEL_PARK', + 'CHANNEL_UNPARK', + 'CHANNEL_HOLD', + 'CHANNEL_UNHOLD', + 'CHANNEL_ORIGINATE', + 'CHANNEL_UUID', + ]; + + const connection = await connect(options, eventsToListen); + + eventsToListen.forEach((eventName) => + connection.on(eventName, (event) => { + callback(eventName, event.body); + }), + ); + + return connection; +} diff --git a/packages/model-typings/src/index.ts b/packages/model-typings/src/index.ts index 77fe8f012ec9..5482132e4e57 100644 --- a/packages/model-typings/src/index.ts +++ b/packages/model-typings/src/index.ts @@ -14,6 +14,8 @@ export * from './models/IEmojiCustomModel'; export * from './models/IExportOperationsModel'; export * from './models/IFederationKeysModel'; export * from './models/IFederationServersModel'; +export * from './models/IFreeSwitchCallModel'; +export * from './models/IFreeSwitchEventModel'; export * from './models/IInstanceStatusModel'; export * from './models/IIntegrationHistoryModel'; export * from './models/IIntegrationsModel'; diff --git a/packages/model-typings/src/models/IFreeSwitchCallModel.ts b/packages/model-typings/src/models/IFreeSwitchCallModel.ts new file mode 100644 index 000000000000..ef5b35860420 --- /dev/null +++ b/packages/model-typings/src/models/IFreeSwitchCallModel.ts @@ -0,0 +1,9 @@ +import type { IFreeSwitchCall } from '@rocket.chat/core-typings'; +import type { FindCursor, FindOptions, WithoutId } from 'mongodb'; + +import type { IBaseModel, InsertionModel } from './IBaseModel'; + +export interface IFreeSwitchCallModel extends IBaseModel { + registerCall(call: WithoutId>): Promise; + findAllByChannelUniqueIds(uniqueIds: string[], options?: FindOptions): FindCursor; +} diff --git a/packages/model-typings/src/models/IFreeSwitchEventModel.ts b/packages/model-typings/src/models/IFreeSwitchEventModel.ts new file mode 100644 index 000000000000..118a57f85410 --- /dev/null +++ b/packages/model-typings/src/models/IFreeSwitchEventModel.ts @@ -0,0 +1,10 @@ +import type { IFreeSwitchEvent } from '@rocket.chat/core-typings'; +import type { FindCursor, FindOptions, WithoutId, InsertOneResult } from 'mongodb'; + +import type { IBaseModel, InsertionModel } from './IBaseModel'; + +export interface IFreeSwitchEventModel extends IBaseModel { + registerEvent(event: WithoutId>): Promise>; + findAllByCallUUID(callUUID: string, options?: FindOptions): FindCursor; + findAllByChannelUniqueIds(uniqueIds: string[], options?: FindOptions): FindCursor; +} diff --git a/packages/model-typings/src/models/IUsersModel.ts b/packages/model-typings/src/models/IUsersModel.ts index a2863aba8fe5..407006596ba6 100644 --- a/packages/model-typings/src/models/IUsersModel.ts +++ b/packages/model-typings/src/models/IUsersModel.ts @@ -405,6 +405,7 @@ export interface IUsersModel extends IBaseModel { findAgentsAvailableWithoutBusinessHours(userIds: string[] | null): FindCursor>; updateLivechatStatusByAgentIds(userIds: string[], status: ILivechatAgentStatus): Promise; findOneByFreeSwitchExtension(extension: string, options?: FindOptions): Promise; + findOneByFreeSwitchExtensions(extensions: string[], options?: FindOptions): Promise; setFreeSwitchExtension(userId: string, extension: string | undefined): Promise; findAssignedFreeSwitchExtensions(): FindCursor; findUsersWithAssignedFreeSwitchExtensions(options?: FindOptions): FindCursor; diff --git a/packages/model-typings/src/models/IVideoConferenceModel.ts b/packages/model-typings/src/models/IVideoConferenceModel.ts index 8ef775fb6082..66a082af85d2 100644 --- a/packages/model-typings/src/models/IVideoConferenceModel.ts +++ b/packages/model-typings/src/models/IVideoConferenceModel.ts @@ -5,10 +5,11 @@ import type { IUser, VideoConference, VideoConferenceStatus, + IVoIPVideoConference, } from '@rocket.chat/core-typings'; import type { FindCursor, UpdateOptions, UpdateFilter, UpdateResult, FindOptions } from 'mongodb'; -import type { FindPaginated, IBaseModel } from './IBaseModel'; +import type { FindPaginated, IBaseModel, InsertionModel } from './IBaseModel'; export interface IVideoConferenceModel extends IBaseModel { findPaginatedByRoomId( @@ -67,4 +68,6 @@ export interface IVideoConferenceModel extends IBaseModel { setDiscussionRidById(callId: string, discussionRid: IRoom['_id']): Promise; unsetDiscussionRid(discussionRid: IRoom['_id']): Promise; + + createVoIP(call: InsertionModel): Promise; } diff --git a/packages/models/src/index.ts b/packages/models/src/index.ts index 67bb4dfbcd47..7f13e4c9a079 100644 --- a/packages/models/src/index.ts +++ b/packages/models/src/index.ts @@ -13,6 +13,8 @@ import type { IExportOperationsModel, IFederationKeysModel, IFederationServersModel, + IFreeSwitchCallModel, + IFreeSwitchEventModel, IInstanceStatusModel, IIntegrationHistoryModel, IIntegrationsModel, @@ -111,6 +113,8 @@ export const ExportOperations = proxify('IExportOperatio export const FederationServers = proxify('IFederationServersModel'); export const FederationKeys = proxify('IFederationKeysModel'); export const FederationRoomEvents = proxify('IFederationRoomEventsModel'); +export const FreeSwitchCall = proxify('IFreeSwitchCallModel'); +export const FreeSwitchEvent = proxify('IFreeSwitchEventModel'); export const ImportData = proxify('IImportDataModel'); export const Imports = proxify('IImportsModel'); export const InstanceStatus = proxify('IInstanceStatusModel'); diff --git a/packages/tools/src/convertSubObjectsIntoPaths.spec.ts b/packages/tools/src/convertSubObjectsIntoPaths.spec.ts new file mode 100644 index 000000000000..c595a17ae70e --- /dev/null +++ b/packages/tools/src/convertSubObjectsIntoPaths.spec.ts @@ -0,0 +1,117 @@ +import { expect } from 'chai'; + +import { convertSubObjectsIntoPaths } from './convertSubObjectsIntoPaths'; + +describe('convertSubObjectsIntoPaths', () => { + it('should flatten a simple object with no nested structure', () => { + const input = { a: 1, b: 2, c: 3 }; + const expected = { a: 1, b: 2, c: 3 }; + + expect(convertSubObjectsIntoPaths(input)).to.deep.equal(expected); + }); + + it('should flatten a nested object into paths', () => { + const input = { + a: 1, + b: { + c: 2, + d: { + e: 3, + }, + }, + }; + const expected = { + 'a': 1, + 'b.c': 2, + 'b.d.e': 3, + }; + + expect(convertSubObjectsIntoPaths(input)).to.deep.equal(expected); + }); + + it('should handle objects with array values', () => { + const input = { + a: [1, 2, 3], + b: { + c: [4, 5], + }, + }; + const expected = { + 'a': [1, 2, 3], + 'b.c': [4, 5], + }; + + expect(convertSubObjectsIntoPaths(input)).to.deep.equal(expected); + }); + + it('should handle deeply nested objects', () => { + const input = { + a: { + b: { + c: { + d: { + e: { + f: 6, + }, + }, + }, + }, + }, + }; + const expected = { + 'a.b.c.d.e.f': 6, + }; + + expect(convertSubObjectsIntoPaths(input)).to.deep.equal(expected); + }); + + it('should handle an empty object', () => { + const input = {}; + const expected = {}; + + expect(convertSubObjectsIntoPaths(input)).to.deep.equal(expected); + }); + + it('should handle objects with mixed types of values', () => { + const input = { + a: 1, + b: 'string', + c: true, + d: { + e: null, + f: undefined, + g: { + h: 2, + }, + }, + }; + const expected = { + 'a': 1, + + 'b': 'string', + + 'c': true, + 'd.e': null, + 'd.f': undefined, + 'd.g.h': 2, + }; + + expect(convertSubObjectsIntoPaths(input)).to.deep.equal(expected); + }); + + it('should respect the parentPath parameter', () => { + const input = { + a: 1, + b: { + c: 2, + }, + }; + const parentPath = 'root'; + const expected = { + 'root.a': 1, + 'root.b.c': 2, + }; + + expect(convertSubObjectsIntoPaths(input, parentPath)).to.deep.equal(expected); + }); +}); diff --git a/packages/tools/src/convertSubObjectsIntoPaths.ts b/packages/tools/src/convertSubObjectsIntoPaths.ts new file mode 100644 index 000000000000..8c128aa19f2c --- /dev/null +++ b/packages/tools/src/convertSubObjectsIntoPaths.ts @@ -0,0 +1,16 @@ +export function convertSubObjectsIntoPaths(object: Record, parentPath?: string): Record { + return Object.fromEntries( + Object.keys(object).flatMap((key) => { + const value = object[key]; + const fullKey = parentPath ? `${parentPath}.${key}` : key; + + if (typeof value === 'object' && !Array.isArray(value) && value !== null) { + const flattened = convertSubObjectsIntoPaths(value, fullKey); + + return Object.keys(flattened).map((newKey) => [newKey, flattened[newKey]]); + } + + return [[fullKey, value]]; + }) as [string, any][], + ); +} diff --git a/packages/tools/src/index.ts b/packages/tools/src/index.ts index 96faa4d55969..410bd711d24a 100644 --- a/packages/tools/src/index.ts +++ b/packages/tools/src/index.ts @@ -1,5 +1,7 @@ +export * from './convertSubObjectsIntoPaths'; export * from './getObjectKeys'; export * from './normalizeLanguage'; +export * from './objectMap'; export * from './pick'; export * from './stream'; export * from './timezone'; diff --git a/packages/tools/src/objectMap.spec.ts b/packages/tools/src/objectMap.spec.ts new file mode 100644 index 000000000000..15299b9614a0 --- /dev/null +++ b/packages/tools/src/objectMap.spec.ts @@ -0,0 +1,93 @@ +import { expect } from 'chai'; + +import { objectMap } from './objectMap'; + +describe('objectMap', () => { + it('should map a simple object non-recursively', () => { + const input = { a: 1, b: 2, c: 3 }; + const callback = ({ key, value }) => ({ key: key.toUpperCase(), value: value * 2 }); + const expected = { A: 2, B: 4, C: 6 }; + expect(objectMap(input, callback)).to.deep.equal(expected); + }); + it('should filter out undefined results from callback', () => { + const input = { a: 1, b: 2, c: 3 }; + const callback = ({ key, value }) => (value > 1 ? { key, value } : undefined); + const expected = { b: 2, c: 3 }; + expect(objectMap(input, callback)).to.deep.equal(expected); + }); + it('should map a nested object recursively', () => { + const input = { + a: 1, + b: { + c: 2, + d: { + e: 3, + }, + }, + }; + const callback = ({ key, value }) => ({ key: `mapped_${key}`, value: typeof value === 'number' ? value * 10 : value }); + const expected = { + mapped_a: 10, + mapped_b: { + mapped_c: 20, + mapped_d: { + mapped_e: 30, + }, + }, + }; + expect(objectMap(input, callback, true)).to.deep.equal(expected); + }); + it('should handle an empty object', () => { + const input = {}; + const callback = ({ key, value }) => ({ key: `mapped_${key}`, value }); + const expected = {}; + expect(objectMap(input, callback)).to.deep.equal(expected); + }); + it('should handle mixed value types in non-recursive mode', () => { + const input = { + a: 1, + b: 'string', + c: true, + d: null, + }; + const callback = ({ key, value }) => ({ key: key.toUpperCase(), value: typeof value === 'number' ? value * 2 : value }); + const expected = { + A: 2, + B: 'string', + C: true, + D: null, + }; + expect(objectMap(input, callback)).to.deep.equal(expected); + }); + it('should handle nested objects with mixed types recursively', () => { + const input = { + a: 1, + b: { + c: 'string', + d: { + e: true, + f: null, + }, + }, + }; + const callback = ({ key, value }) => ({ key: key.toUpperCase(), value }); + const expected = { + A: 1, + B: { + C: 'string', + D: { + E: true, + F: null, + }, + }, + }; + expect(objectMap(input, callback, true)).to.deep.equal(expected); + }); + it('should not modify the original object', () => { + const input = { a: 1, b: 2 }; + const original = { ...input }; + const callback = ({ key, value }) => ({ key, value: value * 2 }); + objectMap(input, callback); + expect(input).to.deep.equal(original); + }); +}); diff --git a/packages/tools/src/objectMap.ts b/packages/tools/src/objectMap.ts new file mode 100644 index 000000000000..a28b37ed5048 --- /dev/null +++ b/packages/tools/src/objectMap.ts @@ -0,0 +1,35 @@ +export function objectMap = Record, K extends keyof TObject | string = keyof TObject>( + object: TObject, + cb: (value: { key: K; value: TObject[K] }) => { key: string | number | symbol; value: any } | undefined, + recursive?: false, +): Record; +export function objectMap = Record>( + object: TObject, + cb: (value: { key: string | number | symbol; value: any }) => { key: string | number | symbol; value: any } | undefined, + recursive: true, +): Record; +export function objectMap = Record, K extends keyof TObject | string = keyof TObject>( + object: TObject, + cb: (value: { key: K; value: any }) => { key: string | number | symbol; value: any } | undefined, + recursive: false, +): Record; +export function objectMap = Record, K extends keyof TObject | string = keyof TObject>( + object: TObject, + cb: (value: { key: K | string; value: any }) => { key: string | number | symbol; value: any } | undefined, + recursive = false, +): Record { + return Object.fromEntries( + Object.keys(object) + .map((key) => { + const value = object[key as K]; + if (recursive && value && typeof value === 'object' && !Array.isArray(value) && !((value as any) instanceof Date)) { + const newValue = objectMap(value, cb as any, true); + return cb({ key, value: newValue }); + } + + return cb({ key, value }); + }) + .filter((item) => !!item) + .map((item) => [item.key, item.value]), + ); +} From 35de31c1f8f9872abf60d22769832cd16281cad6 Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Fri, 20 Dec 2024 14:26:34 -0300 Subject: [PATCH 23/28] regression: not use visitor prop for omnichannel endpoint (#34262) Co-authored-by: Kevin Aleman --- .../app/livechat/server/api/v1/contact.ts | 6 ++-- .../tests/end-to-end/api/livechat/contacts.ts | 34 +------------------ packages/rest-typings/src/v1/omnichannel.ts | 12 +------ 3 files changed, 5 insertions(+), 47 deletions(-) diff --git a/apps/meteor/app/livechat/server/api/v1/contact.ts b/apps/meteor/app/livechat/server/api/v1/contact.ts index f952df2c8975..03cc5ddeaabd 100644 --- a/apps/meteor/app/livechat/server/api/v1/contact.ts +++ b/apps/meteor/app/livechat/server/api/v1/contact.ts @@ -171,11 +171,11 @@ API.v1.addRoute( { authRequired: true, permissionsRequired: ['view-livechat-contact'], validateParams: isGETOmnichannelContactsCheckExistenceProps }, { async get() { - const { contactId, visitor, email, phone } = this.queryParams; + const { contactId, email, phone } = this.queryParams; - const contact = await (visitor ? getContactByChannel(visitor) : LivechatContacts.countByContactInfo({ contactId, email, phone })); + const contact = await LivechatContacts.countByContactInfo({ contactId, email, phone }); - return API.v1.success({ exists: !!contact }); + return API.v1.success({ exists: contact > 0 }); }, }, ); diff --git a/apps/meteor/tests/end-to-end/api/livechat/contacts.ts b/apps/meteor/tests/end-to-end/api/livechat/contacts.ts index 3ee296317a4f..e19f5490b857 100644 --- a/apps/meteor/tests/end-to-end/api/livechat/contacts.ts +++ b/apps/meteor/tests/end-to-end/api/livechat/contacts.ts @@ -1002,7 +1002,6 @@ describe('LIVECHAT - contacts', () => { describe('[GET] omnichannel/contacts.checkExistence', () => { let contactId: string; - let association: ILivechatContactVisitorAssociation; let roomId: string; const email = faker.internet.email().toLowerCase(); @@ -1027,13 +1026,6 @@ describe('LIVECHAT - contacts', () => { const room = await createLivechatRoom(visitor.token); roomId = room._id; - association = { - visitorId: visitor._id, - source: { - type: room.source.type, - id: room.source.id, - }, - }; }); after(async () => Promise.all([restorePermissionToRoles('view-livechat-contact'), closeOmnichannelRoom(roomId)])); @@ -1054,25 +1046,6 @@ describe('LIVECHAT - contacts', () => { expect(res.body).to.have.property('exists', false); }); - it('should confirm a contact exists when checking by visitor association', async () => { - const res = await request.get(api(`omnichannel/contacts.checkExistence`)).set(credentials).query({ visitor: association }); - - expect(res.status).to.be.equal(200); - expect(res.body).to.have.property('success', true); - expect(res.body).to.have.property('exists', true); - }); - - it('should confirm a contact does not exist when checking by visitor association', async () => { - const res = await request - .get(api(`omnichannel/contacts.checkExistence`)) - .set(credentials) - .query({ visitor: { ...association, visitorId: 'invalid-id' } }); - - expect(res.status).to.be.equal(200); - expect(res.body).to.have.property('success', true); - expect(res.body).to.have.property('exists', false); - }); - it('should confirm a contact exists when checking by email', async () => { const res = await request.get(api(`omnichannel/contacts.checkExistence`)).set(credentials).query({ email }); @@ -1126,22 +1099,17 @@ describe('LIVECHAT - contacts', () => { "must have required property 'contactId'", "must have required property 'email'", "must have required property 'phone'", - "must have required property 'visitor'", 'must match exactly one schema in oneOf [invalid-params]', ]); }); it('should return an error if more than one field is provided', async () => { - const res = await request - .get(api(`omnichannel/contacts.checkExistence`)) - .set(credentials) - .query({ contactId, visitor: association, email, phone }); + const res = await request.get(api(`omnichannel/contacts.checkExistence`)).set(credentials).query({ contactId, email, phone }); expectInvalidParams(res, [ 'must NOT have additional properties', 'must NOT have additional properties', 'must NOT have additional properties', - 'must NOT have additional properties', 'must match exactly one schema in oneOf [invalid-params]', ]); }); diff --git a/packages/rest-typings/src/v1/omnichannel.ts b/packages/rest-typings/src/v1/omnichannel.ts index 38813059db2c..b612a2697aa4 100644 --- a/packages/rest-typings/src/v1/omnichannel.ts +++ b/packages/rest-typings/src/v1/omnichannel.ts @@ -29,7 +29,6 @@ import type { SMSProviderResponse, ILivechatTriggerActionResponse, ILivechatContact, - ILivechatContactVisitorAssociation, ILivechatContactChannel, IUser, } from '@rocket.chat/core-typings'; @@ -1336,7 +1335,7 @@ const POSTUpdateOmnichannelContactsSchema = { export const isPOSTUpdateOmnichannelContactsProps = ajv.compile(POSTUpdateOmnichannelContactsSchema); -type GETOmnichannelContactsProps = { contactId?: string; visitor?: ILivechatContactVisitorAssociation }; +type GETOmnichannelContactsProps = { contactId?: string }; export const ContactVisitorAssociationSchema = { type: 'object', @@ -1410,7 +1409,6 @@ type GETOmnichannelContactsCheckExistenceProps = { contactId?: string; email?: string; phone?: string; - visitor?: ILivechatContactVisitorAssociation; }; const GETOmnichannelContactsCheckExistenceSchema = { @@ -1452,14 +1450,6 @@ const GETOmnichannelContactsCheckExistenceSchema = { required: ['phone'], additionalProperties: false, }, - { - type: 'object', - properties: { - visitor: ContactVisitorAssociationSchema, - }, - required: ['visitor'], - additionalProperties: false, - }, ], }; From 347819be013f023688ec64e5d30bcf1f572293c6 Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Fri, 20 Dec 2024 14:27:31 -0300 Subject: [PATCH 24/28] fix: validation on bot field used by js.sdk (#34214) --- .../app/lib/server/methods/sendMessage.ts | 2 +- .../components/message/MessageHeader.tsx | 2 +- apps/meteor/tests/end-to-end/api/methods.ts | 26 +++++++++++++++++++ .../core-typings/src/IMessage/IMessage.ts | 2 +- 4 files changed, 29 insertions(+), 3 deletions(-) diff --git a/apps/meteor/app/lib/server/methods/sendMessage.ts b/apps/meteor/app/lib/server/methods/sendMessage.ts index 6ab03df337ef..6c4ddda1b125 100644 --- a/apps/meteor/app/lib/server/methods/sendMessage.ts +++ b/apps/meteor/app/lib/server/methods/sendMessage.ts @@ -132,7 +132,7 @@ Meteor.methods({ ts: Match.Maybe(Date), t: Match.Maybe(String), otrAck: Match.Maybe(String), - bot: Match.Maybe(Boolean), + bot: Match.Maybe(Object), content: Match.Maybe(Object), e2e: Match.Maybe(String), e2eMentions: Match.Maybe(Object), diff --git a/apps/meteor/client/components/message/MessageHeader.tsx b/apps/meteor/client/components/message/MessageHeader.tsx index e2d7fb6f2669..c4bc672ba956 100644 --- a/apps/meteor/client/components/message/MessageHeader.tsx +++ b/apps/meteor/client/components/message/MessageHeader.tsx @@ -72,7 +72,7 @@ const MessageHeader = ({ message }: MessageHeaderProps): ReactElement => { )} - {shouldShowRolesList && } + {shouldShowRolesList && } {formatTime(message.ts)} diff --git a/apps/meteor/tests/end-to-end/api/methods.ts b/apps/meteor/tests/end-to-end/api/methods.ts index e3e8a193d799..8e4950be5127 100644 --- a/apps/meteor/tests/end-to-end/api/methods.ts +++ b/apps/meteor/tests/end-to-end/api/methods.ts @@ -2082,6 +2082,32 @@ describe('Meteor.methods', () => { }) .end(done); }); + + it('should accept message sent by js.SDK', (done) => { + void request + .post(methodCall('sendMessage')) + .set(credentials) + .send({ + message: JSON.stringify({ + method: 'sendMessage', + params: [{ rid, msg: 'test message', bot: { i: 'js.SDK' } }], + id: 1000, + msg: 'method', + }), + }) + .expect('Content-Type', 'application/json') + .expect(200) + .expect((res) => { + expect(res.body).to.have.property('success', true); + + const data = JSON.parse(res.body.message); + + expect(data).to.have.a.property('result').that.is.an('object'); + expect(data.result).to.have.a.property('bot').that.is.an('object'); + expect(data.result.bot).to.have.a.property('i', 'js.SDK'); + }) + .end(done); + }); }); describe('[@updateMessage]', () => { diff --git a/packages/core-typings/src/IMessage/IMessage.ts b/packages/core-typings/src/IMessage/IMessage.ts index 6c5511966ac8..ab2eee721d46 100644 --- a/packages/core-typings/src/IMessage/IMessage.ts +++ b/packages/core-typings/src/IMessage/IMessage.ts @@ -200,7 +200,7 @@ export interface IMessage extends IRocketChatRecord { private?: boolean; /* @deprecated */ - bot?: boolean; + bot?: Record; sentByEmail?: boolean; webRtcCallEndTs?: Date; role?: string; From c9deda3946ef9e7d4204762dce029b5f982182fa Mon Sep 17 00:00:00 2001 From: gabriellsh <40830821+gabriellsh@users.noreply.github.com> Date: Fri, 20 Dec 2024 15:29:13 -0300 Subject: [PATCH 25/28] fix: User default avatar preview not respecting `Use Full Name Initials` settings (#34187) --- .changeset/five-peaches-approve.md | 5 +++ .../UserAvatarEditor/UserAvatarEditor.tsx | 8 ++-- .../account/profile/AccountProfileForm.tsx | 3 +- .../views/admin/users/AdminUserForm.tsx | 3 +- apps/meteor/server/routes/avatar/user.spec.ts | 39 ++++++++++++++++--- apps/meteor/server/routes/avatar/user.ts | 7 +++- 6 files changed, 54 insertions(+), 11 deletions(-) create mode 100644 .changeset/five-peaches-approve.md diff --git a/.changeset/five-peaches-approve.md b/.changeset/five-peaches-approve.md new file mode 100644 index 000000000000..090e3716c025 --- /dev/null +++ b/.changeset/five-peaches-approve.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/meteor": patch +--- + +Adds support for `Use Full Name Initials to Generate Default Avatar` setting for the generated avatar preview button when editing an User's avatar diff --git a/apps/meteor/client/components/avatar/UserAvatarEditor/UserAvatarEditor.tsx b/apps/meteor/client/components/avatar/UserAvatarEditor/UserAvatarEditor.tsx index 95659d762d30..60f8efbb06a7 100644 --- a/apps/meteor/client/components/avatar/UserAvatarEditor/UserAvatarEditor.tsx +++ b/apps/meteor/client/components/avatar/UserAvatarEditor/UserAvatarEditor.tsx @@ -19,10 +19,12 @@ type UserAvatarEditorProps = { setAvatarObj: (obj: AvatarObject) => void; disabled?: boolean; etag: IUser['avatarETag']; + name: IUser['name']; }; -function UserAvatarEditor({ currentUsername, username, setAvatarObj, disabled, etag }: UserAvatarEditorProps): ReactElement { +function UserAvatarEditor({ currentUsername, username, setAvatarObj, name, disabled, etag }: UserAvatarEditorProps): ReactElement { const { t } = useTranslation(); + const useFullNameForDefaultAvatar = useSetting('UI_Use_Name_Avatar'); const rotateImages = useSetting('FileUpload_RotateImages'); const [avatarFromUrl, setAvatarFromUrl] = useState(''); const [newAvatarSource, setNewAvatarSource] = useState(); @@ -53,7 +55,7 @@ function UserAvatarEditor({ currentUsername, username, setAvatarObj, disabled, e }; const clickReset = (): void => { - setNewAvatarSource(`/avatar/%40${username}`); + setNewAvatarSource(`/avatar/%40${useFullNameForDefaultAvatar ? name : username}`); setAvatarObj('reset'); }; @@ -91,7 +93,7 @@ function UserAvatarEditor({ currentUsername, username, setAvatarObj, disabled, e ): ReactEle formState: { errors }, } = useFormContext(); - const { email, avatar, username } = watch(); + const { email, avatar, username, name: userFullName } = watch(); const previousEmail = user ? getUserEmailAddress(user) : ''; const previousUsername = user?.username || ''; @@ -150,6 +150,7 @@ const AccountProfileForm = (props: AllHTMLAttributes): ReactEle )} /> diff --git a/apps/meteor/server/routes/avatar/user.spec.ts b/apps/meteor/server/routes/avatar/user.spec.ts index 3ae8e3d48840..1604c545aa05 100644 --- a/apps/meteor/server/routes/avatar/user.spec.ts +++ b/apps/meteor/server/routes/avatar/user.spec.ts @@ -236,13 +236,42 @@ describe('#userAvatarByUsername()', () => { expect(pipe.calledWith(response)).to.be.true; }); - it(`should serve svg if requestUsername starts with @`, async () => { - const request = { url: '/@jon' }; + describe('should serve svg if requestUsername starts with @', () => { + it('should serve SVG and useAllInitials should be false', async () => { + const request = { url: '/@jon' }; + + mocks.settingsGet.returns(false); + + await userAvatarByUsername(request, response, next); + + expect(mocks.utils.setCacheAndDispositionHeaders.calledWith(request, response)).to.be.true; + expect( + mocks.utils.serveSvgAvatarInRequestedFormat.calledWith({ + nameOrUsername: 'jon', + req: request, + res: response, + useAllInitials: false, + }), + ).to.be.true; + }); - await userAvatarByUsername(request, response, next); + it('should serve SVG and useAllInitials should be true', async () => { + const request = { url: '/@baba yaga' }; - expect(mocks.utils.setCacheAndDispositionHeaders.calledWith(request, response)).to.be.true; - expect(mocks.utils.serveSvgAvatarInRequestedFormat.calledWith({ nameOrUsername: 'jon', req: request, res: response })).to.be.true; + mocks.settingsGet.withArgs('UI_Use_Name_Avatar').returns(true); + + await userAvatarByUsername(request, response, next); + + expect(mocks.utils.setCacheAndDispositionHeaders.calledWith(request, response)).to.be.true; + expect( + mocks.utils.serveSvgAvatarInRequestedFormat.calledWith({ + nameOrUsername: 'baba yaga', + req: request, + res: response, + useAllInitials: true, + }), + ).to.be.true; + }); }); it(`should serve avatar file if found`, async () => { diff --git a/apps/meteor/server/routes/avatar/user.ts b/apps/meteor/server/routes/avatar/user.ts index a6870b7b8957..5241390e0650 100644 --- a/apps/meteor/server/routes/avatar/user.ts +++ b/apps/meteor/server/routes/avatar/user.ts @@ -40,7 +40,12 @@ export const userAvatarByUsername = async function (request: IncomingMessage, re // if request starts with @ always return the svg letters if (requestUsername[0] === '@') { - serveSvgAvatarInRequestedFormat({ nameOrUsername: requestUsername.slice(1), req, res }); + serveSvgAvatarInRequestedFormat({ + nameOrUsername: requestUsername.slice(1), + req, + res, + useAllInitials: settings.get('UI_Use_Name_Avatar'), + }); return; } From 24170d938c78a279f40b4ec488da982155c2e7b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrique=20Guimar=C3=A3es=20Ribeiro?= <43561537+rique223@users.noreply.github.com> Date: Fri, 20 Dec 2024 16:54:19 -0300 Subject: [PATCH 26/28] feat: Workspace/subscription ux (#34057) --- .changeset/sour-roses-invite.md | 6 ++ .../admin/subscription/SubscriptionPage.tsx | 15 ++-- .../components/FeatureUsageCard.tsx | 9 +-- .../components/FeatureUsageCardBody.tsx | 15 ++++ .../components/cards/ActiveSessionsCard.tsx | 17 +++-- .../cards/ActiveSessionsPeakCard.tsx | 7 +- .../cards/AppsUsageCard/AppsUsageCard.tsx | 33 ++++---- .../AppsUsageCard/AppsUsageCardSection.tsx | 2 +- .../components/cards/CountMACCard.tsx | 11 ++- .../components/cards/CountSeatsCard.tsx | 11 ++- .../subscription/components/cards/MACCard.tsx | 5 +- .../cards/PlanCard/PlanCardCommunity.tsx | 10 +-- .../components/cards/SeatsCard.tsx | 5 +- .../DeploymentCard/DeploymentCard.tsx | 75 ++++++++++++------- .../MessagesRoomsCard/MessagesRoomsCard.tsx | 66 +++++++--------- .../UsersUploadsCard/UsersUploadsCard.tsx | 61 +++++++-------- .../workspace/VersionCard/VersionCard.tsx | 9 ++- .../components/WorkspaceCardSection.tsx | 12 +-- .../components/WorkspaceCardSectionTitle.tsx | 15 ++++ 19 files changed, 222 insertions(+), 162 deletions(-) create mode 100644 .changeset/sour-roses-invite.md create mode 100644 apps/meteor/client/views/admin/subscription/components/FeatureUsageCardBody.tsx create mode 100644 apps/meteor/client/views/admin/workspace/components/WorkspaceCardSectionTitle.tsx diff --git a/.changeset/sour-roses-invite.md b/.changeset/sour-roses-invite.md new file mode 100644 index 000000000000..d560be689142 --- /dev/null +++ b/.changeset/sour-roses-invite.md @@ -0,0 +1,6 @@ +--- +"@rocket.chat/meteor": minor +--- + +Improves the workspace and subscription admin pages by updating font scaling, centralizing elements, +enhancing responsiveness, and refactoring components to provide a better overall user experience. diff --git a/apps/meteor/client/views/admin/subscription/SubscriptionPage.tsx b/apps/meteor/client/views/admin/subscription/SubscriptionPage.tsx index 79a25574116d..7f4635950a5a 100644 --- a/apps/meteor/client/views/admin/subscription/SubscriptionPage.tsx +++ b/apps/meteor/client/views/admin/subscription/SubscriptionPage.tsx @@ -138,16 +138,17 @@ const SubscriptionPage = () => { )} - + {license && } {!license && } - + + {seatsLimit.value !== undefined && ( - + {seatsLimit.max !== Infinity ? ( ) : ( @@ -157,7 +158,7 @@ const SubscriptionPage = () => { )} {macLimit.value !== undefined && ( - + {macLimit.max !== Infinity ? ( ) : ( @@ -169,15 +170,15 @@ const SubscriptionPage = () => { {!license && ( <> {limits?.marketplaceApps !== undefined && ( - + )} - + - + diff --git a/apps/meteor/client/views/admin/subscription/components/FeatureUsageCard.tsx b/apps/meteor/client/views/admin/subscription/components/FeatureUsageCard.tsx index 34a9746b1b53..b7407d9257ab 100644 --- a/apps/meteor/client/views/admin/subscription/components/FeatureUsageCard.tsx +++ b/apps/meteor/client/views/admin/subscription/components/FeatureUsageCard.tsx @@ -1,4 +1,4 @@ -import { Box, Card, CardBody, CardControls, CardTitle } from '@rocket.chat/fuselage'; +import { Card, CardControls, CardTitle } from '@rocket.chat/fuselage'; import type { ReactElement, ReactNode } from 'react'; import React, { memo } from 'react'; @@ -17,16 +17,13 @@ export type CardProps = { const FeatureUsageCard = ({ children, card }: FeatureUsageCardProps): ReactElement => { const { title, infoText, upgradeButton } = card; + return ( {title} {infoText && } - - - {children} - - + {children} {upgradeButton && {upgradeButton}} ); diff --git a/apps/meteor/client/views/admin/subscription/components/FeatureUsageCardBody.tsx b/apps/meteor/client/views/admin/subscription/components/FeatureUsageCardBody.tsx new file mode 100644 index 000000000000..540b486d955d --- /dev/null +++ b/apps/meteor/client/views/admin/subscription/components/FeatureUsageCardBody.tsx @@ -0,0 +1,15 @@ +import { Box, CardBody } from '@rocket.chat/fuselage'; +import type { ReactNode } from 'react'; +import React from 'react'; + +type FeatureUsageCardBodyProps = { justifyContent?: 'flex-start' | 'center'; children: ReactNode }; + +const FeatureUsageCardBody = ({ justifyContent = 'center', children }: FeatureUsageCardBodyProps) => ( + + + {children} + + +); + +export default FeatureUsageCardBody; diff --git a/apps/meteor/client/views/admin/subscription/components/cards/ActiveSessionsCard.tsx b/apps/meteor/client/views/admin/subscription/components/cards/ActiveSessionsCard.tsx index e42ae7f6b744..28de97968394 100644 --- a/apps/meteor/client/views/admin/subscription/components/cards/ActiveSessionsCard.tsx +++ b/apps/meteor/client/views/admin/subscription/components/cards/ActiveSessionsCard.tsx @@ -6,6 +6,7 @@ import { useTranslation } from 'react-i18next'; import { useActiveConnections } from '../../../../hooks/useActiveConnections'; import type { CardProps } from '../FeatureUsageCard'; import FeatureUsageCard from '../FeatureUsageCard'; +import FeatureUsageCardBody from '../FeatureUsageCardBody'; import UpgradeButton from '../UpgradeButton'; const getLimits = ({ max, current }: { max: number; current: number }) => { @@ -35,7 +36,9 @@ const ActiveSessionsCard = (): ReactElement => { if (result.isLoading || result.isError) { return ( - + + + ); } @@ -55,12 +58,14 @@ const ActiveSessionsCard = (): ReactElement => { }), }} > - - - {used} / {total} + + + + {used} / {total} + + {available} {t('ActiveSessions_available')} - {available} {t('ActiveSessions_available')} - + ); }; diff --git a/apps/meteor/client/views/admin/subscription/components/cards/ActiveSessionsPeakCard.tsx b/apps/meteor/client/views/admin/subscription/components/cards/ActiveSessionsPeakCard.tsx index 02ac3eeeb536..af443f1e659f 100644 --- a/apps/meteor/client/views/admin/subscription/components/cards/ActiveSessionsPeakCard.tsx +++ b/apps/meteor/client/views/admin/subscription/components/cards/ActiveSessionsPeakCard.tsx @@ -7,6 +7,7 @@ import { useFormatDate } from '../../../../../hooks/useFormatDate'; import { useStatistics } from '../../../../hooks/useStatistics'; import type { CardProps } from '../FeatureUsageCard'; import FeatureUsageCard from '../FeatureUsageCard'; +import FeatureUsageCardBody from '../FeatureUsageCardBody'; import UpgradeButton from '../UpgradeButton'; const ActiveSessionsPeakCard = (): ReactElement => { @@ -36,14 +37,16 @@ const ActiveSessionsPeakCard = (): ReactElement => { if (isLoading || maxMonthlyPeakConnections === undefined) { return ( - + + + ); } return ( - + {used} / {total} diff --git a/apps/meteor/client/views/admin/subscription/components/cards/AppsUsageCard/AppsUsageCard.tsx b/apps/meteor/client/views/admin/subscription/components/cards/AppsUsageCard/AppsUsageCard.tsx index a87ef914aba0..4fc31cb260c5 100644 --- a/apps/meteor/client/views/admin/subscription/components/cards/AppsUsageCard/AppsUsageCard.tsx +++ b/apps/meteor/client/views/admin/subscription/components/cards/AppsUsageCard/AppsUsageCard.tsx @@ -8,6 +8,7 @@ import AppsUsageCardSection from './AppsUsageCardSection'; import { PRICING_LINK } from '../../../utils/links'; import type { CardProps } from '../../FeatureUsageCard'; import FeatureUsageCard from '../../FeatureUsageCard'; +import FeatureUsageCardBody from '../../FeatureUsageCardBody'; import UpgradeButton from '../../UpgradeButton'; // Magic numbers @@ -27,7 +28,9 @@ const AppsUsageCard = ({ privateAppsLimit, marketplaceAppsLimit }: AppsUsageCard // FIXME: not accessible enough return ( - + + + ); } @@ -61,20 +64,22 @@ const AppsUsageCard = ({ privateAppsLimit, marketplaceAppsLimit }: AppsUsageCard return ( - + + - + + ); }; diff --git a/apps/meteor/client/views/admin/subscription/components/cards/AppsUsageCard/AppsUsageCardSection.tsx b/apps/meteor/client/views/admin/subscription/components/cards/AppsUsageCard/AppsUsageCardSection.tsx index ac17957eda01..843e782cdafd 100644 --- a/apps/meteor/client/views/admin/subscription/components/cards/AppsUsageCard/AppsUsageCardSection.tsx +++ b/apps/meteor/client/views/admin/subscription/components/cards/AppsUsageCard/AppsUsageCardSection.tsx @@ -17,7 +17,7 @@ const AppsUsageCardSection = ({ title, tip, appsCount, appsMaxCount, warningThre const labelId = useUniqueId(); return ( - +
{title}
diff --git a/apps/meteor/client/views/admin/subscription/components/cards/CountMACCard.tsx b/apps/meteor/client/views/admin/subscription/components/cards/CountMACCard.tsx index 862504692d1f..fc6a69c1df66 100644 --- a/apps/meteor/client/views/admin/subscription/components/cards/CountMACCard.tsx +++ b/apps/meteor/client/views/admin/subscription/components/cards/CountMACCard.tsx @@ -4,6 +4,7 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import FeatureUsageCard from '../FeatureUsageCard'; +import FeatureUsageCardBody from '../FeatureUsageCardBody'; const CountMACCard = ({ macsCount }: { macsCount: number }): ReactElement => { const { t } = useTranslation(); @@ -15,10 +16,12 @@ const CountMACCard = ({ macsCount }: { macsCount: number }): ReactElement => { infoText: t('CountMAC_InfoText'), }} > - - - {macsCount} - + + + + {macsCount} + +
); }; diff --git a/apps/meteor/client/views/admin/subscription/components/cards/CountSeatsCard.tsx b/apps/meteor/client/views/admin/subscription/components/cards/CountSeatsCard.tsx index a730c4cdf9fb..4280146232a4 100644 --- a/apps/meteor/client/views/admin/subscription/components/cards/CountSeatsCard.tsx +++ b/apps/meteor/client/views/admin/subscription/components/cards/CountSeatsCard.tsx @@ -4,6 +4,7 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import FeatureUsageCard from '../FeatureUsageCard'; +import FeatureUsageCardBody from '../FeatureUsageCardBody'; const CountSeatsCard = ({ activeUsers }: { activeUsers: number }): ReactElement => { const { t } = useTranslation(); @@ -15,10 +16,12 @@ const CountSeatsCard = ({ activeUsers }: { activeUsers: number }): ReactElement infoText: t('CountSeats_InfoText'), }} > - - - {activeUsers} - + + + + {activeUsers} + + ); }; diff --git a/apps/meteor/client/views/admin/subscription/components/cards/MACCard.tsx b/apps/meteor/client/views/admin/subscription/components/cards/MACCard.tsx index f60292df064b..af4cf73f63d6 100644 --- a/apps/meteor/client/views/admin/subscription/components/cards/MACCard.tsx +++ b/apps/meteor/client/views/admin/subscription/components/cards/MACCard.tsx @@ -5,6 +5,7 @@ import { useTranslation } from 'react-i18next'; import type { CardProps } from '../FeatureUsageCard'; import FeatureUsageCard from '../FeatureUsageCard'; +import FeatureUsageCardBody from '../FeatureUsageCardBody'; import UpgradeButton from '../UpgradeButton'; import UsagePieGraph from '../UsagePieGraph'; @@ -57,7 +58,9 @@ const MACCard = ({ return ( - + + + ); }; diff --git a/apps/meteor/client/views/admin/subscription/components/cards/PlanCard/PlanCardCommunity.tsx b/apps/meteor/client/views/admin/subscription/components/cards/PlanCard/PlanCardCommunity.tsx index 3ce0ee07cabd..f55da3ad06fc 100644 --- a/apps/meteor/client/views/admin/subscription/components/cards/PlanCard/PlanCardCommunity.tsx +++ b/apps/meteor/client/views/admin/subscription/components/cards/PlanCard/PlanCardCommunity.tsx @@ -1,4 +1,4 @@ -import { Card, CardBody, CardRow, Icon } from '@rocket.chat/fuselage'; +import { Box, Card, CardBody, Icon } from '@rocket.chat/fuselage'; import type { ReactElement } from 'react'; import React from 'react'; import { useTranslation } from 'react-i18next'; @@ -12,12 +12,12 @@ const PlanCardCommunity = (): ReactElement => { - + {t('free_per_month_user')} - - +
+ {t('Self_managed_hosting')} - + ); diff --git a/apps/meteor/client/views/admin/subscription/components/cards/SeatsCard.tsx b/apps/meteor/client/views/admin/subscription/components/cards/SeatsCard.tsx index a90f2d1171d0..1806437cff2f 100644 --- a/apps/meteor/client/views/admin/subscription/components/cards/SeatsCard.tsx +++ b/apps/meteor/client/views/admin/subscription/components/cards/SeatsCard.tsx @@ -5,6 +5,7 @@ import { useTranslation } from 'react-i18next'; import type { CardProps } from '../FeatureUsageCard'; import FeatureUsageCard from '../FeatureUsageCard'; +import FeatureUsageCardBody from '../FeatureUsageCardBody'; import UpgradeButton from '../UpgradeButton'; import UsagePieGraph from '../UsagePieGraph'; @@ -43,7 +44,9 @@ const SeatsCard = ({ value, max, hideManageSubscription }: SeatsCardProps): Reac const message = seatsLeft > 0 ? t('Seats_Available', { seatsLeft }) : undefined; return ( - + + + ); }; diff --git a/apps/meteor/client/views/admin/workspace/DeploymentCard/DeploymentCard.tsx b/apps/meteor/client/views/admin/workspace/DeploymentCard/DeploymentCard.tsx index 5cf225771745..0ff7e96e8002 100644 --- a/apps/meteor/client/views/admin/workspace/DeploymentCard/DeploymentCard.tsx +++ b/apps/meteor/client/views/admin/workspace/DeploymentCard/DeploymentCard.tsx @@ -1,5 +1,5 @@ import type { IWorkspaceInfo, IStats } from '@rocket.chat/core-typings'; -import { Button, Card, CardControls } from '@rocket.chat/fuselage'; +import { Button, Card, CardBody, CardControls, Margins } from '@rocket.chat/fuselage'; import { useMutableCallback } from '@rocket.chat/fuselage-hooks'; import type { IInstance } from '@rocket.chat/rest-typings'; import { useSetModal } from '@rocket.chat/ui-contexts'; @@ -10,6 +10,7 @@ import { useTranslation } from 'react-i18next'; import { useFormatDateAndTime } from '../../../../hooks/useFormatDateAndTime'; import WorkspaceCardSection from '../components/WorkspaceCardSection'; import InstancesModal from './components/InstancesModal'; +import WorkspaceCardSectionTitle from '../components/WorkspaceCardSectionTitle'; type DeploymentCardProps = { serverInfo: IWorkspaceInfo; @@ -30,35 +31,59 @@ const DeploymentCard = ({ serverInfo: { info, cloudWorkspaceId }, statistics, in return ( - - - + + + + + + + + {statistics.version} + + + + {statistics.uniqueId} + - {cloudWorkspaceId && } + {cloudWorkspaceId && ( + + + {cloudWorkspaceId} + + )} - {appsEngineVersion && } - - - - + {appsEngineVersion && ( + + + {appsEngineVersion} + + )} + + + {statistics.process.nodeVersion} + + + + {`${statistics.migration.version} (${formatDateAndTime(statistics.migration.lockedAt)})`} + + + + {`${statistics.mongoVersion} / ${statistics.mongoStorageEngine} ${ + !statistics.msEnabled ? `(oplog ${statistics.oplogEnabled ? t('Enabled') : t('Disabled')})` : '' + }`} + + + {t('github_HEAD')}: ({commit.hash ? commit.hash.slice(0, 9) : ''})
{t('Branch')}: {commit.branch}
{commit.subject} - - } - /> - + + + + {statistics.process.pid} + +
+
{!!instances.length && ( diff --git a/apps/meteor/client/views/admin/workspace/MessagesRoomsCard/MessagesRoomsCard.tsx b/apps/meteor/client/views/admin/workspace/MessagesRoomsCard/MessagesRoomsCard.tsx index b608df3ed5c5..0939a3774c22 100644 --- a/apps/meteor/client/views/admin/workspace/MessagesRoomsCard/MessagesRoomsCard.tsx +++ b/apps/meteor/client/views/admin/workspace/MessagesRoomsCard/MessagesRoomsCard.tsx @@ -5,6 +5,7 @@ import React, { memo } from 'react'; import { useTranslation } from 'react-i18next'; import WorkspaceCardSection from '../components/WorkspaceCardSection'; +import WorkspaceCardSectionTitle from '../components/WorkspaceCardSectionTitle'; import WorkspaceCardTextSeparator from '../components/WorkspaceCardTextSeparator'; type MessagesRoomsCardProps = { @@ -16,45 +17,34 @@ const MessagesRoomsCard = ({ statistics }: MessagesRoomsCardProps): ReactElement return ( - - - - - - - - - } - /> + + - - - - - - - - - } - /> + + + + + + + + + + + + + + + + + ); }; diff --git a/apps/meteor/client/views/admin/workspace/UsersUploadsCard/UsersUploadsCard.tsx b/apps/meteor/client/views/admin/workspace/UsersUploadsCard/UsersUploadsCard.tsx index bbf3a27d47b6..2a4290fa3ace 100644 --- a/apps/meteor/client/views/admin/workspace/UsersUploadsCard/UsersUploadsCard.tsx +++ b/apps/meteor/client/views/admin/workspace/UsersUploadsCard/UsersUploadsCard.tsx @@ -1,5 +1,5 @@ import type { IStats } from '@rocket.chat/core-typings'; -import { Button, Card, CardBody, CardControls } from '@rocket.chat/fuselage'; +import { Button, Card, CardBody, CardControls, Margins } from '@rocket.chat/fuselage'; import { useMutableCallback } from '@rocket.chat/fuselage-hooks'; import { useRouter } from '@rocket.chat/ui-contexts'; import type { ReactElement } from 'react'; @@ -9,6 +9,7 @@ import { useTranslation } from 'react-i18next'; import { useFormatMemorySize } from '../../../../hooks/useFormatMemorySize'; import { useHasLicenseModule } from '../../../../hooks/useHasLicenseModule'; import WorkspaceCardSection from '../components/WorkspaceCardSection'; +import WorkspaceCardSectionTitle from '../components/WorkspaceCardSectionTitle'; import WorkspaceCardTextSeparator from '../components/WorkspaceCardTextSeparator'; type UsersUploadsCardProps = { @@ -30,41 +31,33 @@ const UsersUploadsCard = ({ statistics }: UsersUploadsCardProps): ReactElement = return ( - - - - - - - - } - /> + + + - - - - - - - - } - /> + + + + + + + + - - - - - } - /> + + + + + + + + + + + + + + diff --git a/apps/meteor/client/views/admin/workspace/VersionCard/VersionCard.tsx b/apps/meteor/client/views/admin/workspace/VersionCard/VersionCard.tsx index 93c05ab2e9a0..f37033cb172d 100644 --- a/apps/meteor/client/views/admin/workspace/VersionCard/VersionCard.tsx +++ b/apps/meteor/client/views/admin/workspace/VersionCard/VersionCard.tsx @@ -1,6 +1,6 @@ import type { IWorkspaceInfo } from '@rocket.chat/core-typings'; import { Box, Card, CardBody, CardCol, CardControls, CardHeader, CardTitle, Icon } from '@rocket.chat/fuselage'; -import { useMediaQuery } from '@rocket.chat/fuselage-hooks'; +import { useBreakpoints } from '@rocket.chat/fuselage-hooks'; import type { SupportedVersions } from '@rocket.chat/server-cloud-communication'; import { ExternalLink } from '@rocket.chat/ui-client'; import type { LocationPathname } from '@rocket.chat/ui-contexts'; @@ -29,14 +29,15 @@ type VersionCardProps = { }; const VersionCard = ({ serverInfo }: VersionCardProps): ReactElement => { - const mediaQuery = useMediaQuery('(min-width: 1024px)'); + const breakpoints = useBreakpoints(); + const isExtraLargeOrBigger = breakpoints.includes('xl'); const getUrl = useMediaUrl(); const cardBackground = { backgroundImage: `url(${getUrl('images/globe.png')})`, backgroundRepeat: 'no-repeat', - backgroundPosition: 'right 20px center', - backgroundSize: mediaQuery ? 'auto' : 'contain', + backgroundPosition: isExtraLargeOrBigger ? 'right 20px center' : 'left 450px center', + backgroundSize: 'auto', }; const setModal = useSetModal(); diff --git a/apps/meteor/client/views/admin/workspace/components/WorkspaceCardSection.tsx b/apps/meteor/client/views/admin/workspace/components/WorkspaceCardSection.tsx index f120daaf0886..612c75a2d4df 100644 --- a/apps/meteor/client/views/admin/workspace/components/WorkspaceCardSection.tsx +++ b/apps/meteor/client/views/admin/workspace/components/WorkspaceCardSection.tsx @@ -3,17 +3,9 @@ import type { ReactNode } from 'react'; import React from 'react'; type WorkspaceCardSectionProps = { - title: string; - body?: ReactNode; + children: ReactNode; }; -const WorkspaceCardSection = ({ title, body }: WorkspaceCardSectionProps) => { - return ( - - {title} - {body && body} - - ); -}; +const WorkspaceCardSection = ({ children }: WorkspaceCardSectionProps) => {children}; export default WorkspaceCardSection; diff --git a/apps/meteor/client/views/admin/workspace/components/WorkspaceCardSectionTitle.tsx b/apps/meteor/client/views/admin/workspace/components/WorkspaceCardSectionTitle.tsx new file mode 100644 index 000000000000..218016c2be75 --- /dev/null +++ b/apps/meteor/client/views/admin/workspace/components/WorkspaceCardSectionTitle.tsx @@ -0,0 +1,15 @@ +import { Box } from '@rocket.chat/fuselage'; +import React from 'react'; + +type WorkspaceCardSectionTitleProps = { + variant?: 'p2b' | 'h4'; + title: string; +}; + +const WorkspaceCardSectionTitle = ({ variant = 'p2b', title }: WorkspaceCardSectionTitleProps) => ( + + {title} + +); + +export default WorkspaceCardSectionTitle; From ff04c19f2de6531af06f0e8c5dbe3e76c3e72aba Mon Sep 17 00:00:00 2001 From: Douglas Fabris Date: Fri, 20 Dec 2024 17:40:51 -0300 Subject: [PATCH 27/28] feat: Disable OTR messages selection when exporting messages (#34220) Co-authored-by: gabriellsh <40830821+gabriellsh@users.noreply.github.com> --- .changeset/pretty-islands-wink.md | 5 ++ .../message/variants/RoomMessage.tsx | 8 ++-- .../message/variants/ThreadMessagePreview.tsx | 10 +++- .../contexts/SelectedMessagesContext.tsx | 6 +-- .../ExportMessages/ExportMessages.tsx | 7 +++ apps/meteor/tests/e2e/otr.spec.ts | 46 +++++++++++++++++++ .../page-objects/fragments/home-content.ts | 4 ++ .../fragments/home-flextab-otr.ts | 21 +++++++++ .../page-objects/fragments/home-flextab.ts | 4 ++ packages/i18n/src/locales/en.i18n.json | 1 + 10 files changed, 104 insertions(+), 8 deletions(-) create mode 100644 .changeset/pretty-islands-wink.md create mode 100644 apps/meteor/tests/e2e/otr.spec.ts create mode 100644 apps/meteor/tests/e2e/page-objects/fragments/home-flextab-otr.ts diff --git a/.changeset/pretty-islands-wink.md b/.changeset/pretty-islands-wink.md new file mode 100644 index 000000000000..e9de264504b0 --- /dev/null +++ b/.changeset/pretty-islands-wink.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': minor +--- + +Disables OTR messages selection when exporting messages diff --git a/apps/meteor/client/components/message/variants/RoomMessage.tsx b/apps/meteor/client/components/message/variants/RoomMessage.tsx index 90bc2236e837..54d3dcdea539 100644 --- a/apps/meteor/client/components/message/variants/RoomMessage.tsx +++ b/apps/meteor/client/components/message/variants/RoomMessage.tsx @@ -55,8 +55,10 @@ const RoomMessage = ({ const { openUserCard, triggerProps } = useUserCard(); const selecting = useIsSelecting(); + const isOTRMessage = message.t === 'otr' || message.t === 'otr-ack'; + const toggleSelected = useToggleSelect(message._id); - const selected = useIsSelectedMessage(message._id); + const selected = useIsSelectedMessage(message._id, isOTRMessage); useCountSelected(); @@ -70,7 +72,7 @@ const RoomMessage = ({ aria-roledescription={t('message')} tabIndex={0} aria-labelledby={`${message._id}-displayName ${message._id}-time ${message._id}-content ${message._id}-read-status`} - onClick={selecting ? toggleSelected : undefined} + onClick={selecting && !isOTRMessage ? toggleSelected : undefined} isSelected={selected} isEditing={editing} isPending={message.temp} @@ -99,7 +101,7 @@ const RoomMessage = ({ {...triggerProps} /> )} - {selecting && } + {selecting && } {sequential && } diff --git a/apps/meteor/client/components/message/variants/ThreadMessagePreview.tsx b/apps/meteor/client/components/message/variants/ThreadMessagePreview.tsx index f7fa072a7406..146bda990d52 100644 --- a/apps/meteor/client/components/message/variants/ThreadMessagePreview.tsx +++ b/apps/meteor/client/components/message/variants/ThreadMessagePreview.tsx @@ -45,8 +45,10 @@ const ThreadMessagePreview = ({ message, showUserAvatar, sequential, ...props }: const { t } = useTranslation(); const isSelecting = useIsSelecting(); + const isOTRMessage = message.t === 'otr' || message.t === 'otr-ack'; + const toggleSelected = useToggleSelect(message._id); - const isSelected = useIsSelectedMessage(message._id); + const isSelected = useIsSelectedMessage(message._id, isOTRMessage); useCountSelected(); const messageType = parentMessage.isSuccess ? MessageTypes.getType(parentMessage.data) : null; @@ -65,6 +67,10 @@ const ThreadMessagePreview = ({ message, showUserAvatar, sequential, ...props }: return goToThread({ rid: message.rid, tmid: message.tmid, msg: message._id }); } + if (isOTRMessage) { + return; + } + return toggleSelected(); }; @@ -117,7 +123,7 @@ const ThreadMessagePreview = ({ message, showUserAvatar, sequential, ...props }: size='x18' /> )} - {isSelecting && } + {isSelecting && } diff --git a/apps/meteor/client/views/room/MessageList/contexts/SelectedMessagesContext.tsx b/apps/meteor/client/views/room/MessageList/contexts/SelectedMessagesContext.tsx index 800f7155082e..527ea332cc14 100644 --- a/apps/meteor/client/views/room/MessageList/contexts/SelectedMessagesContext.tsx +++ b/apps/meteor/client/views/room/MessageList/contexts/SelectedMessagesContext.tsx @@ -11,7 +11,7 @@ export const SelectedMessageContext = createContext({ selectedMessageStore, } as SelectMessageContextValue); -export const useIsSelectedMessage = (mid: string): boolean => { +export const useIsSelectedMessage = (mid: string, omit?: boolean): boolean => { const { selectedMessageStore } = useContext(SelectedMessageContext); const subscribe = useCallback( @@ -24,14 +24,14 @@ export const useIsSelectedMessage = (mid: string): boolean => { const isSelected = useSyncExternalStore(subscribe, getSnapshot); useEffect(() => { - if (isSelected) { + if (isSelected || omit) { return; } selectedMessageStore.addAvailableMessage(mid); return () => selectedMessageStore.removeAvailableMessage(mid); - }, [mid, selectedMessageStore, isSelected]); + }, [mid, selectedMessageStore, isSelected, omit]); return isSelected; }; diff --git a/apps/meteor/client/views/room/contextualBar/ExportMessages/ExportMessages.tsx b/apps/meteor/client/views/room/contextualBar/ExportMessages/ExportMessages.tsx index 8736c8a1bec3..c05faece42e1 100644 --- a/apps/meteor/client/views/room/contextualBar/ExportMessages/ExportMessages.tsx +++ b/apps/meteor/client/views/room/contextualBar/ExportMessages/ExportMessages.tsx @@ -176,6 +176,13 @@ const ExportMessages = () => {
+ {room.createdOTR && ( + + + {t('OTR_messages_cannot_be_exported')} + + + )} {t('Method')} diff --git a/apps/meteor/tests/e2e/otr.spec.ts b/apps/meteor/tests/e2e/otr.spec.ts new file mode 100644 index 000000000000..b6ff4789e0c2 --- /dev/null +++ b/apps/meteor/tests/e2e/otr.spec.ts @@ -0,0 +1,46 @@ +import { Users } from './fixtures/userStates'; +import { HomeChannel } from './page-objects'; +import { createDirectMessage } from './utils'; +import { test, expect } from './utils/test'; + +test.use({ storageState: Users.admin.state }); + +test.describe.serial('OTR', () => { + let poHomeChannel: HomeChannel; + + test.beforeEach(async ({ page, api }) => { + await createDirectMessage(api); + poHomeChannel = new HomeChannel(page); + + await page.goto('/home'); + }); + + test('should not allow export OTR messages', async ({ browser }) => { + const user1Page = await browser.newPage({ storageState: Users.user1.state }); + const user1Channel = new HomeChannel(user1Page); + + await test.step('log in user1', async () => { + await user1Page.goto(`/direct/${Users.admin.data.username}`); + await user1Channel.content.waitForChannel(); + }); + + await test.step('invite OTR with user1', async () => { + await poHomeChannel.sidenav.openChat(Users.user1.data.username); + await poHomeChannel.tabs.kebab.click({ force: true }); + await poHomeChannel.tabs.btnEnableOTR.click({ force: true }); + await poHomeChannel.tabs.otr.btnStartOTR.click(); + }); + + await test.step('accept handshake with user1', async () => { + await user1Channel.tabs.otr.btnAcceptOTR.click(); + }); + + await poHomeChannel.content.sendMessage('hello OTR'); + await poHomeChannel.tabs.kebab.click({ force: true }); + await poHomeChannel.tabs.btnExportMessages.click(); + await poHomeChannel.content.getMessageByText('hello OTR').click(); + await expect(poHomeChannel.content.btnClearSelection).toBeDisabled(); + + await user1Page.close(); + }); +}); diff --git a/apps/meteor/tests/e2e/page-objects/fragments/home-content.ts b/apps/meteor/tests/e2e/page-objects/fragments/home-content.ts index 088d8dd3d647..2a66a899f3ce 100644 --- a/apps/meteor/tests/e2e/page-objects/fragments/home-content.ts +++ b/apps/meteor/tests/e2e/page-objects/fragments/home-content.ts @@ -417,4 +417,8 @@ export class HomeContent { await this.page.getByRole('dialog').getByRole('textbox', { name: 'Message' }).fill(text); await this.page.getByRole('dialog').getByRole('button', { name: 'Send', exact: true }).click(); } + + get btnClearSelection() { + return this.page.getByRole('button', { name: 'Clear selection' }); + } } diff --git a/apps/meteor/tests/e2e/page-objects/fragments/home-flextab-otr.ts b/apps/meteor/tests/e2e/page-objects/fragments/home-flextab-otr.ts new file mode 100644 index 000000000000..1a310f76f2f4 --- /dev/null +++ b/apps/meteor/tests/e2e/page-objects/fragments/home-flextab-otr.ts @@ -0,0 +1,21 @@ +import type { Locator, Page } from '@playwright/test'; + +export class HomeFlextabOtr { + private readonly page: Page; + + constructor(page: Page) { + this.page = page; + } + + get otrDialog(): Locator { + return this.page.getByRole('dialog', { name: 'OTR' }); + } + + get btnStartOTR(): Locator { + return this.otrDialog.getByRole('button', { name: 'Start OTR' }); + } + + get btnAcceptOTR(): Locator { + return this.page.getByRole('dialog').getByRole('button', { name: 'Yes' }); + } +} diff --git a/apps/meteor/tests/e2e/page-objects/fragments/home-flextab.ts b/apps/meteor/tests/e2e/page-objects/fragments/home-flextab.ts index a19cf72d5172..52dc165e9a43 100644 --- a/apps/meteor/tests/e2e/page-objects/fragments/home-flextab.ts +++ b/apps/meteor/tests/e2e/page-objects/fragments/home-flextab.ts @@ -4,6 +4,7 @@ import { HomeFlextabChannels } from './home-flextab-channels'; import { HomeFlextabExportMessages } from './home-flextab-exportMessages'; import { HomeFlextabMembers } from './home-flextab-members'; import { HomeFlextabNotificationPreferences } from './home-flextab-notificationPreferences'; +import { HomeFlextabOtr } from './home-flextab-otr'; import { HomeFlextabRoom } from './home-flextab-room'; export class HomeFlextab { @@ -17,6 +18,8 @@ export class HomeFlextab { readonly notificationPreferences: HomeFlextabNotificationPreferences; + readonly otr: HomeFlextabOtr; + readonly exportMessages: HomeFlextabExportMessages; constructor(page: Page) { @@ -25,6 +28,7 @@ export class HomeFlextab { this.room = new HomeFlextabRoom(page); this.channels = new HomeFlextabChannels(page); this.notificationPreferences = new HomeFlextabNotificationPreferences(page); + this.otr = new HomeFlextabOtr(page); this.exportMessages = new HomeFlextabExportMessages(page); } diff --git a/packages/i18n/src/locales/en.i18n.json b/packages/i18n/src/locales/en.i18n.json index e9c452eaa45c..2b955fc6c327 100644 --- a/packages/i18n/src/locales/en.i18n.json +++ b/packages/i18n/src/locales/en.i18n.json @@ -4231,6 +4231,7 @@ "others": "others", "Others": "Others", "OTR": "OTR", + "OTR_messages_cannot_be_exported": "OTR messages cannot be exported", "OTR_unavailable_for_federation": "OTR is unavailable for federated rooms", "OTR_Description": "Off-the-record chats are secure, private and disappear once ended.", "OTR_Chat_Declined_Title": "OTR Chat invite Declined", From c84543fb04623457febb74d93f45c2bf4d16ef6c Mon Sep 17 00:00:00 2001 From: Gustavo Reis Bauer Date: Fri, 20 Dec 2024 18:16:50 -0300 Subject: [PATCH 28/28] fix: Deletion of 1st message in a thread causes notification to be up without showing why. (#34165) --- .changeset/ninety-bulldogs-dream.md | 5 ++ .../app/lib/server/functions/deleteMessage.ts | 32 ++++++++++-- apps/meteor/server/models/raw/Messages.ts | 4 +- apps/meteor/tests/data/chat.helper.ts | 11 +++- apps/meteor/tests/data/rooms.helper.ts | 37 ++++++++++++- apps/meteor/tests/end-to-end/api/chat.ts | 52 +++++++++++++++++-- .../src/models/IMessagesModel.ts | 2 +- 7 files changed, 129 insertions(+), 14 deletions(-) create mode 100644 .changeset/ninety-bulldogs-dream.md diff --git a/.changeset/ninety-bulldogs-dream.md b/.changeset/ninety-bulldogs-dream.md new file mode 100644 index 000000000000..1fe15fb79350 --- /dev/null +++ b/.changeset/ninety-bulldogs-dream.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/meteor": patch +--- + +Fixes an issue where removing the only message of a thread would keep the unread thread messages badge diff --git a/apps/meteor/app/lib/server/functions/deleteMessage.ts b/apps/meteor/app/lib/server/functions/deleteMessage.ts index a91e77858043..30044dadb81c 100644 --- a/apps/meteor/app/lib/server/functions/deleteMessage.ts +++ b/apps/meteor/app/lib/server/functions/deleteMessage.ts @@ -1,14 +1,14 @@ import { AppEvents, Apps } from '@rocket.chat/apps'; import { api, Message } from '@rocket.chat/core-services'; -import type { AtLeast, IMessage, IUser } from '@rocket.chat/core-typings'; -import { Messages, Rooms, Uploads, Users, ReadReceipts } from '@rocket.chat/models'; +import { isThreadMessage, type AtLeast, type IMessage, type IRoom, type IThreadMessage, type IUser } from '@rocket.chat/core-typings'; +import { Messages, Rooms, Uploads, Users, ReadReceipts, Subscriptions } from '@rocket.chat/models'; import { Meteor } from 'meteor/meteor'; import { callbacks } from '../../../../lib/callbacks'; import { canDeleteMessageAsync } from '../../../authorization/server/functions/canDeleteMessage'; import { FileUpload } from '../../../file-upload/server'; import { settings } from '../../../settings/server'; -import { notifyOnRoomChangedById, notifyOnMessageChange } from '../lib/notifyListener'; +import { notifyOnRoomChangedById, notifyOnMessageChange, notifyOnSubscriptionChangedByRoomIdAndUserIds } from '../lib/notifyListener'; export const deleteMessageValidatingPermission = async (message: AtLeast, userId: IUser['_id']): Promise => { if (!message?._id) { @@ -50,8 +50,8 @@ export async function deleteMessage(message: IMessage, user: IUser): Promise { + const { value: updatedParentMessage } = await Messages.decreaseReplyCountById(message.tmid, -1); + + if (room) { + const { modifiedCount } = await Subscriptions.removeUnreadThreadsByRoomId(room._id, [message.tmid]); + if (modifiedCount > 0) { + // The replies array contains the ids of all the users that are following the thread (everyone that is involved + the ones who are following) + // Technically, user._id is already in the message.replies array, but since we don't have any strong + // guarantees of it, we are adding again to make sure it is there. + const userIdsThatAreWatchingTheThread = [...new Set([user._id, ...(message.replies || [])])]; + // So they can decrement the unread threads count + void notifyOnSubscriptionChangedByRoomIdAndUserIds(room._id, userIdsThatAreWatchingTheThread); + } + } + + if (updatedParentMessage && updatedParentMessage.tcount === 0) { + void notifyOnMessageChange({ + id: message.tmid, + }); + } +} diff --git a/apps/meteor/server/models/raw/Messages.ts b/apps/meteor/server/models/raw/Messages.ts index e84abc3ed481..bec0afaafe43 100644 --- a/apps/meteor/server/models/raw/Messages.ts +++ b/apps/meteor/server/models/raw/Messages.ts @@ -1779,13 +1779,13 @@ export class MessagesRaw extends BaseRaw implements IMessagesModel { return this.col.countDocuments(query); } - decreaseReplyCountById(_id: string, inc = -1): Promise { + decreaseReplyCountById(_id: string, inc = -1): Promise> { const query = { _id }; const update: UpdateFilter = { $inc: { tcount: inc, }, }; - return this.updateOne(query, update); + return this.findOneAndUpdate(query, update, { returnDocument: 'after' }); } } diff --git a/apps/meteor/tests/data/chat.helper.ts b/apps/meteor/tests/data/chat.helper.ts index 5df283831203..2d0588a7f158 100644 --- a/apps/meteor/tests/data/chat.helper.ts +++ b/apps/meteor/tests/data/chat.helper.ts @@ -7,10 +7,12 @@ export const sendSimpleMessage = ({ roomId, text = 'test message', tmid, + userCredentials = credentials, }: { roomId: IRoom['_id']; text?: string; tmid?: IMessage['_id']; + userCredentials?: Credentials; }) => { if (!roomId) { throw new Error('"roomId" is required in "sendSimpleMessage" test helper'); @@ -28,7 +30,7 @@ export const sendSimpleMessage = ({ message.tmid = tmid; } - return request.post(api('chat.sendMessage')).set(credentials).send({ message }); + return request.post(api('chat.sendMessage')).set(userCredentials).send({ message }); }; export const sendMessage = ({ @@ -87,3 +89,10 @@ export const getMessageById = ({ msgId }: { msgId: IMessage['_id'] }) => { }); }); }; + +export const followMessage = ({ msgId, requestCredentials }: { msgId: IMessage['_id']; requestCredentials?: Credentials }) => { + return request + .post(api('chat.followMessage')) + .set(requestCredentials ?? credentials) + .send({ mid: msgId }); +}; diff --git a/apps/meteor/tests/data/rooms.helper.ts b/apps/meteor/tests/data/rooms.helper.ts index 410e6e7ca48c..29059cf2f42b 100644 --- a/apps/meteor/tests/data/rooms.helper.ts +++ b/apps/meteor/tests/data/rooms.helper.ts @@ -1,7 +1,7 @@ import type { Credentials } from '@rocket.chat/api-client'; -import type { IRoom } from '@rocket.chat/core-typings'; +import type { IRoom, ISubscription } from '@rocket.chat/core-typings'; -import { api, credentials, request } from './api-data'; +import { api, credentials, methodCall, request } from './api-data'; type CreateRoomParams = { name?: IRoom['name']; @@ -108,3 +108,36 @@ export function actionRoom({ action, type, roomId, overrideCredentials = credent export const deleteRoom = ({ type, roomId }: { type: ActionRoomParams['type']; roomId: IRoom['_id'] }) => actionRoom({ action: 'delete', type, roomId, overrideCredentials: credentials }); + +export const getSubscriptionByRoomId = (roomId: IRoom['_id'], userCredentials = credentials): Promise => + new Promise((resolve) => { + void request + .get(api('subscriptions.getOne')) + .set(userCredentials) + .query({ roomId }) + .end((_err, res) => { + resolve(res.body.subscription); + }); + }); + +export const addUserToRoom = ({ + usernames, + rid, + userCredentials, +}: { + usernames: string[]; + rid: IRoom['_id']; + userCredentials?: Credentials; +}) => { + return request + .post(methodCall('addUsersToRoom')) + .set(userCredentials ?? credentials) + .send({ + message: JSON.stringify({ + method: 'addUsersToRoom', + params: [{ rid, users: usernames }], + id: 'id', + msg: 'method', + }), + }); +}; diff --git a/apps/meteor/tests/end-to-end/api/chat.ts b/apps/meteor/tests/end-to-end/api/chat.ts index 2e23e2613779..43df270bbec1 100644 --- a/apps/meteor/tests/end-to-end/api/chat.ts +++ b/apps/meteor/tests/end-to-end/api/chat.ts @@ -1,15 +1,15 @@ import type { Credentials } from '@rocket.chat/api-client'; -import type { IMessage, IRoom, IThreadMessage, IUser } from '@rocket.chat/core-typings'; +import type { IMessage, IRoom, ISubscription, IThreadMessage, IUser } from '@rocket.chat/core-typings'; import { Random } from '@rocket.chat/random'; import { expect } from 'chai'; import { after, before, beforeEach, describe, it } from 'mocha'; import type { Response } from 'supertest'; import { getCredentials, api, request, credentials } from '../../data/api-data'; -import { sendSimpleMessage, deleteMessage } from '../../data/chat.helper'; +import { followMessage, sendSimpleMessage, deleteMessage } from '../../data/chat.helper'; import { imgURL } from '../../data/interactions'; import { updatePermission, updateSetting } from '../../data/permissions.helper'; -import { createRoom, deleteRoom } from '../../data/rooms.helper'; +import { addUserToRoom, createRoom, deleteRoom, getSubscriptionByRoomId } from '../../data/rooms.helper'; import { password } from '../../data/user'; import type { TestUser } from '../../data/users.helper'; import { createUser, deleteUser, login } from '../../data/users.helper'; @@ -2005,6 +2005,52 @@ describe('[Chat]', () => { }) .end(done); }); + + describe('when deleting a thread message', () => { + let otherUser: TestUser; + let otherUserCredentials: Credentials; + let parentThreadId: IMessage['_id']; + + before(async () => { + const username = `user${+new Date()}`; + otherUser = await createUser({ username }); + otherUserCredentials = await login(otherUser.username, password); + parentThreadId = (await sendSimpleMessage({ roomId: testChannel._id })).body.message._id; + await addUserToRoom({ rid: testChannel._id, usernames: [otherUser.username] }); + }); + + after(() => Promise.all([deleteUser(otherUser), deleteMessage({ msgId: parentThreadId, roomId: testChannel._id })])); + + const expectNoUnreadThreadMessages = (s: ISubscription) => { + expect(s).to.have.property('tunread'); + expect(s.tunread).to.be.an('array'); + expect(s.tunread).to.deep.equal([]); + }; + + it('should reset the unread counter if the message was removed', async () => { + const { body } = await sendSimpleMessage({ roomId: testChannel._id, tmid: parentThreadId, userCredentials: otherUserCredentials }); + const childrenMessageId = body.message._id; + + await followMessage({ msgId: parentThreadId, requestCredentials: otherUserCredentials }); + await deleteMessage({ msgId: childrenMessageId, roomId: testChannel._id }); + + const userWhoCreatedTheThreadSubscription = await getSubscriptionByRoomId(testChannel._id); + + expectNoUnreadThreadMessages(userWhoCreatedTheThreadSubscription); + }); + + it('should reset the unread counter of users who followed the thread', async () => { + const { body } = await sendSimpleMessage({ roomId: testChannel._id, tmid: parentThreadId }); + const childrenMessageId = body.message._id; + + await followMessage({ msgId: parentThreadId, requestCredentials: otherUserCredentials }); + await deleteMessage({ msgId: childrenMessageId, roomId: testChannel._id }); + + const userWhoWasFollowingTheThreadSubscription = await getSubscriptionByRoomId(testChannel._id, otherUserCredentials); + + expectNoUnreadThreadMessages(userWhoWasFollowingTheThreadSubscription); + }); + }); }); describe('/chat.search', () => { diff --git a/packages/model-typings/src/models/IMessagesModel.ts b/packages/model-typings/src/models/IMessagesModel.ts index e50e71f179bc..f5452e957e8f 100644 --- a/packages/model-typings/src/models/IMessagesModel.ts +++ b/packages/model-typings/src/models/IMessagesModel.ts @@ -290,7 +290,7 @@ export interface IMessagesModel extends IBaseModel { removeThreadFollowerByThreadId(tmid: string, userId: string): Promise; findThreadsByRoomId(rid: string, skip: number, limit: number): FindCursor; - decreaseReplyCountById(_id: string, inc?: number): Promise; + decreaseReplyCountById(_id: string, inc?: number): Promise>; countPinned(options?: CountDocumentsOptions): Promise; countStarred(options?: CountDocumentsOptions): Promise; }