diff --git a/.changeset/afraid-poets-sparkle.md b/.changeset/afraid-poets-sparkle.md deleted file mode 100644 index d9669f73a14e..000000000000 --- a/.changeset/afraid-poets-sparkle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/meteor': patch ---- - -Fixed Security tab visibility to allow password changes when 2FA/E2E is disabled. diff --git a/.changeset/breezy-geckos-sparkle.md b/.changeset/breezy-geckos-sparkle.md new file mode 100644 index 000000000000..c64ffe920282 --- /dev/null +++ b/.changeset/breezy-geckos-sparkle.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Fix an issue where read receipts menu item wasn't considering the enabled setting to be displayed diff --git a/.changeset/breezy-starfishes-attack.md b/.changeset/breezy-starfishes-attack.md deleted file mode 100644 index 56bac6f3cebd..000000000000 --- a/.changeset/breezy-starfishes-attack.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@rocket.chat/meteor": patch ---- - -Fixes error `audio.pause() is not a function` and makes the continuous new room notification (livechat) respect the volume set in user preferences. diff --git a/.changeset/chilly-glasses-sin.md b/.changeset/chilly-glasses-sin.md deleted file mode 100644 index 3ff7f1ef1c1f..000000000000 --- a/.changeset/chilly-glasses-sin.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@rocket.chat/meteor": patch ---- - -Increased the timeout between calls for the three remaining Omnichannel Agenda Jobs. This should make them happen less often and reduce the load on MongoDB diff --git a/.changeset/chilly-poems-explode.md b/.changeset/chilly-poems-explode.md new file mode 100644 index 000000000000..17acf3c5ba85 --- /dev/null +++ b/.changeset/chilly-poems-explode.md @@ -0,0 +1,7 @@ +--- +"@rocket.chat/meteor": minor +"@rocket.chat/core-typings": minor +"@rocket.chat/i18n": patch +--- + +Introduced a tab layout to the users page and implemented a tab called "All" that lists all users. diff --git a/.changeset/chilly-walls-knock.md b/.changeset/chilly-walls-knock.md deleted file mode 100644 index 4c183061cbe6..000000000000 --- a/.changeset/chilly-walls-knock.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -'@rocket.chat/meteor': patch ---- - -Fixed an issue while creating tokens via the special `users.createToken` API was not respecting the maximum login tokens allowed for a user. - -The following endpoint was deprecated and will be removed on version `8.0.0`: - -- `/api/v1/users.createToken` - -The following Meteor method (realtime API) was deprecated and will be removed on version `8.0.0`: - -- `createToken` diff --git a/.changeset/eighty-pans-joke.md b/.changeset/eighty-pans-joke.md deleted file mode 100644 index 83eabdd8f856..000000000000 --- a/.changeset/eighty-pans-joke.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/meteor': patch ---- - -Force logout the clients which are actively online, whenever a user resets E2EE keys. diff --git a/.changeset/eleven-news-stare.md b/.changeset/eleven-news-stare.md deleted file mode 100644 index 8bf62b7aeafa..000000000000 --- a/.changeset/eleven-news-stare.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@rocket.chat/meteor": patch ---- - -Fixed issue with login via SAML not redirecting to invite link diff --git a/.changeset/eleven-seas-explain.md b/.changeset/eleven-seas-explain.md deleted file mode 100644 index a41d2fbc625d..000000000000 --- a/.changeset/eleven-seas-explain.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/meteor': patch ---- - -Fixes an issue that forces the focus on the last message when interacting by mouse on message list diff --git a/.changeset/fair-peaches-cough.md b/.changeset/fair-peaches-cough.md deleted file mode 100644 index 34f7a319924a..000000000000 --- a/.changeset/fair-peaches-cough.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@rocket.chat/meteor": patch -"@rocket.chat/livechat": patch ---- - -Fixes the livechat client ignoring the `livechat_fileuploads_enabled` setting when uploading files diff --git a/.changeset/fifty-cups-sort.md b/.changeset/fifty-cups-sort.md deleted file mode 100644 index 389391ef8cc9..000000000000 --- a/.changeset/fifty-cups-sort.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@rocket.chat/meteor": minor -"@rocket.chat/rest-typings": minor ---- - -Created a new endpoint to get a filtered and paginated list of users. diff --git a/.changeset/fifty-planets-rhyme.md b/.changeset/fifty-planets-rhyme.md deleted file mode 100644 index 3d98a1445aaa..000000000000 --- a/.changeset/fifty-planets-rhyme.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/meteor': patch ---- - -Deprecate muteUserInRoom and unmuteUserInRoom meteor methods diff --git a/.changeset/flat-socks-act.md b/.changeset/flat-socks-act.md deleted file mode 100644 index 7188779ea7cf..000000000000 --- a/.changeset/flat-socks-act.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@rocket.chat/meteor": patch ---- - -Fixed wrong `Business hours` validations between different weeks diff --git a/.changeset/flat-starfishes-crash.md b/.changeset/flat-starfishes-crash.md new file mode 100644 index 000000000000..9c5bb2425f19 --- /dev/null +++ b/.changeset/flat-starfishes-crash.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Fixed a problem in how server was processing errors that was sending 2 ephemeral error messages when @all or @here were used while they were disabled via permissions diff --git a/.changeset/four-eyes-sniff.md b/.changeset/four-eyes-sniff.md deleted file mode 100644 index 06c9dac06d05..000000000000 --- a/.changeset/four-eyes-sniff.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@rocket.chat/meteor": minor -"@rocket.chat/core-typings": minor -"@rocket.chat/i18n": minor ---- - -Allow Custom Fields in Messages. API-only feature. It can be enabled and configured in Workspace Settings. diff --git a/.changeset/fresh-students-remember.md b/.changeset/fresh-students-remember.md new file mode 100644 index 000000000000..50b422f6b7dd --- /dev/null +++ b/.changeset/fresh-students-remember.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/meteor": patch +--- + +Fixed an issue where translations would fallback to english some of the times. diff --git a/.changeset/good-ducks-vanish.md b/.changeset/good-ducks-vanish.md deleted file mode 100644 index 3edfc6baca40..000000000000 --- a/.changeset/good-ducks-vanish.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/meteor': minor ---- - -Introduces sidebar navigability, allowing users to navigate on sidebar channels through keyboard diff --git a/.changeset/good-ghosts-doubt.md b/.changeset/good-ghosts-doubt.md deleted file mode 100644 index 5f4ed8f5a36d..000000000000 --- a/.changeset/good-ghosts-doubt.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/meteor': minor ---- - -Introduces a resizable Contextualbar allowing users to change the width just by dragging it diff --git a/.changeset/gorgeous-lizards-shave.md b/.changeset/gorgeous-lizards-shave.md new file mode 100644 index 000000000000..d02d3cb80599 --- /dev/null +++ b/.changeset/gorgeous-lizards-shave.md @@ -0,0 +1,6 @@ +--- +"@rocket.chat/meteor": minor +"@rocket.chat/livechat": minor +--- + +Makes the triggers fired by the condition `after-guest-registration` persist on the livechat client, it will persist through reloads and pagination, only reseting when a conversation is closed (no changes were done on the agent side of the conversation) diff --git a/.changeset/great-moles-rest.md b/.changeset/great-moles-rest.md deleted file mode 100644 index a615edd7df62..000000000000 --- a/.changeset/great-moles-rest.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/meteor': minor ---- - -Encrypt file descriptions in E2EE rooms diff --git a/.changeset/green-ways-tie.md b/.changeset/green-ways-tie.md deleted file mode 100644 index 73a334fd32a0..000000000000 --- a/.changeset/green-ways-tie.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@rocket.chat/meteor": patch ---- - -Fixed open expanded view (galery mode) for image attachments sent by livechat widget diff --git a/.changeset/heavy-singers-retire.md b/.changeset/heavy-singers-retire.md deleted file mode 100644 index 60244cd4b5f8..000000000000 --- a/.changeset/heavy-singers-retire.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/meteor': patch ---- - -Fixes an issue where the last threads list item wasn't displaying properly diff --git a/.changeset/lazy-gorilas-shop.md b/.changeset/lazy-gorilas-shop.md new file mode 100644 index 000000000000..c71610f703fc --- /dev/null +++ b/.changeset/lazy-gorilas-shop.md @@ -0,0 +1,6 @@ +--- +"@rocket.chat/meteor": patch +"@rocket.chat/i18n": patch +--- + +Fixed an issue with object storage settings that was not allowing admins to decide if files generated via "Export conversation" feature were being proxied through server or not. diff --git a/.changeset/lemon-schools-double.md b/.changeset/lemon-schools-double.md deleted file mode 100644 index b0f623e8d647..000000000000 --- a/.changeset/lemon-schools-double.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@rocket.chat/meteor": patch ---- - -fixed an issue where mentioning a team would trigger the bot message warning that the team is not a part of the channel diff --git a/.changeset/lovely-trainers-kiss.md b/.changeset/lovely-trainers-kiss.md deleted file mode 100644 index 58d6d5159d91..000000000000 --- a/.changeset/lovely-trainers-kiss.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@rocket.chat/rest-typings': minor -'@rocket.chat/meteor': minor ---- - -Convert mute/unmute meteor methods to endpoints diff --git a/.changeset/nasty-swans-compete.md b/.changeset/nasty-swans-compete.md new file mode 100644 index 000000000000..7cf912e3f075 --- /dev/null +++ b/.changeset/nasty-swans-compete.md @@ -0,0 +1,9 @@ +--- +"@rocket.chat/meteor": patch +"@rocket.chat/core-services": patch +"@rocket.chat/omnichannel-services": patch +"@rocket.chat/pdf-worker": patch +--- + +Fixed multiple issues with PDF generation logic when a quoted message was too big to fit in one single page. This was causing an internal infinite loop within the library (as it tried to make it fit, failing and then trying to fit on next page where the same happened thus causing a loop). +The library was not able to break down some nested views and thus was trying to fit the whole quote on one single page. Logic was updated to allow wrapping of the contents when messages are quoted (so they can span multiple lines) and removed a bunch of unnecesary views from the code. diff --git a/.changeset/nervous-elephants-jam.md b/.changeset/nervous-elephants-jam.md deleted file mode 100644 index cc74cd85842e..000000000000 --- a/.changeset/nervous-elephants-jam.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@rocket.chat/model-typings': minor -'@rocket.chat/i18n': minor -'@rocket.chat/meteor': minor ---- - -Added a new setting to automatically disable users from LDAP that can no longer be found by the background sync diff --git a/.changeset/nice-hounds-enjoy.md b/.changeset/nice-hounds-enjoy.md deleted file mode 100644 index 311a29bee54c..000000000000 --- a/.changeset/nice-hounds-enjoy.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/eslint-config': minor ---- - -Adds eslint-plugin-jsx-a11y plugin to eslint react config diff --git a/.changeset/nine-houses-reply.md b/.changeset/nine-houses-reply.md deleted file mode 100644 index 29bbe0882a76..000000000000 --- a/.changeset/nine-houses-reply.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@rocket.chat/meteor": patch -"@rocket.chat/livechat": patch ---- - -Livechat: A registered user loses their messages if 'registerGuest' is called using the same token. diff --git a/.changeset/old-geckos-march.md b/.changeset/old-geckos-march.md deleted file mode 100644 index 188a32d3f515..000000000000 --- a/.changeset/old-geckos-march.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/meteor': minor ---- - -Added the ability to serve .well-known paths directly from Rocket.Chat, if using federation, removing the need for special reverse proxy configuration or another component layer for specific types of reverse proxies / loadbalancers. diff --git a/.changeset/pink-ants-sing.md b/.changeset/pink-ants-sing.md deleted file mode 100644 index 7b4841a11561..000000000000 --- a/.changeset/pink-ants-sing.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@rocket.chat/meteor": patch ---- - -Fixed a UI issue that allowed a user to "mark" a room as favorite even when a room was not default. The Back-End was correctly ignoring the `favorite` property from being updated when the room was not default, but the UI still allowed users to try. -As UI allowed but changes were not saved, this gave the impression that the function was not working. diff --git a/.changeset/pink-parrots-end.md b/.changeset/pink-parrots-end.md deleted file mode 100644 index 9f1863f6915c..000000000000 --- a/.changeset/pink-parrots-end.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@rocket.chat/meteor": minor -"@rocket.chat/rest-typings": minor ---- - -Created a new endpoint to resend the welcome email to a given user diff --git a/.changeset/popular-fishes-lay.md b/.changeset/popular-fishes-lay.md deleted file mode 100644 index e709c0e35633..000000000000 --- a/.changeset/popular-fishes-lay.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@rocket.chat/meteor": patch ---- - -**Fixed settings-related statistics not being updated according to the license.** - -We've identified an issue where certain statistics were not reflecting recent license changes. This resulted in outdated information being reported for workspaces. -This change ensures that all reported statistics are current and consider the workspace license. diff --git a/.changeset/proud-experts-taste.md b/.changeset/proud-experts-taste.md deleted file mode 100644 index c6a358d13b20..000000000000 --- a/.changeset/proud-experts-taste.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@rocket.chat/meteor": patch ---- - -Fixed a language priority issue. It should now respect the following order: User Preference -> Browser Language -> Server Language diff --git a/.changeset/rich-bananas-complain.md b/.changeset/rich-bananas-complain.md new file mode 100644 index 000000000000..9ddaf098c948 --- /dev/null +++ b/.changeset/rich-bananas-complain.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Fixed an issue on Users converter that was not returning the `statusText` property from users even when the typing indicated property existed. diff --git a/.changeset/shaggy-yaks-train.md b/.changeset/shaggy-yaks-train.md deleted file mode 100644 index 1dbc97b48228..000000000000 --- a/.changeset/shaggy-yaks-train.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@rocket.chat/meteor": patch ---- - -Fixed an issue where Rocket.Chat would ask admins to confirm fingerprint change (new workspace vs configuration update), even when `AUTO_ACCEPT_FINGERPRINT` environment variable set to `"true"`. diff --git a/.changeset/sharp-yaks-turn.md b/.changeset/sharp-yaks-turn.md deleted file mode 100644 index 7c05bf5a3b0e..000000000000 --- a/.changeset/sharp-yaks-turn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@rocket.chat/meteor": patch ---- - -Fixed supported versions not being updated in airgapped environments diff --git a/.changeset/shiny-crabs-peel.md b/.changeset/shiny-crabs-peel.md new file mode 100644 index 000000000000..f4d066827bfc --- /dev/null +++ b/.changeset/shiny-crabs-peel.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/fuselage-ui-kit': patch +--- + +Fix translation param on video conf joined message diff --git a/.changeset/silent-dodos-doubt.md b/.changeset/silent-dodos-doubt.md deleted file mode 100644 index 53859f83cc7e..000000000000 --- a/.changeset/silent-dodos-doubt.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@rocket.chat/meteor": minor ---- - -Added a new notification provider in light of the old FCM API deprecation, now you can choose to use the new provider or the old via the `Push_UseLegacy` setting diff --git a/.changeset/silly-clocks-return.md b/.changeset/silly-clocks-return.md new file mode 100644 index 000000000000..0505580a477a --- /dev/null +++ b/.changeset/silly-clocks-return.md @@ -0,0 +1,7 @@ +--- +'@rocket.chat/omnichannel-services': patch +'@rocket.chat/core-services': patch +'@rocket.chat/meteor': patch +--- + +Fixed error handling for files bigger than NATS max allowed payload. This should prevent PDFs from erroring out when generating from rooms that contain heavy images. diff --git a/.changeset/slow-cows-dance.md b/.changeset/slow-cows-dance.md deleted file mode 100644 index 67097c860cf6..000000000000 --- a/.changeset/slow-cows-dance.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@rocket.chat/meteor": patch -"@rocket.chat/rest-typings": patch ---- - -Deprecate `channels.images` in favor of `rooms.images`. `Rooms` endpoints are more broad and should interact with all types of rooms. `Channels` on the other hand are specific to public channels. -This change is to keep the semantics and conventions of the endpoints diff --git a/.changeset/small-moons-matter.md b/.changeset/small-moons-matter.md deleted file mode 100644 index af18b14ac426..000000000000 --- a/.changeset/small-moons-matter.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@rocket.chat/meteor": patch ---- - -Fixed custom OAuth roles not synced on the first login (on user creation) diff --git a/.changeset/smart-squids-begin.md b/.changeset/smart-squids-begin.md deleted file mode 100644 index 48f3f460ea7e..000000000000 --- a/.changeset/smart-squids-begin.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/meteor': patch ---- - -Fixes the missing space between name and user name on system messages diff --git a/.changeset/soft-shrimps-beg.md b/.changeset/soft-shrimps-beg.md deleted file mode 100644 index 74bd810a93aa..000000000000 --- a/.changeset/soft-shrimps-beg.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@rocket.chat/meteor": patch ---- - -This PR have made enhancements to the select and multiselect inputs related to Omnichannel Departments, now the options properly display the complete department names, ensuring clarity for users and added text wrapping for long department names, enhancing readability and UX. diff --git a/.changeset/strange-bears-dance.md b/.changeset/strange-bears-dance.md new file mode 100644 index 000000000000..49ea972c8fe4 --- /dev/null +++ b/.changeset/strange-bears-dance.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': minor +--- + +Adds CheckOption to departments multi selects improving options visibility state diff --git a/.changeset/strange-comics-camp.md b/.changeset/strange-comics-camp.md deleted file mode 100644 index 667ba409a7f3..000000000000 --- a/.changeset/strange-comics-camp.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@rocket.chat/meteor": patch ---- - -Fixed an issue where an endpoint was called before checking configuration that enables automatic translation when launching the application diff --git a/.changeset/strange-countries-visit.md b/.changeset/strange-countries-visit.md deleted file mode 100644 index 211dbb2f5a72..000000000000 --- a/.changeset/strange-countries-visit.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@rocket.chat/meteor": patch -"@rocket.chat/core-services": patch ---- - -Fixed a problem that caused OTR Session messages' to not being transmitted from one peer to another when running Rocket.Chat as microservices. This was caused by a legacy streamer that tried to use the websocket directly, which works on monolith but doesn't on microservices, cause these events are routed through DDP Streamer service. diff --git a/.changeset/strange-rivers-live.md b/.changeset/strange-rivers-live.md deleted file mode 100644 index b1ebd05c284d..000000000000 --- a/.changeset/strange-rivers-live.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@rocket.chat/core-typings': minor -'@rocket.chat/i18n': minor -'@rocket.chat/meteor': minor ---- - -Added support for allowing agents to forward inquiries to departments that may not have any online agents given that `Allow department to receive forwarded inquiries even when there's no available agents` is set to `true` in the department configuration. -This configuration empowers agents to seamlessly direct incoming requests to the designated department, ensuring efficient handling of queries even when departmental resources are not actively online. When an agent becomes available, any pending inquiries will be automatically routed to them if the routing algorithm supports it. diff --git a/.changeset/strong-bananas-flash.md b/.changeset/strong-bananas-flash.md deleted file mode 100644 index d41697836d11..000000000000 --- a/.changeset/strong-bananas-flash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/meteor': patch ---- - -Fixed duplicate API calls during livechat room forwarding by adding loading state for submit button diff --git a/.changeset/strong-humans-bow.md b/.changeset/strong-humans-bow.md new file mode 100644 index 000000000000..b718cbe7fedd --- /dev/null +++ b/.changeset/strong-humans-bow.md @@ -0,0 +1,6 @@ +--- +"@rocket.chat/fuselage-ui-kit": minor +"@rocket.chat/ui-kit": minor +--- + +Introduced new elements for apps to select channels diff --git a/.changeset/sweet-books-trade.md b/.changeset/sweet-books-trade.md deleted file mode 100644 index be828d662f32..000000000000 --- a/.changeset/sweet-books-trade.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@rocket.chat/meteor": patch ---- - -fixed search room not showing the new name room name changes diff --git a/.changeset/swift-readers-speak.md b/.changeset/swift-readers-speak.md deleted file mode 100644 index 25a109d492d6..000000000000 --- a/.changeset/swift-readers-speak.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@rocket.chat/meteor": minor -"@rocket.chat/i18n": minor ---- - -Added "Enable Users" option under "Sync User Active State" LDAP setting to allow only re-enabling users found on LDAP background sync diff --git a/.changeset/tall-wombats-love.md b/.changeset/tall-wombats-love.md new file mode 100644 index 000000000000..80f4d2c494da --- /dev/null +++ b/.changeset/tall-wombats-love.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Replaces the burger menu with an appropriate button fixing the semantics and mismatching color diff --git a/.changeset/tame-ducks-turn.md b/.changeset/tame-ducks-turn.md deleted file mode 100644 index 0ad730b9b310..000000000000 --- a/.changeset/tame-ducks-turn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@rocket.chat/meteor": patch ---- - -Fixed a problem that caused `afterCreateUser` callback to be called without new user's roles inside. This caused Omnichannel Business Hour manager to ignore these users from assigning open business hours until the manager restarted or the business hour restarted. diff --git a/.changeset/thin-peaches-own.md b/.changeset/thin-peaches-own.md deleted file mode 100644 index b002e2f774c2..000000000000 --- a/.changeset/thin-peaches-own.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/meteor': patch ---- - -Fixes an issue where message reactions are vertically misaligned when zooming out diff --git a/.changeset/thirty-hotels-greet.md b/.changeset/thirty-hotels-greet.md deleted file mode 100644 index ac226b11b6b6..000000000000 --- a/.changeset/thirty-hotels-greet.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@rocket.chat/meteor': minor ---- - -Redesign Save E2EE password modal diff --git a/.changeset/tough-boats-beg.md b/.changeset/tough-boats-beg.md deleted file mode 100644 index bc77048ffbec..000000000000 --- a/.changeset/tough-boats-beg.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@rocket.chat/meteor": minor ---- - -Support Message Custom Fields on upload API via field `customField` and JSON value diff --git a/.changeset/twelve-seas-battle.md b/.changeset/twelve-seas-battle.md deleted file mode 100644 index a527a93f6212..000000000000 --- a/.changeset/twelve-seas-battle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@rocket.chat/meteor": patch ---- - -Fixed an issue where old exports would get overwritten by new ones if generated on the same day, when using external storage services (such as Amazon S3) diff --git a/.changeset/two-suns-marry.md b/.changeset/two-suns-marry.md deleted file mode 100644 index 3eae6383a62f..000000000000 --- a/.changeset/two-suns-marry.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@rocket.chat/i18n': minor -'@rocket.chat/meteor': minor ---- - -feat: `ConnectionStatusBar` redesign diff --git a/.changeset/unlucky-berries-guess.md b/.changeset/unlucky-berries-guess.md new file mode 100644 index 000000000000..5a4cc9aba3e9 --- /dev/null +++ b/.changeset/unlucky-berries-guess.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': minor +--- + +Replace the read receipt receipt indicator in order to improve the accessibility complience diff --git a/.changeset/warm-squids-deliver.md b/.changeset/warm-squids-deliver.md new file mode 100644 index 000000000000..0ec0a9407993 --- /dev/null +++ b/.changeset/warm-squids-deliver.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': minor +--- + +Changes the scrollbar color in order to improve the contrast and accessibility compliance diff --git a/.changeset/weak-starfishes-fail.md b/.changeset/weak-starfishes-fail.md new file mode 100644 index 000000000000..38e510229f6e --- /dev/null +++ b/.changeset/weak-starfishes-fail.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Fixes the missing spacing on don`t ask again checkbox inside modals diff --git a/.changeset/wicked-points-deliver.md b/.changeset/wicked-points-deliver.md new file mode 100644 index 000000000000..91985578917f --- /dev/null +++ b/.changeset/wicked-points-deliver.md @@ -0,0 +1,9 @@ +--- +'@rocket.chat/meteor': patch +--- + +This fuselage`s bump fixes: +- The message toolbar visibility on hover (Firefox ESR) +- `Bubble` missing font-family + +[more details](https://github.com/RocketChat/fuselage/releases/tag/%40rocket.chat%2Ffuselage%400.53.7) diff --git a/.changeset/wild-keys-obey.md b/.changeset/wild-keys-obey.md deleted file mode 100644 index 9de92ee5671b..000000000000 --- a/.changeset/wild-keys-obey.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@rocket.chat/livechat": patch ---- - -Fixes issue causing a desync in different browser windows when a chat is closed and started again diff --git a/.changeset/wild-teachers-design.md b/.changeset/wild-teachers-design.md new file mode 100644 index 000000000000..f49f4549e762 --- /dev/null +++ b/.changeset/wild-teachers-design.md @@ -0,0 +1,7 @@ +--- +"@rocket.chat/meteor": minor +"@rocket.chat/core-typings": minor +"@rocket.chat/i18n": minor +--- + +Added "Rocket.Chat Cloud Workspace ID" to workspace statistics page diff --git a/.changeset/young-candles-explode.md b/.changeset/young-candles-explode.md deleted file mode 100644 index 91ff2458a403..000000000000 --- a/.changeset/young-candles-explode.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@rocket.chat/ui-contexts': minor -'@rocket.chat/meteor': minor ---- - -Fixed an issue affecting the update modal/contextual bar by apps when it comes to error handling and regular surface update diff --git a/.changeset/young-yaks-suffer.md b/.changeset/young-yaks-suffer.md new file mode 100644 index 000000000000..b3a1d7b09fef --- /dev/null +++ b/.changeset/young-yaks-suffer.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +bump fuselage adding `AttachmentAuthorName` missing color token diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 2ad64fe9cb96..48b0af912d15 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -22,7 +22,7 @@ /apps/meteor/server/models @RocketChat/Architecture apps/meteor/server/startup/migrations @RocketChat/Architecture /apps/meteor/packages/rocketchat-livechat @RocketChat/omnichannel -/apps/meteor/server/services/voip @RocketChat/omnichannel +/apps/meteor/server/services/voip-asterisk @RocketChat/omnichannel /apps/meteor/server/services/omnichannel-voip @RocketChat/omnichannel /apps/meteor/server/features/EmailInbox @RocketChat/omnichannel /apps/meteor/ee/app/canned-responses @RocketChat/omnichannel diff --git a/.github/workflows/ci-test-e2e.yml b/.github/workflows/ci-test-e2e.yml index a7a6f3f367e2..1dc8993bfa87 100644 --- a/.github/workflows/ci-test-e2e.yml +++ b/.github/workflows/ci-test-e2e.yml @@ -50,6 +50,10 @@ on: type: required: true type: string + db-watcher-disabled: + default: 'false' + required: false + type: string secrets: CR_USER: required: true @@ -83,7 +87,7 @@ jobs: mongodb-version: ${{ fromJSON(inputs.mongodb-version) }} shard: ${{ fromJSON(inputs.shard) }} - name: MongoDB ${{ matrix.mongodb-version }} (${{ matrix.shard }}/${{ inputs.total-shard }})${{ matrix.mongodb-version == '6.0' && ' - Alpine' || '' }} + name: MongoDB ${{ matrix.mongodb-version }}${{ inputs.db-watcher-disabled == 'true' && ' [no watchers]' || '' }} (${{ matrix.shard }}/${{ inputs.total-shard }})${{ matrix.mongodb-version == '6.0' && ' - Alpine' || '' }} steps: - name: Login to GitHub Container Registry @@ -161,6 +165,7 @@ jobs: TRANSPORTER: ${{ inputs.transporter }} COVERAGE_DIR: '/tmp/coverage' COVERAGE_REPORTER: 'lcov' + DISABLE_DB_WATCHERS: ${{ inputs.db-watcher-disabled }} run: | docker compose -f docker-compose-ci.yml up -d diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 51e034505a85..8393b0d9ec8f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -389,10 +389,40 @@ jobs: REPORTER_ROCKETCHAT_URL: ${{ secrets.REPORTER_ROCKETCHAT_URL }} CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + test-ui-ee-no-watcher: + name: 🔨 Test UI (EE) + needs: [checks, build-gh-docker-coverage, release-versions] + + uses: ./.github/workflows/ci-test-e2e.yml + with: + type: ui + release: ee + transporter: 'nats://nats:4222' + enterprise-license: ${{ needs.release-versions.outputs.enterprise-license }} + shard: '[1, 2, 3, 4, 5]' + total-shard: 5 + mongodb-version: "['6.0']" + node-version: ${{ needs.release-versions.outputs.node-version }} + lowercase-repo: ${{ needs.release-versions.outputs.lowercase-repo }} + rc-dockerfile: ${{ needs.release-versions.outputs.rc-dockerfile }} + rc-docker-tag: ${{ needs.release-versions.outputs.rc-docker-tag }} + rc-dockerfile-alpine: ${{ needs.release-versions.outputs.rc-dockerfile-alpine }} + rc-docker-tag-alpine: ${{ needs.release-versions.outputs.rc-docker-tag-alpine }} + gh-docker-tag: ${{ needs.release-versions.outputs.gh-docker-tag }} + retries: ${{ (github.event_name == 'release' || github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master') && 2 || 0 }} + db-watcher-disabled: 'true' + secrets: + CR_USER: ${{ secrets.CR_USER }} + CR_PAT: ${{ secrets.CR_PAT }} + QASE_API_TOKEN: ${{ secrets.QASE_API_TOKEN }} + REPORTER_ROCKETCHAT_API_KEY: ${{ secrets.REPORTER_ROCKETCHAT_API_KEY }} + REPORTER_ROCKETCHAT_URL: ${{ secrets.REPORTER_ROCKETCHAT_URL }} + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + tests-done: name: ✅ Tests Done runs-on: ubuntu-20.04 - needs: [checks, test-unit, test-api, test-ui, test-api-ee, test-ui-ee] + needs: [checks, test-unit, test-api, test-ui, test-api-ee, test-ui-ee, test-ui-ee-no-watcher] steps: - name: Test finish aggregation diff --git a/apps/meteor/CHANGELOG.md b/apps/meteor/CHANGELOG.md index e6416fc0b039..5039151d35bc 100644 --- a/apps/meteor/CHANGELOG.md +++ b/apps/meteor/CHANGELOG.md @@ -1,5 +1,408 @@ # @rocket.chat/meteor +## 6.8.0 + +### Minor Changes + +- ([#31898](https://github.com/RocketChat/Rocket.Chat/pull/31898)) Created a new endpoint to get a filtered and paginated list of users. + +- ([#32224](https://github.com/RocketChat/Rocket.Chat/pull/32224)) Allow Custom Fields in Messages. API-only feature. It can be enabled and configured in Workspace Settings. + +- ([#32115](https://github.com/RocketChat/Rocket.Chat/pull/32115)) Introduces sidebar navigability, allowing users to navigate on sidebar channels through keyboard + +- ([#29461](https://github.com/RocketChat/Rocket.Chat/pull/29461)) Introduces a resizable Contextualbar allowing users to change the width just by dragging it + +- ([#31811](https://github.com/RocketChat/Rocket.Chat/pull/31811)) Convert mute/unmute meteor methods to endpoints + +- ([#32084](https://github.com/RocketChat/Rocket.Chat/pull/32084)) Added a new setting to automatically disable users from LDAP that can no longer be found by the background sync + +- ([#31965](https://github.com/RocketChat/Rocket.Chat/pull/31965)) Added the ability to serve .well-known paths directly from Rocket.Chat, if using federation, removing the need for special reverse proxy configuration or another component layer for specific types of reverse proxies / loadbalancers. + +- ([#31898](https://github.com/RocketChat/Rocket.Chat/pull/31898)) Created a new endpoint to resend the welcome email to a given user + +- ([#32208](https://github.com/RocketChat/Rocket.Chat/pull/32208)) Added a new notification provider in light of the old FCM API deprecation, now you can choose to use the new provider or the old via the `Push_UseLegacy` setting + +- ([#31976](https://github.com/RocketChat/Rocket.Chat/pull/31976)) Added support for allowing agents to forward inquiries to departments that may not have any online agents given that `Allow department to receive forwarded inquiries even when there's no available agents` is set to `true` in the department configuration. + This configuration empowers agents to seamlessly direct incoming requests to the designated department, ensuring efficient handling of queries even when departmental resources are not actively online. When an agent becomes available, any pending inquiries will be automatically routed to them if the routing algorithm supports it. +- ([#32173](https://github.com/RocketChat/Rocket.Chat/pull/32173)) Added "Enable Users" option under "Sync User Active State" LDAP setting to allow only re-enabling users found on LDAP background sync + +- ([#31865](https://github.com/RocketChat/Rocket.Chat/pull/31865)) Redesign Save E2EE password modal + +- ([#32272](https://github.com/RocketChat/Rocket.Chat/pull/32272)) Support Message Custom Fields on upload API via field `customField` and JSON value + +- ([#32055](https://github.com/RocketChat/Rocket.Chat/pull/32055)) feat: `ConnectionStatusBar` redesign + +- ([#32073](https://github.com/RocketChat/Rocket.Chat/pull/32073)) Fixed an issue affecting the update modal/contextual bar by apps when it comes to error handling and regular surface update + +### Patch Changes + +- ([#31996](https://github.com/RocketChat/Rocket.Chat/pull/31996)) Fixed Security tab visibility to allow password changes when 2FA/E2E is disabled. + +- ([#32210](https://github.com/RocketChat/Rocket.Chat/pull/32210)) Fixes error `audio.pause() is not a function` and makes the continuous new room notification (livechat) respect the volume set in user preferences. + +- Bump @rocket.chat/meteor version. + +- Bump @rocket.chat/meteor version. + +- Bump @rocket.chat/meteor version. + +- ([#32186](https://github.com/RocketChat/Rocket.Chat/pull/32186)) Increased the timeout between calls for the three remaining Omnichannel Agenda Jobs. This should make them happen less often and reduce the load on MongoDB + +- ([#32216](https://github.com/RocketChat/Rocket.Chat/pull/32216)) Fixed an issue while creating tokens via the special `users.createToken` API was not respecting the maximum login tokens allowed for a user. + + The following endpoint was deprecated and will be removed on version `8.0.0`: + + - `/api/v1/users.createToken` + + The following Meteor method (realtime API) was deprecated and will be removed on version `8.0.0`: + + - `createToken` + +- ([#31958](https://github.com/RocketChat/Rocket.Chat/pull/31958)) Force logout the clients which are actively online, whenever a user resets E2EE keys. + +- ([#31989](https://github.com/RocketChat/Rocket.Chat/pull/31989)) Fixed issue with login via SAML not redirecting to invite link + +- ([#32187](https://github.com/RocketChat/Rocket.Chat/pull/32187)) Fixes an issue that forces the focus on the last message when interacting by mouse on message list + +- ([#31765](https://github.com/RocketChat/Rocket.Chat/pull/31765)) Fixes the livechat client ignoring the `livechat_fileuploads_enabled` setting when uploading files + +- ([#31811](https://github.com/RocketChat/Rocket.Chat/pull/31811)) Deprecate muteUserInRoom and unmuteUserInRoom meteor methods + +- ([#32287](https://github.com/RocketChat/Rocket.Chat/pull/32287)) Fixed wrong `Business hours` validations between different weeks + +- ([#32348](https://github.com/RocketChat/Rocket.Chat/pull/32348)) Fixed an issue where translations would fallback to english some of the times. + +- ([#31990](https://github.com/RocketChat/Rocket.Chat/pull/31990)) Fixed open expanded view (galery mode) for image attachments sent by livechat widget + +- ([#32248](https://github.com/RocketChat/Rocket.Chat/pull/32248)) Fixes an issue where the last threads list item wasn't displaying properly + +- ([#32112](https://github.com/RocketChat/Rocket.Chat/pull/32112)) fixed an issue where mentioning a team would trigger the bot message warning that the team is not a part of the channel + +- ([#32069](https://github.com/RocketChat/Rocket.Chat/pull/32069)) Livechat: A registered user loses their messages if 'registerGuest' is called using the same token. + +- ([#32063](https://github.com/RocketChat/Rocket.Chat/pull/32063)) Fixed a UI issue that allowed a user to "mark" a room as favorite even when a room was not default. The Back-End was correctly ignoring the `favorite` property from being updated when the room was not default, but the UI still allowed users to try. + As UI allowed but changes were not saved, this gave the impression that the function was not working. +- ([#32374](https://github.com/RocketChat/Rocket.Chat/pull/32374)) Fixed an issue with some apps that didn't implement executeViewCloseHandler. This causes opened modals to be open forever on UI (unless Esc was clicked). This is because when the UI attempts to close it, it calls the aforementioned handler, and since it didn't exist, apps engine errored out. + + This returned an empty response to the UI, which ignored the response and continued to show the view. + +- ([#32237](https://github.com/RocketChat/Rocket.Chat/pull/32237)) **Fixed settings-related statistics not being updated according to the license.** + + We've identified an issue where certain statistics were not reflecting recent license changes. This resulted in outdated information being reported for workspaces. + This change ensures that all reported statistics are current and consider the workspace license. + +- ([#32170](https://github.com/RocketChat/Rocket.Chat/pull/32170)) Fixed a language priority issue. It should now respect the following order: User Preference -> Browser Language -> Server Language + +- ([#32202](https://github.com/RocketChat/Rocket.Chat/pull/32202)) Fixed an issue where Rocket.Chat would ask admins to confirm fingerprint change (new workspace vs configuration update), even when `AUTO_ACCEPT_FINGERPRINT` environment variable set to `"true"`. + +- ([#32220](https://github.com/RocketChat/Rocket.Chat/pull/32220)) Fixed supported versions not being updated in airgapped environments + +- ([#32141](https://github.com/RocketChat/Rocket.Chat/pull/32141)) Deprecate `channels.images` in favor of `rooms.images`. `Rooms` endpoints are more broad and should interact with all types of rooms. `Channels` on the other hand are specific to public channels. + This change is to keep the semantics and conventions of the endpoints +- ([#32157](https://github.com/RocketChat/Rocket.Chat/pull/32157)) Fixed custom OAuth roles not synced on the first login (on user creation) + +- ([#32136](https://github.com/RocketChat/Rocket.Chat/pull/32136)) Fixes the missing space between name and user name on system messages + +- ([#32007](https://github.com/RocketChat/Rocket.Chat/pull/32007)) This PR have made enhancements to the select and multiselect inputs related to Omnichannel Departments, now the options properly display the complete department names, ensuring clarity for users and added text wrapping for long department names, enhancing readability and UX. + +- ([#32221](https://github.com/RocketChat/Rocket.Chat/pull/32221)) Fixed an issue where an endpoint was called before checking configuration that enables automatic translation when launching the application + +- ([#32230](https://github.com/RocketChat/Rocket.Chat/pull/32230)) Fixed a problem that caused OTR Session messages' to not being transmitted from one peer to another when running Rocket.Chat as microservices. This was caused by a legacy streamer that tried to use the websocket directly, which works on monolith but doesn't on microservices, cause these events are routed through DDP Streamer service. + +- ([#32021](https://github.com/RocketChat/Rocket.Chat/pull/32021)) Fixed duplicate API calls during livechat room forwarding by adding loading state for submit button + +- ([#32123](https://github.com/RocketChat/Rocket.Chat/pull/32123)) fixed search room not showing the new name room name changes + +- ([#30309](https://github.com/RocketChat/Rocket.Chat/pull/30309)) Fixed a problem that caused `afterCreateUser` callback to be called without new user's roles inside. This caused Omnichannel Business Hour manager to ignore these users from assigning open business hours until the manager restarted or the business hour restarted. + +- ([#32172](https://github.com/RocketChat/Rocket.Chat/pull/32172)) Fixes an issue where message reactions are vertically misaligned when zooming out + +- ([#32062](https://github.com/RocketChat/Rocket.Chat/pull/32062)) Fixed an issue where old exports would get overwritten by new ones if generated on the same day, when using external storage services (such as Amazon S3) + +- ([#32284](https://github.com/RocketChat/Rocket.Chat/pull/32284)) fixed Engagement Dashboard and Device Management admin pages loading indefinitely + +-
Updated dependencies [845fd64f45, c47a8e3514, 9a6a7d0a40, da45cb6998, 845fd64f45, b94ca7c30b, 9902554388, 8b0986d15a, 4aba7c8a26, c4e58afd8b, c9a92e6ea2, c0d54d742a]: + + - @rocket.chat/rest-typings@6.8.0 + - @rocket.chat/core-typings@6.8.0 + - @rocket.chat/i18n@0.3.0 + - @rocket.chat/model-typings@0.4.0 + - @rocket.chat/apps@0.0.5 + - @rocket.chat/core-services@0.3.14 + - @rocket.chat/fuselage-ui-kit@6.0.0 + - @rocket.chat/presence@0.1.14 + - @rocket.chat/ui-contexts@6.0.0 + - @rocket.chat/api-client@0.1.32 + - @rocket.chat/omnichannel-services@0.1.14 + - @rocket.chat/license@0.1.14 + - @rocket.chat/pdf-worker@0.0.38 + - @rocket.chat/cron@0.0.34 + - @rocket.chat/gazzodown@6.0.0 + - @rocket.chat/web-ui-registration@6.0.0 + - @rocket.chat/models@0.0.38 + - @rocket.chat/base64@1.0.13 + - @rocket.chat/instance-status@0.0.38 + - @rocket.chat/message-parser@0.31.29 + - @rocket.chat/random@1.2.2 + - @rocket.chat/sha256@1.0.10 + - @rocket.chat/ui-composer@0.1.0 + - @rocket.chat/ui-kit@0.33.0 + - @rocket.chat/ui-video-conf@6.0.0 + - @rocket.chat/ui-theming@0.1.2 + - @rocket.chat/ui-avatar@2.0.0 + - @rocket.chat/ui-client@6.0.0 + - @rocket.chat/server-cloud-communication@0.0.2 +
+ +## 6.8.0-rc.2 + +### Patch Changes + +- Bump @rocket.chat/meteor version. + +- ([#32348](https://github.com/RocketChat/Rocket.Chat/pull/32348)) Fixed an issue where translations would fallback to english some of the times. + +- ([#32374](https://github.com/RocketChat/Rocket.Chat/pull/32374)) Fixed an issue with some apps that didn't implement executeViewCloseHandler. This causes opened modals to be open forever on UI (unless Esc was clicked). This is because when the UI attempts to close it, it calls the aforementioned handler, and since it didn't exist, apps engine errored out. + + This returned an empty response to the UI, which ignored the response and continued to show the view. + +-
Updated dependencies [b94ca7c30b]: + + - @rocket.chat/apps@0.0.5-rc.2 + - @rocket.chat/core-services@0.3.14-rc.2 + - @rocket.chat/core-typings@6.8.0-rc.2 + - @rocket.chat/fuselage-ui-kit@6.0.0-rc.2 + - @rocket.chat/rest-typings@6.8.0-rc.2 + - @rocket.chat/presence@0.1.14-rc.2 + - @rocket.chat/omnichannel-services@0.1.14-rc.2 + - @rocket.chat/api-client@0.1.32-rc.2 + - @rocket.chat/license@0.1.14-rc.2 + - @rocket.chat/pdf-worker@0.0.38-rc.2 + - @rocket.chat/cron@0.0.34-rc.2 + - @rocket.chat/gazzodown@6.0.0-rc.2 + - @rocket.chat/model-typings@0.4.0-rc.2 + - @rocket.chat/ui-contexts@6.0.0-rc.2 + - @rocket.chat/server-cloud-communication@0.0.2 + - @rocket.chat/models@0.0.38-rc.2 + - @rocket.chat/ui-theming@0.1.2 + - @rocket.chat/ui-avatar@2.0.0-rc.2 + - @rocket.chat/ui-client@6.0.0-rc.2 + - @rocket.chat/ui-video-conf@6.0.0-rc.2 + - @rocket.chat/web-ui-registration@6.0.0-rc.2 + - @rocket.chat/instance-status@0.0.38-rc.2 +
+ +## 6.8.0-rc.1 + +### Patch Changes + +- Bump @rocket.chat/meteor version. + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.8.0-rc.1 + - @rocket.chat/rest-typings@6.8.0-rc.1 + - @rocket.chat/api-client@0.1.31-rc.1 + - @rocket.chat/license@0.1.13-rc.1 + - @rocket.chat/omnichannel-services@0.1.13-rc.1 + - @rocket.chat/pdf-worker@0.0.37-rc.1 + - @rocket.chat/presence@0.1.13-rc.1 + - @rocket.chat/apps@0.0.4-rc.1 + - @rocket.chat/core-services@0.3.13-rc.1 + - @rocket.chat/cron@0.0.33-rc.1 + - @rocket.chat/gazzodown@6.0.0-rc.1 + - @rocket.chat/model-typings@0.4.0-rc.1 + - @rocket.chat/ui-contexts@6.0.0-rc.1 + - @rocket.chat/server-cloud-communication@0.0.2 + - @rocket.chat/fuselage-ui-kit@6.0.0-rc.1 + - @rocket.chat/models@0.0.37-rc.1 + - @rocket.chat/ui-theming@0.1.2 + - @rocket.chat/ui-avatar@2.0.0-rc.1 + - @rocket.chat/ui-client@6.0.0-rc.1 + - @rocket.chat/ui-video-conf@6.0.0-rc.1 + - @rocket.chat/web-ui-registration@6.0.0-rc.1 + - @rocket.chat/instance-status@0.0.37-rc.1 +
+ +## 6.8.0-rc.0 + +### Minor Changes + +- ([#31898](https://github.com/RocketChat/Rocket.Chat/pull/31898)) Created a new endpoint to get a filtered and paginated list of users. + +- ([#32224](https://github.com/RocketChat/Rocket.Chat/pull/32224)) Allow Custom Fields in Messages. API-only feature. It can be enabled and configured in Workspace Settings. + +- ([#32115](https://github.com/RocketChat/Rocket.Chat/pull/32115)) Introduces sidebar navigability, allowing users to navigate on sidebar channels through keyboard + +- ([#29461](https://github.com/RocketChat/Rocket.Chat/pull/29461)) Introduces a resizable Contextualbar allowing users to change the width just by dragging it + +- ([#31840](https://github.com/RocketChat/Rocket.Chat/pull/31840)) Encrypt file descriptions in E2EE rooms + +- ([#31811](https://github.com/RocketChat/Rocket.Chat/pull/31811)) Convert mute/unmute meteor methods to endpoints + +- ([#32084](https://github.com/RocketChat/Rocket.Chat/pull/32084)) Added a new setting to automatically disable users from LDAP that can no longer be found by the background sync + +- ([#31965](https://github.com/RocketChat/Rocket.Chat/pull/31965)) Added the ability to serve .well-known paths directly from Rocket.Chat, if using federation, removing the need for special reverse proxy configuration or another component layer for specific types of reverse proxies / loadbalancers. + +- ([#31898](https://github.com/RocketChat/Rocket.Chat/pull/31898)) Created a new endpoint to resend the welcome email to a given user + +- ([#32208](https://github.com/RocketChat/Rocket.Chat/pull/32208)) Added a new notification provider in light of the old FCM API deprecation, now you can choose to use the new provider or the old via the `Push_UseLegacy` setting + +- ([#31976](https://github.com/RocketChat/Rocket.Chat/pull/31976)) Added support for allowing agents to forward inquiries to departments that may not have any online agents given that `Allow department to receive forwarded inquiries even when there's no available agents` is set to `true` in the department configuration. + This configuration empowers agents to seamlessly direct incoming requests to the designated department, ensuring efficient handling of queries even when departmental resources are not actively online. When an agent becomes available, any pending inquiries will be automatically routed to them if the routing algorithm supports it. +- ([#32173](https://github.com/RocketChat/Rocket.Chat/pull/32173)) Added "Enable Users" option under "Sync User Active State" LDAP setting to allow only re-enabling users found on LDAP background sync + +- ([#31865](https://github.com/RocketChat/Rocket.Chat/pull/31865)) Redesign Save E2EE password modal + +- ([#32272](https://github.com/RocketChat/Rocket.Chat/pull/32272)) Support Message Custom Fields on upload API via field `customField` and JSON value + +- ([#32055](https://github.com/RocketChat/Rocket.Chat/pull/32055)) feat: `ConnectionStatusBar` redesign + +- ([#32073](https://github.com/RocketChat/Rocket.Chat/pull/32073)) Fixed an issue affecting the update modal/contextual bar by apps when it comes to error handling and regular surface update + +### Patch Changes + +- ([#31996](https://github.com/RocketChat/Rocket.Chat/pull/31996)) Fixed Security tab visibility to allow password changes when 2FA/E2E is disabled. + +- ([#32210](https://github.com/RocketChat/Rocket.Chat/pull/32210)) Fixes error `audio.pause() is not a function` and makes the continuous new room notification (livechat) respect the volume set in user preferences. + +- ([#32186](https://github.com/RocketChat/Rocket.Chat/pull/32186)) Increased the timeout between calls for the three remaining Omnichannel Agenda Jobs. This should make them happen less often and reduce the load on MongoDB + +- ([#32216](https://github.com/RocketChat/Rocket.Chat/pull/32216)) Fixed an issue while creating tokens via the special `users.createToken` API was not respecting the maximum login tokens allowed for a user. + + The following endpoint was deprecated and will be removed on version `8.0.0`: + + - `/api/v1/users.createToken` + + The following Meteor method (realtime API) was deprecated and will be removed on version `8.0.0`: + + - `createToken` + +- ([#31958](https://github.com/RocketChat/Rocket.Chat/pull/31958)) Force logout the clients which are actively online, whenever a user resets E2EE keys. + +- ([#31989](https://github.com/RocketChat/Rocket.Chat/pull/31989)) Fixed issue with login via SAML not redirecting to invite link + +- ([#32187](https://github.com/RocketChat/Rocket.Chat/pull/32187)) Fixes an issue that forces the focus on the last message when interacting by mouse on message list + +- ([#31765](https://github.com/RocketChat/Rocket.Chat/pull/31765)) Fixes the livechat client ignoring the `livechat_fileuploads_enabled` setting when uploading files + +- ([#31811](https://github.com/RocketChat/Rocket.Chat/pull/31811)) Deprecate muteUserInRoom and unmuteUserInRoom meteor methods + +- ([#32287](https://github.com/RocketChat/Rocket.Chat/pull/32287)) Fixed wrong `Business hours` validations between different weeks + +- ([#31990](https://github.com/RocketChat/Rocket.Chat/pull/31990)) Fixed open expanded view (galery mode) for image attachments sent by livechat widget + +- ([#32248](https://github.com/RocketChat/Rocket.Chat/pull/32248)) Fixes an issue where the last threads list item wasn't displaying properly + +- ([#32112](https://github.com/RocketChat/Rocket.Chat/pull/32112)) fixed an issue where mentioning a team would trigger the bot message warning that the team is not a part of the channel + +- ([#32069](https://github.com/RocketChat/Rocket.Chat/pull/32069)) Livechat: A registered user loses their messages if 'registerGuest' is called using the same token. + +- ([#32063](https://github.com/RocketChat/Rocket.Chat/pull/32063)) Fixed a UI issue that allowed a user to "mark" a room as favorite even when a room was not default. The Back-End was correctly ignoring the `favorite` property from being updated when the room was not default, but the UI still allowed users to try. + As UI allowed but changes were not saved, this gave the impression that the function was not working. +- ([#32237](https://github.com/RocketChat/Rocket.Chat/pull/32237)) **Fixed settings-related statistics not being updated according to the license.** + + We've identified an issue where certain statistics were not reflecting recent license changes. This resulted in outdated information being reported for workspaces. + This change ensures that all reported statistics are current and consider the workspace license. + +- ([#32170](https://github.com/RocketChat/Rocket.Chat/pull/32170)) Fixed a language priority issue. It should now respect the following order: User Preference -> Browser Language -> Server Language + +- ([#32202](https://github.com/RocketChat/Rocket.Chat/pull/32202)) Fixed an issue where Rocket.Chat would ask admins to confirm fingerprint change (new workspace vs configuration update), even when `AUTO_ACCEPT_FINGERPRINT` environment variable set to `"true"`. + +- ([#32220](https://github.com/RocketChat/Rocket.Chat/pull/32220)) Fixed supported versions not being updated in airgapped environments + +- ([#32141](https://github.com/RocketChat/Rocket.Chat/pull/32141)) Deprecate `channels.images` in favor of `rooms.images`. `Rooms` endpoints are more broad and should interact with all types of rooms. `Channels` on the other hand are specific to public channels. + This change is to keep the semantics and conventions of the endpoints +- ([#32157](https://github.com/RocketChat/Rocket.Chat/pull/32157)) Fixed custom OAuth roles not synced on the first login (on user creation) + +- ([#32136](https://github.com/RocketChat/Rocket.Chat/pull/32136)) Fixes the missing space between name and user name on system messages + +- ([#32007](https://github.com/RocketChat/Rocket.Chat/pull/32007)) This PR have made enhancements to the select and multiselect inputs related to Omnichannel Departments, now the options properly display the complete department names, ensuring clarity for users and added text wrapping for long department names, enhancing readability and UX. + +- ([#32221](https://github.com/RocketChat/Rocket.Chat/pull/32221)) Fixed an issue where an endpoint was called before checking configuration that enables automatic translation when launching the application + +- ([#32230](https://github.com/RocketChat/Rocket.Chat/pull/32230)) Fixed a problem that caused OTR Session messages' to not being transmitted from one peer to another when running Rocket.Chat as microservices. This was caused by a legacy streamer that tried to use the websocket directly, which works on monolith but doesn't on microservices, cause these events are routed through DDP Streamer service. + +- ([#32021](https://github.com/RocketChat/Rocket.Chat/pull/32021)) Fixed duplicate API calls during livechat room forwarding by adding loading state for submit button + +- ([#32123](https://github.com/RocketChat/Rocket.Chat/pull/32123)) fixed search room not showing the new name room name changes + +- ([#30309](https://github.com/RocketChat/Rocket.Chat/pull/30309)) Fixed a problem that caused `afterCreateUser` callback to be called without new user's roles inside. This caused Omnichannel Business Hour manager to ignore these users from assigning open business hours until the manager restarted or the business hour restarted. + +- ([#32172](https://github.com/RocketChat/Rocket.Chat/pull/32172)) Fixes an issue where message reactions are vertically misaligned when zooming out + +- ([#32062](https://github.com/RocketChat/Rocket.Chat/pull/32062)) Fixed an issue where old exports would get overwritten by new ones if generated on the same day, when using external storage services (such as Amazon S3) + +-
Updated dependencies [845fd64f45, c47a8e3514, 9a6a7d0a40, da45cb6998, 845fd64f45, 9902554388, 8b0986d15a, 4aba7c8a26, c4e58afd8b, c9a92e6ea2, c0d54d742a]: + + - @rocket.chat/rest-typings@6.8.0-rc.0 + - @rocket.chat/core-typings@6.8.0-rc.0 + - @rocket.chat/i18n@0.3.0-rc.0 + - @rocket.chat/model-typings@0.4.0-rc.0 + - @rocket.chat/core-services@0.3.12-rc.0 + - @rocket.chat/ui-contexts@6.0.0-rc.0 + - @rocket.chat/api-client@0.1.30-rc.0 + - @rocket.chat/omnichannel-services@0.1.12-rc.0 + - @rocket.chat/presence@0.1.12-rc.0 + - @rocket.chat/license@0.1.12-rc.0 + - @rocket.chat/pdf-worker@0.0.36-rc.0 + - @rocket.chat/apps@0.0.3-rc.0 + - @rocket.chat/cron@0.0.32-rc.0 + - @rocket.chat/gazzodown@6.0.0-rc.0 + - @rocket.chat/web-ui-registration@6.0.0-rc.0 + - @rocket.chat/models@0.0.36-rc.0 + - @rocket.chat/base64@1.0.13 + - @rocket.chat/fuselage-ui-kit@6.0.0-rc.0 + - @rocket.chat/instance-status@0.0.36-rc.0 + - @rocket.chat/message-parser@0.31.29 + - @rocket.chat/random@1.2.2 + - @rocket.chat/sha256@1.0.10 + - @rocket.chat/ui-composer@0.1.0 + - @rocket.chat/ui-kit@0.33.0 + - @rocket.chat/ui-video-conf@6.0.0-rc.0 + - @rocket.chat/ui-theming@0.1.2 + - @rocket.chat/ui-avatar@2.0.0-rc.0 + - @rocket.chat/ui-client@6.0.0-rc.0 + - @rocket.chat/server-cloud-communication@0.0.2 + +- Bump @rocket.chat/meteor version. + +- ([#32315](https://github.com/RocketChat/Rocket.Chat/pull/32315) by [@dionisio-bot](https://github.com/dionisio-bot)) fixed Engagement Dashboard and Device Management admin pages loading indefinitely + +-
Updated dependencies []: + + - @rocket.chat/core-typings@6.7.2 + - @rocket.chat/rest-typings@6.7.2 + - @rocket.chat/api-client@0.1.31 + - @rocket.chat/license@0.1.13 + - @rocket.chat/omnichannel-services@0.1.13 + - @rocket.chat/pdf-worker@0.0.37 + - @rocket.chat/presence@0.1.13 + - @rocket.chat/apps@0.0.4 + - @rocket.chat/core-services@0.3.13 + - @rocket.chat/cron@0.0.33 + - @rocket.chat/gazzodown@5.0.2 + - @rocket.chat/model-typings@0.3.9 + - @rocket.chat/ui-contexts@5.0.2 + - @rocket.chat/server-cloud-communication@0.0.2 + - @rocket.chat/fuselage-ui-kit@5.0.2 + - @rocket.chat/models@0.0.37 + - @rocket.chat/ui-theming@0.1.2 + - @rocket.chat/ui-avatar@1.0.2 + - @rocket.chat/ui-client@5.0.2 + - @rocket.chat/ui-video-conf@5.0.2 + - @rocket.chat/web-ui-registration@5.0.2 + - @rocket.chat/instance-status@0.0.37 +
+ +## 6.7.2 + +### Patch Changes + +- Bump @rocket.chat/meteor version. + +- ([#32284](https://github.com/RocketChat/Rocket.Chat/pull/32284)) fixed Engagement Dashboard and Device Management admin pages loading indefinitely + ## 6.7.1 ### Patch Changes diff --git a/apps/meteor/app/api/server/lib/getServerInfo.ts b/apps/meteor/app/api/server/lib/getServerInfo.ts index 9a0e7e4e11c9..020988b0aca4 100644 --- a/apps/meteor/app/api/server/lib/getServerInfo.ts +++ b/apps/meteor/app/api/server/lib/getServerInfo.ts @@ -5,6 +5,7 @@ import { getCachedSupportedVersionsToken, wrapPromise, } from '../../../cloud/server/functions/supportedVersionsToken/supportedVersionsToken'; +import { settings } from '../../../settings/server'; import { Info, minimumClientVersions } from '../../../utils/rocketchat.info'; const removePatchInfo = (version: string): string => version.replace(/(\d+\.\d+).*/, '$1'); @@ -12,10 +13,10 @@ const removePatchInfo = (version: string): string => version.replace(/(\d+\.\d+) export async function getServerInfo(userId?: string): Promise { const hasPermissionToViewStatistics = userId && (await hasPermissionAsync(userId, 'view-statistics')); const supportedVersionsToken = await wrapPromise(getCachedSupportedVersionsToken()); + const cloudWorkspaceId = settings.get('Cloud_Workspace_Id'); return { version: removePatchInfo(Info.version), - ...(hasPermissionToViewStatistics && { info: { ...Info, @@ -28,5 +29,7 @@ export async function getServerInfo(userId?: string): Promise { supportedVersionsToken.result && { supportedVersions: { signed: supportedVersionsToken.result }, }), + + cloudWorkspaceId, }; } diff --git a/apps/meteor/app/api/server/v1/permissions.ts b/apps/meteor/app/api/server/v1/permissions.ts index 4b860d6e1eac..3613cc171354 100644 --- a/apps/meteor/app/api/server/v1/permissions.ts +++ b/apps/meteor/app/api/server/v1/permissions.ts @@ -4,6 +4,7 @@ import { isBodyParamsValidPermissionUpdate } from '@rocket.chat/rest-typings'; import { Meteor } from 'meteor/meteor'; import { hasPermissionAsync } from '../../../authorization/server/functions/hasPermission'; +import { notifyOnPermissionChangedById } from '../../../lib/server/lib/notifyListener'; import { API } from '../api'; API.v1.addRoute( @@ -70,6 +71,7 @@ API.v1.addRoute( for await (const permission of bodyParams.permissions) { await Permissions.setRoles(permission._id, permission.roles); + void notifyOnPermissionChangedById(permission._id); } const result = (await Meteor.callAsync('permissions/get')) as IPermission[]; diff --git a/apps/meteor/app/api/server/v1/roles.ts b/apps/meteor/app/api/server/v1/roles.ts index a0fff9683b80..66c6677a9eed 100644 --- a/apps/meteor/app/api/server/v1/roles.ts +++ b/apps/meteor/app/api/server/v1/roles.ts @@ -9,6 +9,7 @@ import { getUsersInRolePaginated } from '../../../authorization/server/functions import { hasPermissionAsync } from '../../../authorization/server/functions/hasPermission'; import { hasRoleAsync, hasAnyRoleAsync } from '../../../authorization/server/functions/hasRole'; import { apiDeprecationLogger } from '../../../lib/server/lib/deprecationWarningLogger'; +import { notifyOnRoleChanged } from '../../../lib/server/lib/notifyListener'; import { settings } from '../../../settings/server/index'; import { API } from '../api'; import { getPaginationItems } from '../helpers/getPaginationItems'; @@ -179,6 +180,8 @@ API.v1.addRoute( await Roles.removeById(role._id); + void notifyOnRoleChanged(role, 'removed'); + return API.v1.success(); }, }, diff --git a/apps/meteor/app/api/server/v1/voip/extensions.ts b/apps/meteor/app/api/server/v1/voip/extensions.ts index e1c2629feb86..1a0fecf7cfc5 100644 --- a/apps/meteor/app/api/server/v1/voip/extensions.ts +++ b/apps/meteor/app/api/server/v1/voip/extensions.ts @@ -1,4 +1,4 @@ -import { Voip } from '@rocket.chat/core-services'; +import { VoipAsterisk } from '@rocket.chat/core-services'; import type { IVoipExtensionBase } from '@rocket.chat/core-typings'; import { Users } from '@rocket.chat/models'; import { Match, check } from 'meteor/check'; @@ -14,7 +14,7 @@ API.v1.addRoute( { authRequired: true, permissionsRequired: ['manage-voip-call-settings'] }, { async get() { - const version = await Voip.getConnectorVersion(); + const version = await VoipAsterisk.getConnectorVersion(); return API.v1.success(version); }, }, @@ -26,7 +26,7 @@ API.v1.addRoute( { authRequired: true, permissionsRequired: ['manage-voip-call-settings'] }, { async get() { - const list = await Voip.getExtensionList(); + const list = await VoipAsterisk.getExtensionList(); const result = list.result as IVoipExtensionBase[]; return API.v1.success({ extensions: result }); }, @@ -48,7 +48,7 @@ API.v1.addRoute( extension: String, }), ); - const endpointDetails = await Voip.getExtensionDetails(this.queryParams); + const endpointDetails = await VoipAsterisk.getExtensionDetails(this.queryParams); return API.v1.success({ ...endpointDetails.result }); }, }, @@ -68,7 +68,7 @@ API.v1.addRoute( extension: String, }), ); - const endpointDetails = await Voip.getRegistrationInfo(this.queryParams); + const endpointDetails = await VoipAsterisk.getRegistrationInfo(this.queryParams); const encKey = settings.get('VoIP_JWT_Secret'); if (!encKey) { logger.warn('No JWT keys set. Sending registration info as plain text'); @@ -111,7 +111,7 @@ API.v1.addRoute( return API.v1.notFound('Extension not found'); } - const endpointDetails = await Voip.getRegistrationInfo({ extension }); + const endpointDetails = await VoipAsterisk.getRegistrationInfo({ extension }); const encKey = settings.get('VoIP_JWT_Secret'); if (!encKey) { logger.warn('No JWT keys set. Sending registration info as plain text'); diff --git a/apps/meteor/app/api/server/v1/voip/queues.ts b/apps/meteor/app/api/server/v1/voip/queues.ts index f55dbbadda5f..4a8fb86be0e3 100644 --- a/apps/meteor/app/api/server/v1/voip/queues.ts +++ b/apps/meteor/app/api/server/v1/voip/queues.ts @@ -1,4 +1,4 @@ -import { Voip } from '@rocket.chat/core-services'; +import { VoipAsterisk } from '@rocket.chat/core-services'; import type { IVoipConnectorResult, IQueueSummary, IQueueMembershipDetails, IQueueMembershipSubscription } from '@rocket.chat/core-typings'; import { Match, check } from 'meteor/check'; @@ -9,7 +9,7 @@ API.v1.addRoute( { authRequired: true, permissionsRequired: ['inbound-voip-calls'] }, { async get() { - const queueSummary = await Voip.getQueueSummary(); + const queueSummary = await VoipAsterisk.getQueueSummary(); return API.v1.success({ summary: queueSummary.result as IQueueSummary[] }); }, }, @@ -26,7 +26,7 @@ API.v1.addRoute( extension: String, }), ); - const membershipDetails: IVoipConnectorResult = await Voip.getQueuedCallsForThisExtension(this.queryParams); + const membershipDetails: IVoipConnectorResult = await VoipAsterisk.getQueuedCallsForThisExtension(this.queryParams); return API.v1.success(membershipDetails.result as IQueueMembershipDetails); }, }, @@ -43,7 +43,7 @@ API.v1.addRoute( extension: String, }), ); - const membershipDetails: IVoipConnectorResult = await Voip.getQueueMembership(this.queryParams); + const membershipDetails: IVoipConnectorResult = await VoipAsterisk.getQueueMembership(this.queryParams); return API.v1.success(membershipDetails.result as IQueueMembershipSubscription); }, }, diff --git a/apps/meteor/app/api/server/v1/voip/server-connection.ts b/apps/meteor/app/api/server/v1/voip/server-connection.ts index 77e6267640f3..1bf2b85e8c7a 100644 --- a/apps/meteor/app/api/server/v1/voip/server-connection.ts +++ b/apps/meteor/app/api/server/v1/voip/server-connection.ts @@ -1,4 +1,4 @@ -import { Voip } from '@rocket.chat/core-services'; +import { VoipAsterisk } from '@rocket.chat/core-services'; import { Match, check } from 'meteor/check'; import { API } from '../../api'; @@ -18,7 +18,7 @@ API.v1.addRoute( }), ); const { host, port, username, password } = this.queryParams; - return API.v1.success(await Voip.checkManagementConnection(host, port, username, password)); + return API.v1.success(await VoipAsterisk.checkManagementConnection(host, port, username, password)); }, }, ); @@ -53,7 +53,7 @@ API.v1.addRoute( } } - return API.v1.success(await Voip.checkCallserverConnection(socketUrl)); + return API.v1.success(await VoipAsterisk.checkCallserverConnection(socketUrl)); }, }, ); diff --git a/apps/meteor/app/apps/server/converters/users.js b/apps/meteor/app/apps/server/converters/users.js index ba3d70ccc3c4..e89bf71a0428 100644 --- a/apps/meteor/app/apps/server/converters/users.js +++ b/apps/meteor/app/apps/server/converters/users.js @@ -35,6 +35,7 @@ export class AppUsersConverter { name: user.name, roles: user.roles, status: user.status, + statusText: user.statusText, statusConnection, utcOffset: user.utcOffset, createdAt: user.createdAt, diff --git a/apps/meteor/app/authorization/server/methods/addPermissionToRole.ts b/apps/meteor/app/authorization/server/methods/addPermissionToRole.ts index cb6422a03142..13a114732bd2 100644 --- a/apps/meteor/app/authorization/server/methods/addPermissionToRole.ts +++ b/apps/meteor/app/authorization/server/methods/addPermissionToRole.ts @@ -2,6 +2,7 @@ import { Permissions } from '@rocket.chat/models'; import type { ServerMethods } from '@rocket.chat/ui-contexts'; import { Meteor } from 'meteor/meteor'; +import { notifyOnPermissionChangedById } from '../../../lib/server/lib/notifyListener'; import { CONSTANTS, AuthorizationUtils } from '../../lib'; import { hasPermissionAsync } from '../functions/hasPermission'; @@ -41,11 +42,15 @@ Meteor.methods({ action: 'Adding_permission', }); } + // for setting-based-permissions, authorize the group access as well if (permission.groupPermissionId) { await Permissions.addRole(permission.groupPermissionId, role); + void notifyOnPermissionChangedById(permission.groupPermissionId); } await Permissions.addRole(permission._id, role); + + void notifyOnPermissionChangedById(permission._id); }, }); diff --git a/apps/meteor/app/authorization/server/methods/removeRoleFromPermission.ts b/apps/meteor/app/authorization/server/methods/removeRoleFromPermission.ts index 30a1b2a759b6..91a4df1eddf7 100644 --- a/apps/meteor/app/authorization/server/methods/removeRoleFromPermission.ts +++ b/apps/meteor/app/authorization/server/methods/removeRoleFromPermission.ts @@ -2,6 +2,7 @@ import { Permissions } from '@rocket.chat/models'; import type { ServerMethods } from '@rocket.chat/ui-contexts'; import { Meteor } from 'meteor/meteor'; +import { notifyOnPermissionChangedById } from '../../../lib/server/lib/notifyListener'; import { CONSTANTS } from '../../lib'; import { hasPermissionAsync } from '../functions/hasPermission'; @@ -36,10 +37,12 @@ Meteor.methods({ // for setting based permissions, revoke the group permission once all setting permissions // related to this group have been removed - if (permission.groupPermissionId) { await Permissions.removeRole(permission.groupPermissionId, role); + void notifyOnPermissionChangedById(permission.groupPermissionId); } + await Permissions.removeRole(permission._id, role); + void notifyOnPermissionChangedById(permission._id); }, }); diff --git a/apps/meteor/app/channel-settings/server/functions/saveRoomName.ts b/apps/meteor/app/channel-settings/server/functions/saveRoomName.ts index 8aa8dc4578a5..0fc15f878bcf 100644 --- a/apps/meteor/app/channel-settings/server/functions/saveRoomName.ts +++ b/apps/meteor/app/channel-settings/server/functions/saveRoomName.ts @@ -8,6 +8,7 @@ import type { Document, UpdateResult } from 'mongodb'; import { callbacks } from '../../../../lib/callbacks'; import { roomCoordinator } from '../../../../server/lib/rooms/roomCoordinator'; import { checkUsernameAvailability } from '../../../lib/server/functions/checkUsernameAvailability'; +import { notifyOnIntegrationChangedByChannels } from '../../../lib/server/lib/notifyListener'; import { getValidRoomName } from '../../../utils/server/lib/getValidRoomName'; const updateFName = async (rid: string, displayName: string): Promise<(UpdateResult | Document)[]> => { @@ -73,10 +74,13 @@ export async function saveRoomName( if (room.name && !isDiscussion) { await Integrations.updateRoomName(room.name, slugifiedRoomName); + void notifyOnIntegrationChangedByChannels([slugifiedRoomName]); } + if (sendMessage) { await Message.saveSystemMessage('r', rid, displayName, user); } + await callbacks.run('afterRoomNameChange', { rid, name: displayName, oldName: room.name }); return displayName; } diff --git a/apps/meteor/app/channel-settings/server/methods/saveRoomSettings.ts b/apps/meteor/app/channel-settings/server/methods/saveRoomSettings.ts index b1845511c7b7..4f6c06780942 100644 --- a/apps/meteor/app/channel-settings/server/methods/saveRoomSettings.ts +++ b/apps/meteor/app/channel-settings/server/methods/saveRoomSettings.ts @@ -10,6 +10,7 @@ import { RoomSettingsEnum } from '../../../../definition/IRoomTypeConfig'; import { roomCoordinator } from '../../../../server/lib/rooms/roomCoordinator'; import { hasPermissionAsync } from '../../../authorization/server/functions/hasPermission'; import { setRoomAvatar } from '../../../lib/server/functions/setRoomAvatar'; +import { notifyOnRoomChangedById } from '../../../lib/server/lib/notifyListener'; import { saveReactWhenReadOnly } from '../functions/saveReactWhenReadOnly'; import { saveRoomAnnouncement } from '../functions/saveRoomAnnouncement'; import { saveRoomCustomFields } from '../functions/saveRoomCustomFields'; @@ -487,6 +488,8 @@ export async function saveRoomSettings( }); } + void notifyOnRoomChangedById(rid); + return { result: true, rid: room._id, diff --git a/apps/meteor/app/e2e/client/rocketchat.e2e.room.js b/apps/meteor/app/e2e/client/rocketchat.e2e.room.js index 9e2f72d38115..bd0863d691a9 100644 --- a/apps/meteor/app/e2e/client/rocketchat.e2e.room.js +++ b/apps/meteor/app/e2e/client/rocketchat.e2e.room.js @@ -410,20 +410,6 @@ export class E2ERoom extends Emitter { return this.encryptText(data); } - encryptAttachmentDescription(description, _id) { - const ts = new Date(); - - const data = new TextEncoder('UTF-8').encode( - EJSON.stringify({ - userId: this.userId, - text: description, - _id, - ts, - }), - ); - return this.encryptText(data); - } - // Decrypt messages async decryptMessage(message) { diff --git a/apps/meteor/app/e2e/client/rocketchat.e2e.ts b/apps/meteor/app/e2e/client/rocketchat.e2e.ts index 472e71959933..1a98ce857f01 100644 --- a/apps/meteor/app/e2e/client/rocketchat.e2e.ts +++ b/apps/meteor/app/e2e/client/rocketchat.e2e.ts @@ -2,7 +2,7 @@ import QueryString from 'querystring'; import URL from 'url'; import type { IE2EEMessage, IMessage, IRoom, ISubscription } from '@rocket.chat/core-typings'; -import { isE2EEMessage, isFileAttachment } from '@rocket.chat/core-typings'; +import { isE2EEMessage } from '@rocket.chat/core-typings'; import { Emitter } from '@rocket.chat/emitter'; import EJSON from 'ejson'; import { Meteor } from 'meteor/meteor'; @@ -422,60 +422,19 @@ class E2E extends Emitter { const data = await e2eRoom.decrypt(message.msg); - const decryptedMessage: IE2EEMessage = { - ...message, - ...(data && { - msg: data.text, - e2e: 'done', - }), - }; - - const decryptedMessageWithQuote = await this.parseQuoteAttachment(decryptedMessage); - - const decryptedMessageWithAttachments = await this.decryptMessageAttachments(decryptedMessageWithQuote); - - return decryptedMessageWithAttachments; - } - - async decryptMessageAttachments(message: IMessage): Promise { - const { attachments } = message; - - if (!attachments || !attachments.length) { - return message; - } - - const e2eRoom = await this.getInstanceByRoomId(message.rid); - - if (!e2eRoom) { + if (!data) { return message; } - const decryptedAttachments = await Promise.all( - attachments.map(async (attachment) => { - if (!isFileAttachment(attachment)) { - return attachment; - } - - if (!attachment.description) { - return attachment; - } - - const data = await e2eRoom.decrypt(attachment.description); - - if (!data) { - return attachment; - } - - attachment.description = data.text; - return attachment; - }), - ); - - return { + const decryptedMessage: IE2EEMessage = { ...message, - attachments: decryptedAttachments, + msg: data.text, e2e: 'done', }; + + const decryptedMessageWithQuote = await this.parseQuoteAttachment(decryptedMessage); + + return decryptedMessageWithQuote; } async decryptPendingMessages(): Promise { diff --git a/apps/meteor/app/e2e/server/methods/setRoomKeyID.ts b/apps/meteor/app/e2e/server/methods/setRoomKeyID.ts index 005df0bb2a7a..6b0e685616b5 100644 --- a/apps/meteor/app/e2e/server/methods/setRoomKeyID.ts +++ b/apps/meteor/app/e2e/server/methods/setRoomKeyID.ts @@ -5,6 +5,7 @@ import { check } from 'meteor/check'; import { Meteor } from 'meteor/meteor'; import { canAccessRoomIdAsync } from '../../../authorization/server/functions/canAccessRoom'; +import { notifyOnRoomChangedById } from '../../../lib/server/lib/notifyListener'; declare module '@rocket.chat/ui-contexts' { // eslint-disable-next-line @typescript-eslint/naming-convention @@ -44,5 +45,7 @@ Meteor.methods({ } await Rooms.setE2eKeyId(room._id, keyID); + + void notifyOnRoomChangedById(room._id); }, }); diff --git a/apps/meteor/app/federation/server/endpoints/dispatch.js b/apps/meteor/app/federation/server/endpoints/dispatch.js index 4b3e148bbdad..4cab0b0c41e8 100644 --- a/apps/meteor/app/federation/server/endpoints/dispatch.js +++ b/apps/meteor/app/federation/server/endpoints/dispatch.js @@ -7,6 +7,7 @@ import { broadcastMessageFromData } from '../../../../server/modules/watchers/li import { API } from '../../../api/server'; import { FileUpload } from '../../../file-upload/server'; import { deleteRoom } from '../../../lib/server/functions/deleteRoom'; +import { notifyOnRoomChanged, notifyOnRoomChangedById } from '../../../lib/server/lib/notifyListener'; import { notifyUsersOnMessage } from '../../../lib/server/lib/notifyUsersOnMessage'; import { sendAllNotifications } from '../../../lib/server/lib/sendNotificationsOnMessage'; import { processThreads } from '../../../threads/server/hooks/aftersavemessage'; @@ -48,12 +49,18 @@ const eventHandlers = { if (persistedRoom) { // Update the federation await Rooms.updateOne({ _id: persistedRoom._id }, { $set: { federation: room.federation } }); + + // Notify watch.rooms listener + void notifyOnRoomChangedById(room._id); } else { // Denormalize room const denormalizedRoom = normalizers.denormalizeRoom(room); // Create the room - await Rooms.insertOne(denormalizedRoom); + const insertedRoom = await Rooms.insertOne(denormalizedRoom); + + // Notify watch.rooms listener + void notifyOnRoomChangedById(insertedRoom.insertedId); } } return eventResult; @@ -74,6 +81,9 @@ const eventHandlers = { if (persistedRoom) { // Delete the room await deleteRoom(roomId); + + // Notify watch.rooms listener + void notifyOnRoomChanged(persistedRoom, 'removed'); } // Remove all room events @@ -145,6 +155,9 @@ const eventHandlers = { // Update the room's federation property await Rooms.updateOne({ _id: roomId }, { $set: { 'federation.domains': domainsAfterAdd } }); + + // Notify watch.rooms listener + void notifyOnRoomChangedById(roomId); } } @@ -171,6 +184,9 @@ const eventHandlers = { // Update the room's federation property await Rooms.updateOne({ _id: roomId }, { $set: { 'federation.domains': domainsAfterRemoval } }); + + // Notify watch.rooms listener + void notifyOnRoomChangedById(roomId); } return eventResult; @@ -196,6 +212,9 @@ const eventHandlers = { // Update the room's federation property await Rooms.updateOne({ _id: roomId }, { $set: { 'federation.domains': domainsAfterRemoval } }); + + // Notify watch.rooms listener + void notifyOnRoomChangedById(roomId); } return eventResult; @@ -475,6 +494,9 @@ const eventHandlers = { // Mute user await Rooms.muteUsernameByRoomId(roomId, denormalizedUser.username); + + // Broadcast the unmute event + void notifyOnRoomChangedById(roomId); } return eventResult; @@ -497,6 +519,9 @@ const eventHandlers = { // Unmute user await Rooms.unmuteMutedUsernameByRoomId(roomId, denormalizedUser.username); + + // Broadcast the unmute event + void notifyOnRoomChangedById(roomId); } return eventResult; diff --git a/apps/meteor/app/file-upload/server/methods/sendFileMessage.ts b/apps/meteor/app/file-upload/server/methods/sendFileMessage.ts index 08e3225ad9a1..e4ca2ab729d8 100644 --- a/apps/meteor/app/file-upload/server/methods/sendFileMessage.ts +++ b/apps/meteor/app/file-upload/server/methods/sendFileMessage.ts @@ -186,8 +186,6 @@ export const sendFileMessage = async ( msg: Match.Optional(String), tmid: Match.Optional(String), customFields: Match.Optional(String), - t: Match.Optional(String), - e2e: Match.Optional(String), }), ); diff --git a/apps/meteor/app/integrations/server/lib/triggerHandler.js b/apps/meteor/app/integrations/server/lib/triggerHandler.js index 07f7a3d903a2..7a2992f91510 100644 --- a/apps/meteor/app/integrations/server/lib/triggerHandler.js +++ b/apps/meteor/app/integrations/server/lib/triggerHandler.js @@ -6,6 +6,7 @@ import _ from 'underscore'; import { getRoomByNameOrIdWithOptionToJoin } from '../../../lib/server/functions/getRoomByNameOrIdWithOptionToJoin'; import { processWebhookMessage } from '../../../lib/server/functions/processWebhookMessage'; +import { notifyOnIntegrationChangedById } from '../../../lib/server/lib/notifyListener'; import { settings } from '../../../settings/server'; import { outgoingEvents } from '../../lib/outgoingEvents'; import { outgoingLogger } from '../logger'; @@ -579,6 +580,7 @@ class RocketChatIntegrationHandler { await updateHistory({ historyId, step: 'after-process-http-status-410', error: true }); outgoingLogger.error(`Disabling the Integration "${trigger.name}" because the status code was 401 (Gone).`); await Integrations.updateOne({ _id: trigger._id }, { $set: { enabled: false } }); + void notifyOnIntegrationChangedById(trigger._id); return; } diff --git a/apps/meteor/app/integrations/server/methods/incoming/addIncomingIntegration.ts b/apps/meteor/app/integrations/server/methods/incoming/addIncomingIntegration.ts index 45548a17a565..db058bec960b 100644 --- a/apps/meteor/app/integrations/server/methods/incoming/addIncomingIntegration.ts +++ b/apps/meteor/app/integrations/server/methods/incoming/addIncomingIntegration.ts @@ -8,6 +8,7 @@ import { Meteor } from 'meteor/meteor'; import _ from 'underscore'; import { hasPermissionAsync, hasAllPermissionAsync } from '../../../../authorization/server/functions/hasPermission'; +import { notifyOnIntegrationChanged } from '../../../../lib/server/lib/notifyListener'; import { validateScriptEngine, isScriptEngineFrozen } from '../../lib/validateScriptEngine'; const validChannelChars = ['@', '#']; @@ -155,9 +156,13 @@ export const addIncomingIntegration = async (userId: string, integration: INewIn await Roles.addUserRoles(user._id, ['bot']); - const result = await Integrations.insertOne(integrationData); + const { insertedId } = await Integrations.insertOne(integrationData); - integrationData._id = result.insertedId; + if (insertedId) { + void notifyOnIntegrationChanged({ ...integrationData, _id: insertedId }, 'inserted'); + } + + integrationData._id = insertedId; return integrationData; }; diff --git a/apps/meteor/app/integrations/server/methods/incoming/deleteIncomingIntegration.ts b/apps/meteor/app/integrations/server/methods/incoming/deleteIncomingIntegration.ts index 06fb3e3485e3..e73a46bb27db 100644 --- a/apps/meteor/app/integrations/server/methods/incoming/deleteIncomingIntegration.ts +++ b/apps/meteor/app/integrations/server/methods/incoming/deleteIncomingIntegration.ts @@ -3,6 +3,7 @@ import type { ServerMethods } from '@rocket.chat/ui-contexts'; import { Meteor } from 'meteor/meteor'; import { hasPermissionAsync } from '../../../../authorization/server/functions/hasPermission'; +import { notifyOnIntegrationChangedById } from '../../../../lib/server/lib/notifyListener'; declare module '@rocket.chat/ui-contexts' { // eslint-disable-next-line @typescript-eslint/naming-convention @@ -34,6 +35,7 @@ export const deleteIncomingIntegration = async (integrationId: string, userId: s } await Integrations.removeById(integrationId); + void notifyOnIntegrationChangedById(integrationId, 'removed'); }; Meteor.methods({ diff --git a/apps/meteor/app/integrations/server/methods/incoming/updateIncomingIntegration.ts b/apps/meteor/app/integrations/server/methods/incoming/updateIncomingIntegration.ts index 5358e3233ce7..0ea5028130da 100644 --- a/apps/meteor/app/integrations/server/methods/incoming/updateIncomingIntegration.ts +++ b/apps/meteor/app/integrations/server/methods/incoming/updateIncomingIntegration.ts @@ -7,6 +7,7 @@ import { Meteor } from 'meteor/meteor'; import _ from 'underscore'; import { hasAllPermissionAsync, hasPermissionAsync } from '../../../../authorization/server/functions/hasPermission'; +import { notifyOnIntegrationChanged } from '../../../../lib/server/lib/notifyListener'; import { isScriptEngineFrozen, validateScriptEngine } from '../../lib/validateScriptEngine'; const validChannelChars = ['@', '#']; @@ -164,7 +165,7 @@ Meteor.methods({ await Roles.addUserRoles(user._id, ['bot']); - await Integrations.updateOne( + const updatedIntegration = await Integrations.findOneAndUpdate( { _id: integrationId }, { $set: { @@ -190,6 +191,10 @@ Meteor.methods({ }, ); - return Integrations.findOneById(integrationId); + if (updatedIntegration.value) { + void notifyOnIntegrationChanged(updatedIntegration.value); + } + + return updatedIntegration.value; }, }); diff --git a/apps/meteor/app/integrations/server/methods/outgoing/addOutgoingIntegration.ts b/apps/meteor/app/integrations/server/methods/outgoing/addOutgoingIntegration.ts index 59879f99d475..c8dc31e08446 100644 --- a/apps/meteor/app/integrations/server/methods/outgoing/addOutgoingIntegration.ts +++ b/apps/meteor/app/integrations/server/methods/outgoing/addOutgoingIntegration.ts @@ -5,6 +5,7 @@ import { Match, check } from 'meteor/check'; import { Meteor } from 'meteor/meteor'; import { hasPermissionAsync } from '../../../../authorization/server/functions/hasPermission'; +import { notifyOnIntegrationChanged } from '../../../../lib/server/lib/notifyListener'; import { validateOutgoingIntegration } from '../../lib/validateOutgoingIntegration'; import { validateScriptEngine } from '../../lib/validateScriptEngine'; @@ -58,8 +59,13 @@ export const addOutgoingIntegration = async (userId: string, integration: INewOu const integrationData = await validateOutgoingIntegration(integration, userId); - const result = await Integrations.insertOne(integrationData); - integrationData._id = result.insertedId; + const { insertedId } = await Integrations.insertOne(integrationData); + + if (insertedId) { + void notifyOnIntegrationChanged({ ...integrationData, _id: insertedId }, 'inserted'); + } + + integrationData._id = insertedId; return integrationData; }; diff --git a/apps/meteor/app/integrations/server/methods/outgoing/deleteOutgoingIntegration.ts b/apps/meteor/app/integrations/server/methods/outgoing/deleteOutgoingIntegration.ts index 27750bca50f2..cc3d138c554a 100644 --- a/apps/meteor/app/integrations/server/methods/outgoing/deleteOutgoingIntegration.ts +++ b/apps/meteor/app/integrations/server/methods/outgoing/deleteOutgoingIntegration.ts @@ -3,6 +3,7 @@ import type { ServerMethods } from '@rocket.chat/ui-contexts'; import { Meteor } from 'meteor/meteor'; import { hasPermissionAsync } from '../../../../authorization/server/functions/hasPermission'; +import { notifyOnIntegrationChangedById } from '../../../../lib/server/lib/notifyListener'; declare module '@rocket.chat/ui-contexts' { // eslint-disable-next-line @typescript-eslint/naming-convention @@ -41,6 +42,7 @@ export const deleteOutgoingIntegration = async (integrationId: string, userId: s await Integrations.removeById(integrationId); await IntegrationHistory.removeByIntegrationId(integrationId); + void notifyOnIntegrationChangedById(integrationId, 'removed'); }; Meteor.methods({ diff --git a/apps/meteor/app/integrations/server/methods/outgoing/updateOutgoingIntegration.ts b/apps/meteor/app/integrations/server/methods/outgoing/updateOutgoingIntegration.ts index 9e62561ebf9a..116dbd043039 100644 --- a/apps/meteor/app/integrations/server/methods/outgoing/updateOutgoingIntegration.ts +++ b/apps/meteor/app/integrations/server/methods/outgoing/updateOutgoingIntegration.ts @@ -5,6 +5,7 @@ import type { ServerMethods } from '@rocket.chat/ui-contexts'; import { Meteor } from 'meteor/meteor'; import { hasPermissionAsync } from '../../../../authorization/server/functions/hasPermission'; +import { notifyOnIntegrationChanged } from '../../../../lib/server/lib/notifyListener'; import { validateOutgoingIntegration } from '../../lib/validateOutgoingIntegration'; import { isScriptEngineFrozen, validateScriptEngine } from '../../lib/validateScriptEngine'; @@ -66,7 +67,7 @@ Meteor.methods({ const isFrozen = isScriptEngineFrozen(scriptEngine); - await Integrations.updateOne( + const updatedIntegration = await Integrations.findOneAndUpdate( { _id: integrationId }, { $set: { @@ -110,6 +111,10 @@ Meteor.methods({ }, ); - return Integrations.findOneById(integrationId); + if (updatedIntegration.value) { + await notifyOnIntegrationChanged(updatedIntegration.value); + } + + return updatedIntegration.value; }, }); diff --git a/apps/meteor/app/lib/server/functions/addUserToRoom.ts b/apps/meteor/app/lib/server/functions/addUserToRoom.ts index 1fc80c6f3a44..e377ba3c4600 100644 --- a/apps/meteor/app/lib/server/functions/addUserToRoom.ts +++ b/apps/meteor/app/lib/server/functions/addUserToRoom.ts @@ -10,6 +10,7 @@ import { callbacks } from '../../../../lib/callbacks'; import { getSubscriptionAutotranslateDefaultConfig } from '../../../../server/lib/getSubscriptionAutotranslateDefaultConfig'; import { roomCoordinator } from '../../../../server/lib/rooms/roomCoordinator'; import { getDefaultSubscriptionPref } from '../../../utils/lib/getDefaultSubscriptionPref'; +import { notifyOnRoomChangedById } from '../lib/notifyListener'; export const addUserToRoom = async function ( rid: string, @@ -85,6 +86,8 @@ export const addUserToRoom = async function ( ...getDefaultSubscriptionPref(userToBeAdded as IUser), }); + void notifyOnRoomChangedById(rid); + if (!userToBeAdded.username) { throw new Meteor.Error('error-invalid-user', 'Cannot add an user to a room without a username'); } diff --git a/apps/meteor/app/lib/server/functions/archiveRoom.ts b/apps/meteor/app/lib/server/functions/archiveRoom.ts index 01bb882aa144..3378d69f99ff 100644 --- a/apps/meteor/app/lib/server/functions/archiveRoom.ts +++ b/apps/meteor/app/lib/server/functions/archiveRoom.ts @@ -3,11 +3,18 @@ import type { IMessage } from '@rocket.chat/core-typings'; import { Rooms, Subscriptions } from '@rocket.chat/models'; import { callbacks } from '../../../../lib/callbacks'; +import { notifyOnRoomChanged } from '../lib/notifyListener'; export const archiveRoom = async function (rid: string, user: IMessage['u']): Promise { await Rooms.archiveById(rid); await Subscriptions.archiveByRoomId(rid); await Message.saveSystemMessage('room-archived', rid, '', user); - await callbacks.run('afterRoomArchived', await Rooms.findOneById(rid), user); + const room = await Rooms.findOneById(rid); + + await callbacks.run('afterRoomArchived', room, user); + + if (room) { + void notifyOnRoomChanged(room); + } }; diff --git a/apps/meteor/app/lib/server/functions/cleanRoomHistory.ts b/apps/meteor/app/lib/server/functions/cleanRoomHistory.ts index 133eba555a69..f53061995152 100644 --- a/apps/meteor/app/lib/server/functions/cleanRoomHistory.ts +++ b/apps/meteor/app/lib/server/functions/cleanRoomHistory.ts @@ -4,6 +4,7 @@ import { Messages, Rooms, Subscriptions, ReadReceipts, Users } from '@rocket.cha import { i18n } from '../../../../server/lib/i18n'; import { FileUpload } from '../../../file-upload/server'; +import { notifyOnRoomChangedById } from '../lib/notifyListener'; import { deleteRoom } from './deleteRoom'; export async function cleanRoomHistory({ @@ -114,6 +115,8 @@ export async function cleanRoomHistory({ await Rooms.resetLastMessageById(rid, lastMessage, -count); + void notifyOnRoomChangedById(rid); + void api.broadcast('notify.deleteMessageBulk', rid, { rid, excludePinned, @@ -123,5 +126,6 @@ export async function cleanRoomHistory({ ids: selectedMessageIds, }); } + return count; } diff --git a/apps/meteor/app/lib/server/functions/createDirectRoom.ts b/apps/meteor/app/lib/server/functions/createDirectRoom.ts index c1de81332543..67c6328f38f4 100644 --- a/apps/meteor/app/lib/server/functions/createDirectRoom.ts +++ b/apps/meteor/app/lib/server/functions/createDirectRoom.ts @@ -11,6 +11,7 @@ import { callbacks } from '../../../../lib/callbacks'; import { isTruthy } from '../../../../lib/isTruthy'; import { settings } from '../../../settings/server'; import { getDefaultSubscriptionPref } from '../../../utils/lib/getDefaultSubscriptionPref'; +import { notifyOnRoomChangedById } from '../lib/notifyListener'; const generateSubscription = ( fname: string, @@ -130,6 +131,8 @@ export async function createDirectRoom( // @ts-expect-error - TODO: room expects `u` to be passed, but it's not part of the original object in here const rid = room?._id || (await Rooms.insertOne(roomInfo)).insertedId; + void notifyOnRoomChangedById(rid, isNewRoom ? 'inserted' : 'updated'); + if (roomMembers.length === 1) { // dm to yourself await Subscriptions.updateOne( diff --git a/apps/meteor/app/lib/server/functions/createRoom.ts b/apps/meteor/app/lib/server/functions/createRoom.ts index 2d0b94198d96..19e5fb2f9489 100644 --- a/apps/meteor/app/lib/server/functions/createRoom.ts +++ b/apps/meteor/app/lib/server/functions/createRoom.ts @@ -12,6 +12,7 @@ import { beforeCreateRoomCallback } from '../../../../lib/callbacks/beforeCreate import { getSubscriptionAutotranslateDefaultConfig } from '../../../../server/lib/getSubscriptionAutotranslateDefaultConfig'; import { getDefaultSubscriptionPref } from '../../../utils/lib/getDefaultSubscriptionPref'; import { getValidRoomName } from '../../../utils/server/lib/getValidRoomName'; +import { notifyOnRoomChanged } from '../lib/notifyListener'; import { createDirectRoom } from './createDirectRoom'; const isValidName = (name: unknown): name is string => { @@ -117,6 +118,7 @@ export const createRoom = async ( } > => { const { teamId, ...extraData } = roomExtraData || ({} as IRoom); + await beforeCreateRoomCallback.run({ type, // name, @@ -124,9 +126,9 @@ export const createRoom = async ( // members, // readOnly, extraData, - // options, }); + if (type === 'd') { return createDirectRoom(members as IUser[], extraData, { ...options, creator: options?.creator || owner?.username }); } @@ -226,6 +228,8 @@ export const createRoom = async ( const room = await Rooms.createWithFullRoomData(roomProps); + void notifyOnRoomChanged(room, 'inserted'); + const shouldBeHandledByFederation = room.federated === true || owner.username.includes(':'); await createUsersSubscriptions({ room, members, now, owner, options, shouldBeHandledByFederation }); diff --git a/apps/meteor/app/lib/server/functions/deleteMessage.ts b/apps/meteor/app/lib/server/functions/deleteMessage.ts index 9368787bf7ea..4582a88823ec 100644 --- a/apps/meteor/app/lib/server/functions/deleteMessage.ts +++ b/apps/meteor/app/lib/server/functions/deleteMessage.ts @@ -9,6 +9,7 @@ import { broadcastMessageFromData } from '../../../../server/modules/watchers/li import { canDeleteMessageAsync } from '../../../authorization/server/functions/canDeleteMessage'; import { FileUpload } from '../../../file-upload/server'; import { settings } from '../../../settings/server'; +import { notifyOnRoomChangedById } from '../lib/notifyListener'; export const deleteMessageValidatingPermission = async (message: AtLeast, userId: IUser['_id']): Promise => { if (!message?._id) { @@ -89,6 +90,8 @@ export async function deleteMessage(message: IMessage, user: IUser): Promise { await FileUpload.removeFilesByRoomId(rid); @@ -11,4 +12,6 @@ export const deleteRoom = async function (rid: string): Promise { await FileUpload.getStore('Avatars').deleteByRoomId(rid); await callbacks.run('afterDeleteRoom', rid); await Rooms.removeById(rid); + + void notifyOnRoomChangedById(rid, 'removed'); }; diff --git a/apps/meteor/app/lib/server/functions/deleteUser.ts b/apps/meteor/app/lib/server/functions/deleteUser.ts index 24ef854d48f3..3af123a72bf7 100644 --- a/apps/meteor/app/lib/server/functions/deleteUser.ts +++ b/apps/meteor/app/lib/server/functions/deleteUser.ts @@ -19,6 +19,7 @@ import { callbacks } from '../../../../lib/callbacks'; import { i18n } from '../../../../server/lib/i18n'; import { FileUpload } from '../../../file-upload/server'; import { settings } from '../../../settings/server'; +import { notifyOnRoomChangedById, notifyOnIntegrationChangedByUserId } from '../lib/notifyListener'; import { getSubscribedRoomsForUserWithDetails, shouldRemoveOrChangeOwner } from './getRoomsWithSingleOwner'; import { getUserSingleOwnedRooms } from './getUserSingleOwnedRooms'; import { relinquishRoomOwnerships } from './relinquishRoomOwnerships'; @@ -89,6 +90,9 @@ export async function deleteUser(userId: string, confirmRelinquish = false, dele await Rooms.updateGroupDMsRemovingUsernamesByUsername(user.username, userId); // Remove direct rooms with the user await Rooms.removeDirectRoomContainingUsername(user.username); // Remove direct rooms with the user + const rids = subscribedRooms.map((room) => room.rid); + void notifyOnRoomChangedById(rids); + await Subscriptions.removeByUserId(userId); // Remove user subscriptions if (user.roles.includes('livechat-agent')) { @@ -110,7 +114,9 @@ export async function deleteUser(userId: string, confirmRelinquish = false, dele await FileUpload.getStore('Avatars').deleteByName(user.username); } - await Integrations.disableByUserId(userId); // Disables all the integrations which rely on the user being deleted. + // Disables all the integrations which rely on the user being deleted. + await Integrations.disableByUserId(userId); + void notifyOnIntegrationChangedByUserId(userId); // Don't broadcast user.deleted for Erasure Type of 'Keep' so that messages don't disappear from logged in sessions if (messageErasureType === 'Delete') { diff --git a/apps/meteor/app/lib/server/functions/removeUserFromRoom.ts b/apps/meteor/app/lib/server/functions/removeUserFromRoom.ts index 1cc8c4ad5432..e593b3508054 100644 --- a/apps/meteor/app/lib/server/functions/removeUserFromRoom.ts +++ b/apps/meteor/app/lib/server/functions/removeUserFromRoom.ts @@ -7,6 +7,7 @@ import { Meteor } from 'meteor/meteor'; import { afterLeaveRoomCallback } from '../../../../lib/callbacks/afterLeaveRoomCallback'; import { beforeLeaveRoomCallback } from '../../../../lib/callbacks/beforeLeaveRoomCallback'; +import { notifyOnRoomChangedById } from '../lib/notifyListener'; export const removeUserFromRoom = async function ( rid: string, @@ -67,5 +68,7 @@ export const removeUserFromRoom = async function ( // TODO: CACHE: maybe a queue? await afterLeaveRoomCallback.run(user, room); + void notifyOnRoomChangedById(rid); + await Apps.self?.triggerEvent(AppEvents.IPostRoomUserLeave, room, user); }; diff --git a/apps/meteor/app/lib/server/functions/saveUserIdentity.ts b/apps/meteor/app/lib/server/functions/saveUserIdentity.ts index 34ca0ca246db..0b9ff21e53e3 100644 --- a/apps/meteor/app/lib/server/functions/saveUserIdentity.ts +++ b/apps/meteor/app/lib/server/functions/saveUserIdentity.ts @@ -3,6 +3,7 @@ import { Messages, VideoConference, LivechatDepartmentAgents, Rooms, Subscriptio import { SystemLogger } from '../../../../server/lib/logger/system'; import { FileUpload } from '../../../file-upload/server'; +import { notifyOnRoomChangedByUsernamesOrUids } from '../lib/notifyListener'; import { _setRealName } from './setRealName'; import { _setUsername } from './setUsername'; import { updateGroupDMsName } from './updateGroupDMsName'; @@ -134,6 +135,8 @@ async function updateUsernameReferences({ await Subscriptions.setUserUsernameByUserId(user._id, username); await LivechatDepartmentAgents.replaceUsernameOfAgentByUserId(user._id, username); + + void notifyOnRoomChangedByUsernamesOrUids([user._id], [previousUsername, username]); } // update other references if either the name or username has changed diff --git a/apps/meteor/app/lib/server/functions/sendMessage.ts b/apps/meteor/app/lib/server/functions/sendMessage.ts index e167b372b008..d850f69a93a4 100644 --- a/apps/meteor/app/lib/server/functions/sendMessage.ts +++ b/apps/meteor/app/lib/server/functions/sendMessage.ts @@ -1,5 +1,5 @@ import { Apps } from '@rocket.chat/apps'; -import { Message, api } from '@rocket.chat/core-services'; +import { api, Message } from '@rocket.chat/core-services'; import type { IMessage, IRoom } from '@rocket.chat/core-typings'; import { Messages } from '@rocket.chat/models'; import { Match, check } from 'meteor/check'; @@ -11,6 +11,7 @@ import { broadcastMessageFromData } from '../../../../server/modules/watchers/li import { hasPermissionAsync } from '../../../authorization/server/functions/hasPermission'; import { FileUpload } from '../../../file-upload/server'; import { settings } from '../../../settings/server'; +import { notifyOnRoomChangedById } from '../lib/notifyListener'; import { validateCustomMessageFields } from '../lib/validateCustomMessageFields'; import { parseUrlsInMessage } from './parseUrlsInMessage'; @@ -289,12 +290,13 @@ export const sendMessage = async function (user: any, message: any, room: any, u void Apps.getBridges()?.getListenerBridge().messageEvent('IPostMessageSent', message); } - /* Defer other updates as their return is not interesting to the user */ - - // Execute all callbacks await callbacks.run('afterSaveMessage', message, room); + void broadcastMessageFromData({ id: message._id, }); + + void notifyOnRoomChangedById(message.rid); + return message; }; diff --git a/apps/meteor/app/lib/server/functions/setUserActiveStatus.ts b/apps/meteor/app/lib/server/functions/setUserActiveStatus.ts index 2d99fb427a46..fabf59669450 100644 --- a/apps/meteor/app/lib/server/functions/setUserActiveStatus.ts +++ b/apps/meteor/app/lib/server/functions/setUserActiveStatus.ts @@ -8,6 +8,7 @@ import { Meteor } from 'meteor/meteor'; import { callbacks } from '../../../../lib/callbacks'; import * as Mailer from '../../../mailer/server/api'; import { settings } from '../../../settings/server'; +import { notifyOnRoomChangedById, notifyOnRoomChangedByUserDM } from '../lib/notifyListener'; import { closeOmnichannelConversations } from './closeOmnichannelConversations'; import { shouldRemoveOrChangeOwner, getSubscribedRoomsForUserWithDetails } from './getRoomsWithSingleOwner'; import { getUserSingleOwnedRooms } from './getUserSingleOwnedRooms'; @@ -38,6 +39,7 @@ async function reactivateDirectConversations(userId: string) { }, []); await Rooms.setDmReadOnlyByUserId(userId, roomsToReactivate, false, false); + void notifyOnRoomChangedById(roomsToReactivate); } export async function setUserActiveStatus(userId: string, active: boolean, confirmRelinquish = false): Promise { @@ -105,6 +107,7 @@ export async function setUserActiveStatus(userId: string, active: boolean, confi if (active === false) { await Users.unsetLoginTokens(userId); await Rooms.setDmReadOnlyByUserId(userId, undefined, true, false); + void notifyOnRoomChangedByUserDM(userId); } else { await Users.unsetReason(userId); await reactivateDirectConversations(userId); diff --git a/apps/meteor/app/lib/server/functions/unarchiveRoom.ts b/apps/meteor/app/lib/server/functions/unarchiveRoom.ts index f068827d5c7c..7db86ed933a3 100644 --- a/apps/meteor/app/lib/server/functions/unarchiveRoom.ts +++ b/apps/meteor/app/lib/server/functions/unarchiveRoom.ts @@ -2,8 +2,12 @@ import { Message } from '@rocket.chat/core-services'; import type { IMessage } from '@rocket.chat/core-typings'; import { Rooms, Subscriptions } from '@rocket.chat/models'; +import { notifyOnRoomChangedById } from '../lib/notifyListener'; + export const unarchiveRoom = async function (rid: string, user: IMessage['u']): Promise { await Rooms.unarchiveById(rid); await Subscriptions.unarchiveByRoomId(rid); await Message.saveSystemMessage('room-unarchived', rid, '', user); + + void notifyOnRoomChangedById(rid); }; diff --git a/apps/meteor/app/lib/server/functions/updateMessage.ts b/apps/meteor/app/lib/server/functions/updateMessage.ts index 8fdfc964db4e..8327b0892b26 100644 --- a/apps/meteor/app/lib/server/functions/updateMessage.ts +++ b/apps/meteor/app/lib/server/functions/updateMessage.ts @@ -7,6 +7,7 @@ import { Meteor } from 'meteor/meteor'; import { callbacks } from '../../../../lib/callbacks'; import { broadcastMessageFromData } from '../../../../server/modules/watchers/lib/messages'; import { settings } from '../../../settings/server'; +import { notifyOnRoomChangedById } from '../lib/notifyListener'; import { validateCustomMessageFields } from '../lib/validateCustomMessageFields'; import { parseUrlsInMessage } from './parseUrlsInMessage'; @@ -95,10 +96,15 @@ export const updateMessage = async function ( const msg = await Messages.findOneById(_id); if (msg) { await callbacks.run('afterSaveMessage', msg, room, user._id); + void broadcastMessageFromData({ id: msg._id, data: msg, }); + + if (room?.lastMessage?._id === msg._id) { + void notifyOnRoomChangedById(message.rid); + } } }); }; diff --git a/apps/meteor/app/lib/server/lib/notifyListener.ts b/apps/meteor/app/lib/server/lib/notifyListener.ts new file mode 100644 index 000000000000..c019eba0db7a --- /dev/null +++ b/apps/meteor/app/lib/server/lib/notifyListener.ts @@ -0,0 +1,256 @@ +import { api, dbWatchersDisabled } from '@rocket.chat/core-services'; +import type { + IRocketChatRecord, + IRoom, + ILoginServiceConfiguration, + ISetting, + IRole, + IPermission, + IIntegration, + IPbxEvent, + LoginServiceConfiguration as LoginServiceConfigurationData, + ILivechatPriority, +} from '@rocket.chat/core-typings'; +import { Rooms, Permissions, Settings, PbxEvents, Roles, Integrations, LoginServiceConfiguration } from '@rocket.chat/models'; + +type ClientAction = 'inserted' | 'updated' | 'removed'; + +export async function notifyOnLivechatPriorityChanged( + data: Pick, + clientAction: ClientAction = 'updated', +): Promise { + if (!dbWatchersDisabled) { + return; + } + + const { _id, ...rest } = data; + + void api.broadcast('watch.priorities', { clientAction, id: _id, diff: { ...rest } }); +} + +export async function notifyOnRoomChanged( + data: T | T[], + clientAction: ClientAction = 'updated', +): Promise { + if (!dbWatchersDisabled) { + return; + } + + const items = Array.isArray(data) ? data : [data]; + + for (const item of items) { + void api.broadcast('watch.rooms', { clientAction, room: item }); + } +} + +export async function notifyOnRoomChangedById( + ids: T['_id'] | T['_id'][], + clientAction: ClientAction = 'updated', +): Promise { + if (!dbWatchersDisabled) { + return; + } + + const eligibleIds = Array.isArray(ids) ? ids : [ids]; + + const items = Rooms.findByIds(eligibleIds); + + for await (const item of items) { + void api.broadcast('watch.rooms', { clientAction, room: item }); + } +} + +export async function notifyOnRoomChangedByUsernamesOrUids( + uids: T['u']['_id'][], + usernames: T['u']['username'][], + clientAction: ClientAction = 'updated', +): Promise { + if (!dbWatchersDisabled) { + return; + } + + const items = Rooms.findByUsernamesOrUids(uids, usernames); + + for await (const item of items) { + void api.broadcast('watch.rooms', { clientAction, room: item }); + } +} + +export async function notifyOnRoomChangedByUserDM( + userId: T['u']['_id'], + clientAction: ClientAction = 'updated', +): Promise { + if (!dbWatchersDisabled) { + return; + } + + const items = Rooms.findDMsByUids([userId]); + + for await (const item of items) { + void api.broadcast('watch.rooms', { clientAction, room: item }); + } +} + +export async function notifyOnSettingChanged(setting: ISetting, clientAction: ClientAction = 'updated'): Promise { + if (!dbWatchersDisabled) { + return; + } + + void api.broadcast('watch.settings', { clientAction, setting }); +} + +export async function notifyOnPermissionChanged(permission: IPermission, clientAction: ClientAction = 'updated'): Promise { + if (!dbWatchersDisabled) { + return; + } + + void api.broadcast('permission.changed', { clientAction, data: permission }); + + if (permission.level === 'settings' && permission.settingId) { + const setting = await Settings.findOneNotHiddenById(permission.settingId); + if (!setting) { + return; + } + void notifyOnSettingChanged(setting, 'updated'); + } +} + +export async function notifyOnPermissionChangedById(pid: IPermission['_id'], clientAction: ClientAction = 'updated'): Promise { + if (!dbWatchersDisabled) { + return; + } + + const permission = await Permissions.findOneById(pid); + if (!permission) { + return; + } + + return notifyOnPermissionChanged(permission, clientAction); +} + +export async function notifyOnPbxEventChangedById( + id: T['_id'], + clientAction: ClientAction = 'updated', +): Promise { + if (!dbWatchersDisabled) { + return; + } + + const item = await PbxEvents.findOneById(id); + if (!item) { + return; + } + + void api.broadcast('watch.pbxevents', { clientAction, id, data: item }); +} + +export async function notifyOnRoleChanged(role: T, clientAction: 'removed' | 'changed' = 'changed'): Promise { + if (!dbWatchersDisabled) { + return; + } + + void api.broadcast('watch.roles', { clientAction, role }); +} + +export async function notifyOnRoleChangedById( + id: T['_id'], + clientAction: 'removed' | 'changed' = 'changed', +): Promise { + if (!dbWatchersDisabled) { + return; + } + + const role = await Roles.findOneById(id); + if (!role) { + return; + } + + void notifyOnRoleChanged(role, clientAction); +} + +export async function notifyOnLoginServiceConfigurationChanged( + service: Partial & Pick, + clientAction: ClientAction = 'updated', +): Promise { + if (!dbWatchersDisabled) { + return; + } + + void api.broadcast('watch.loginServiceConfiguration', { + clientAction, + id: service._id, + data: service, + }); +} + +export async function notifyOnLoginServiceConfigurationChangedByService( + service: T['service'], + clientAction: ClientAction = 'updated', +): Promise { + if (!dbWatchersDisabled) { + return; + } + + const item = await LoginServiceConfiguration.findOneByService>(service, { + projection: { secret: 0 }, + }); + if (!item) { + return; + } + + void notifyOnLoginServiceConfigurationChanged(item, clientAction); +} + +export async function notifyOnIntegrationChanged(data: T, clientAction: ClientAction = 'updated'): Promise { + if (!dbWatchersDisabled) { + return; + } + + void api.broadcast('watch.integrations', { clientAction, id: data._id, data }); +} + +export async function notifyOnIntegrationChangedById( + id: T['_id'], + clientAction: ClientAction = 'updated', +): Promise { + if (!dbWatchersDisabled) { + return; + } + + const item = await Integrations.findOneById(id); + if (!item) { + return; + } + + void api.broadcast('watch.integrations', { clientAction, id: item._id, data: item }); +} + +export async function notifyOnIntegrationChangedByUserId( + id: T['userId'], + clientAction: ClientAction = 'updated', +): Promise { + if (!dbWatchersDisabled) { + return; + } + + const items = Integrations.findByUserId(id); + + for await (const item of items) { + void api.broadcast('watch.integrations', { clientAction, id: item._id, data: item }); + } +} + +export async function notifyOnIntegrationChangedByChannels( + channels: T['channel'], + clientAction: ClientAction = 'updated', +): Promise { + if (!dbWatchersDisabled) { + return; + } + + const items = Integrations.findByChannels(channels); + + for await (const item of items) { + void api.broadcast('watch.integrations', { clientAction, id: item._id, data: item }); + } +} diff --git a/apps/meteor/app/lib/server/methods/sendMessage.ts b/apps/meteor/app/lib/server/methods/sendMessage.ts index e12ebc2d47e9..5749daa980f3 100644 --- a/apps/meteor/app/lib/server/methods/sendMessage.ts +++ b/apps/meteor/app/lib/server/methods/sendMessage.ts @@ -87,8 +87,9 @@ export async function executeSendMessage(uid: IUser['_id'], message: AtLeast({ } if (isTheLastMessage(room, message)) { await Rooms.setLastMessagePinned(room._id, originalMessage.pinnedBy, originalMessage.pinned); + void notifyOnRoomChangedById(room._id); } const attachments: MessageAttachment[] = []; @@ -213,6 +215,7 @@ Meteor.methods({ if (isTheLastMessage(room, message)) { await Rooms.setLastMessagePinned(room._id, originalMessage.pinnedBy, originalMessage.pinned); + void notifyOnRoomChangedById(room._id); } // App IPostMessagePinned event hook diff --git a/apps/meteor/app/message-star/server/starMessage.ts b/apps/meteor/app/message-star/server/starMessage.ts index 7ac8fd619d31..4529efb63f6f 100644 --- a/apps/meteor/app/message-star/server/starMessage.ts +++ b/apps/meteor/app/message-star/server/starMessage.ts @@ -7,6 +7,7 @@ import { Meteor } from 'meteor/meteor'; import { broadcastMessageFromData } from '../../../server/modules/watchers/lib/messages'; import { canAccessRoomAsync, roomAccessAttributes } from '../../authorization/server'; import { isTheLastMessage } from '../../lib/server/functions/isTheLastMessage'; +import { notifyOnRoomChangedById } from '../../lib/server/lib/notifyListener'; import { settings } from '../../settings/server'; declare module '@rocket.chat/ui-contexts' { @@ -55,6 +56,7 @@ Meteor.methods({ if (isTheLastMessage(room, message)) { await Rooms.updateLastMessageStar(room._id, uid, message.starred); + void notifyOnRoomChangedById(room._id); } await Apps.self?.triggerEvent(AppEvents.IPostMessageStarred, message, await Meteor.userAsync(), message.starred); diff --git a/apps/meteor/app/meteor-accounts-saml/server/lib/settings.ts b/apps/meteor/app/meteor-accounts-saml/server/lib/settings.ts index 8f6791c36302..bb9567260337 100644 --- a/apps/meteor/app/meteor-accounts-saml/server/lib/settings.ts +++ b/apps/meteor/app/meteor-accounts-saml/server/lib/settings.ts @@ -3,6 +3,10 @@ import { LoginServiceConfiguration } from '@rocket.chat/models'; import { Meteor } from 'meteor/meteor'; import { SystemLogger } from '../../../../server/lib/logger/system'; +import { + notifyOnLoginServiceConfigurationChanged, + notifyOnLoginServiceConfigurationChangedByService, +} from '../../../lib/server/lib/notifyListener'; import { settings, settingsRegistry } from '../../../settings/server'; import type { IServiceProviderOptions } from '../definition/IServiceProviderOptions'; import { SAMLUtils } from './Utils'; @@ -117,9 +121,22 @@ export const loadSamlServiceProviders = async function (): Promise { const samlConfigs = getSamlConfigs(key); SAMLUtils.log(key); await LoginServiceConfiguration.createOrUpdateService(serviceName, samlConfigs); + void notifyOnLoginServiceConfigurationChangedByService(serviceName); return configureSamlService(samlConfigs); } - await LoginServiceConfiguration.removeService(serviceName); + + const service = await LoginServiceConfiguration.findOneByService(serviceName, { projection: { _id: 1 } }); + if (!service?._id) { + return false; + } + + const { deletedCount } = await LoginServiceConfiguration.removeService(service._id); + if (!deletedCount) { + return false; + } + + void notifyOnLoginServiceConfigurationChanged({ _id: service._id }, 'removed'); + return false; }), ) diff --git a/apps/meteor/app/reactions/server/setReaction.ts b/apps/meteor/app/reactions/server/setReaction.ts index 36eaab695512..896e5041bd61 100644 --- a/apps/meteor/app/reactions/server/setReaction.ts +++ b/apps/meteor/app/reactions/server/setReaction.ts @@ -13,6 +13,7 @@ import { canAccessRoomAsync } from '../../authorization/server'; import { hasPermissionAsync } from '../../authorization/server/functions/hasPermission'; import { emoji } from '../../emoji/server'; import { isTheLastMessage } from '../../lib/server/functions/isTheLastMessage'; +import { notifyOnRoomChangedById } from '../../lib/server/lib/notifyListener'; const removeUserReaction = (message: IMessage, reaction: string, username: string) => { if (!message.reactions) { @@ -74,6 +75,7 @@ async function setReaction(room: IRoom, user: IUser, message: IMessage, reaction delete message.reactions; if (isTheLastMessage(room, message)) { await Rooms.unsetReactionsInLastMessage(room._id); + void notifyOnRoomChangedById(room._id); } await Messages.unsetReactions(message._id); } else { @@ -99,6 +101,7 @@ async function setReaction(room: IRoom, user: IUser, message: IMessage, reaction await Messages.setReactions(message._id, message.reactions); if (isTheLastMessage(room, message)) { await Rooms.setReactionsInLastMessage(room._id, message.reactions); + void notifyOnRoomChangedById(room._id); } await callbacks.run('setReaction', message._id, reaction); await callbacks.run('afterSetReaction', message, { user, reaction, shouldReact }); diff --git a/apps/meteor/app/voip/server/startup.ts b/apps/meteor/app/voip/server/startup.ts index d96206f12985..1c27b913d103 100644 --- a/apps/meteor/app/voip/server/startup.ts +++ b/apps/meteor/app/voip/server/startup.ts @@ -1,13 +1,13 @@ -import { Voip } from '@rocket.chat/core-services'; +import { VoipAsterisk } from '@rocket.chat/core-services'; import { settings } from '../../settings/server'; settings.watch('VoIP_Enabled', async (value: boolean) => { try { if (value) { - await Voip.init(); + await VoipAsterisk.init(); } else { - await Voip.stop(); + await VoipAsterisk.stop(); } } catch (e) { // do nothing @@ -21,7 +21,7 @@ settings.changeMultiple( // So to avoid stopping/starting voip too often, we debounce the call and restart 1 second after the last setting has reached us. if (settings.get('VoIP_Enabled')) { try { - await Voip.refresh(); + await VoipAsterisk.refresh(); } catch (e) { // do nothing } diff --git a/apps/meteor/client/components/AutoCompleteDepartmentMultiple.tsx b/apps/meteor/client/components/AutoCompleteDepartmentMultiple.tsx index 214bffc9841e..99af9a1f6a2c 100644 --- a/apps/meteor/client/components/AutoCompleteDepartmentMultiple.tsx +++ b/apps/meteor/client/components/AutoCompleteDepartmentMultiple.tsx @@ -1,4 +1,4 @@ -import { Option, PaginatedMultiSelectFiltered } from '@rocket.chat/fuselage'; +import { CheckOption, PaginatedMultiSelectFiltered } from '@rocket.chat/fuselage'; import type { PaginatedMultiSelectOption } from '@rocket.chat/fuselage'; import { useDebouncedValue } from '@rocket.chat/fuselage-hooks'; import { useTranslation } from '@rocket.chat/ui-contexts'; @@ -65,7 +65,13 @@ const AutoCompleteDepartmentMultiple = ({ return loadMoreDepartments(start, Math.min(50, departmentsTotal)); } } - renderItem={({ label, ...props }) =>