Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into feat/e2e-messages-…
Browse files Browse the repository at this point in the history
…mentions
  • Loading branch information
hugocostadev committed Jul 25, 2024
2 parents 6e374c3 + 978e2d1 commit 887d710
Show file tree
Hide file tree
Showing 372 changed files with 6,955 additions and 1,583 deletions.
6 changes: 6 additions & 0 deletions .changeset/chatty-hounds-hammer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@rocket.chat/meteor": patch
"@rocket.chat/fuselage-ui-kit": patch
---

Fix validations from "UiKit" modal component
5 changes: 5 additions & 0 deletions .changeset/chilled-yaks-beg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

Fixed issue in Marketplace that caused a subscription app to show incorrect modals when subscribing
6 changes: 6 additions & 0 deletions .changeset/cuddly-brooms-approve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@rocket.chat/meteor": minor
"@rocket.chat/i18n": minor
---

Allows admins to customize the `Subject` field of Omnichannel email transcripts via setting. By passing a value to the setting `Custom email subject for transcript`, system will use it as the `Subject` field, unless a custom subject is passed when requesting a transcript. If there's no custom subject and setting value is empty, the current default value will be used
6 changes: 6 additions & 0 deletions .changeset/dry-pumas-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@rocket.chat/meteor": patch
"@rocket.chat/livechat": patch
---

Fixed an issue that caused the widget to set the wrong department when using the setDepartment Livechat api endpoint in conjunction with a Livechat Trigger
8 changes: 8 additions & 0 deletions .changeset/empty-readers-teach.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@rocket.chat/meteor": patch
"@rocket.chat/tools": patch
"@rocket.chat/account-service": patch
---

Fixed an inconsistent evaluation of the `Accounts_LoginExpiration` setting over the codebase. In some places, it was being used as milliseconds while in others as days. Invalid values produced different results. A helper function was created to centralize the setting validation and the proper value being returned to avoid edge cases.
Negative values may be saved on the settings UI panel but the code will interpret any negative, NaN or 0 value to the default expiration which is 90 days.
5 changes: 5 additions & 0 deletions .changeset/funny-wolves-tie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Fixed issue where bad word filtering was not working in the UI for messages
5 changes: 5 additions & 0 deletions .changeset/grumpy-worms-appear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/i18n": patch
---

Fixed wrong wording on a federation setting
5 changes: 5 additions & 0 deletions .changeset/happy-peaches-nail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

Fixed issue with livechat agents not being able to leave omnichannel rooms if joining after a room has been closed by the visitor (due to race conditions)
5 changes: 5 additions & 0 deletions .changeset/hungry-wombats-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

Fixed an issue where non-encrypted attachments were not being downloaded
5 changes: 5 additions & 0 deletions .changeset/large-vans-attack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

fixed the contextual bar closing when editing thread messages instead of cancelling the message edit
5 changes: 5 additions & 0 deletions .changeset/lucky-countries-look.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Fixed the disappearance of some settings after navigation under network latency.
6 changes: 6 additions & 0 deletions .changeset/many-tables-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@rocket.chat/meteor": minor
"@rocket.chat/model-typings": minor
---

Fixed Livechat rooms being displayed in the Engagement Dashboard's "Channels" tab
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"@rocket.chat/meteor": patch
'@rocket.chat/meteor': minor
---

Fixed an issue where adding `OVERWRITE_SETTING_` for any setting wasn't immediately taking effect sometimes, and needed a server restart to reflect.
5 changes: 5 additions & 0 deletions .changeset/new-balloons-speak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Fixed web client crashing on Firefox private window. Firefox disables access to service workers inside private windows. Rocket.Chat needs service workers to process E2EE encrypted files on rooms. These types of files won't be available inside private windows, but the rest of E2EE encrypted features should work normally
12 changes: 12 additions & 0 deletions .changeset/new-scissors-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'@rocket.chat/omnichannel-services': minor
'@rocket.chat/pdf-worker': minor
'@rocket.chat/core-services': minor
'@rocket.chat/model-typings': minor
'@rocket.chat/i18n': minor
'@rocket.chat/meteor': minor
---

Added system messages support for Omnichannel PDF transcripts and email transcripts. Currently these transcripts don't render system messages and is shown as an empty message in PDF/email. This PR adds this support for all valid livechat system messages.

Also added a new setting under transcripts, to toggle the inclusion of system messages in email and PDF transcripts.
15 changes: 15 additions & 0 deletions .changeset/nice-laws-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
'rocketchat-services': minor
'@rocket.chat/core-services': minor
'@rocket.chat/model-typings': minor
'@rocket.chat/ui-video-conf': minor
'@rocket.chat/core-typings': minor
'@rocket.chat/ui-contexts': minor
'@rocket.chat/models': minor
'@rocket.chat/ui-kit': minor
'@rocket.chat/i18n': minor
'@rocket.chat/meteor': minor
---

New Feature: Video Conference Persistent Chat.
This feature provides a discussion id for conference provider apps to store the chat messages exchanged during the conferences, so that those users may then access those messages again at any time through Rocket.Chat.
5 changes: 5 additions & 0 deletions .changeset/perfect-coins-camp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

fixed an issue in the "Create discussion" form, that would have the "Create" action button disabled even though the form is prefilled when opening it from the message action
5 changes: 5 additions & 0 deletions .changeset/polite-foxes-repair.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': minor
---

Added a method to the Apps-Engine that allows apps to read multiple messages from a room
5 changes: 5 additions & 0 deletions .changeset/popular-trees-lay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

Removed 'Hide' option in the room menu for Omnichannel conversations.
6 changes: 6 additions & 0 deletions .changeset/proud-waves-bathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@rocket.chat/meteor": minor
"@rocket.chat/model-typings": minor
---

Improved Engagement Dashboard's "Channels" tab performance by not returning rooms that had no activity in the analyzed period
5 changes: 5 additions & 0 deletions .changeset/quick-ducks-live.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

Fixed LDAP rooms, teams and roles syncs not being triggered on login even when the "Update User Data on Login" setting is enabled
5 changes: 5 additions & 0 deletions .changeset/red-numbers-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

Fixed "Copy link" message action enabled in Starred and Pinned list for End to End Encrypted channels, this action is disabled now
5 changes: 5 additions & 0 deletions .changeset/red-vans-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

Fixed issue that caused unintentional clicks when scrolling the channels sidebar on safari/chrome in iOS
5 changes: 5 additions & 0 deletions .changeset/rich-carpets-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Fixed some anomalies related to disabled E2EE rooms. Earlier there are some weird issues with disabled E2EE rooms, this PR fixes these anomalies.
7 changes: 7 additions & 0 deletions .changeset/rotten-eggs-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@rocket.chat/meteor": minor
"@rocket.chat/i18n": patch
"@rocket.chat/ui-client": patch
---

Implemented a new tab to the users page called 'Active', this tab lists all users who have logged in for the first time and are active.
6 changes: 6 additions & 0 deletions .changeset/selfish-emus-sing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@rocket.chat/meteor": minor
"@rocket.chat/i18n": minor
---

Added account setting `Accounts_Default_User_Preferences_sidebarSectionsOrder` to allow users to reorganize sidebar sections
5 changes: 5 additions & 0 deletions .changeset/shaggy-hats-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": minor
---

Added a new setting `Livechat_transcript_send_always` that allows admins to decide if email transcript should be sent all the times when a conversation is closed. This setting bypasses agent's preferences. For this setting to work, `Livechat_enable_transcript` should be off, meaning that visitors will no longer receive the option to decide if they want a transcript or not.
5 changes: 5 additions & 0 deletions .changeset/sixty-nails-clean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Fixed an issue that prevented the option to start a discussion from being shown on the message actions
5 changes: 5 additions & 0 deletions .changeset/smooth-lobsters-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Fix show correct user roles after updating user roles on admin edit user panel.
8 changes: 8 additions & 0 deletions .changeset/soft-donkeys-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@rocket.chat/meteor": patch
"@rocket.chat/mock-providers": patch
"@rocket.chat/ui-contexts": patch
"@rocket.chat/web-ui-registration": patch
---

Fixed an issue with blocked login when dismissed 2FA modal by clicking outside of it or pressing the escape key
5 changes: 5 additions & 0 deletions .changeset/sour-forks-breathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": minor
---

Extended apps-engine events for users leaving a room to also fire when being removed by another user. Also added the triggering user's information to the event's context payload.
5 changes: 5 additions & 0 deletions .changeset/thin-windows-reply.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Fixes an issue not displaying all groups in settings list
5 changes: 5 additions & 0 deletions .changeset/violet-brooms-press.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Security Hotfix (https://docs.rocket.chat/guides/security/security-updates)
5 changes: 5 additions & 0 deletions .changeset/weak-insects-sort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

Improving UX by change the position of room info actions buttons and menu order to avoid missclick in destructive actions.
7 changes: 7 additions & 0 deletions .changeset/weak-pets-talk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@rocket.chat/omnichannel-services': patch
'@rocket.chat/core-services': patch
'@rocket.chat/meteor': patch
---

Reduced time on generation of PDF transcripts. Earlier Rocket.Chat was fetching the required translations everytime a PDF transcript was requested, this process was async and was being unnecessarily being performed on every pdf transcript request. This PR improves this and now the translations are loaded at the start and kept in memory to process further pdf transcripts requests. This reduces the time of asynchronously fetching translations again and again.
5 changes: 5 additions & 0 deletions .changeset/weak-taxis-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': minor
---

Added handling of attachments in Omnichannel email transcripts. Earlier attachments were being skipped and were being shown as empty space, now it should render the image attachments and should show relevant error message for unsupported attachments.
7 changes: 7 additions & 0 deletions .changeset/weak-tigers-suffer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@rocket.chat/meteor": minor
"@rocket.chat/model-typings": minor
"@rocket.chat/rest-typings": minor
---

Added the ability to filter chats by `queued` on the Current Chats Omnichannel page
13 changes: 13 additions & 0 deletions .changeset/witty-bats-develop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"@rocket.chat/meteor": patch
"@rocket.chat/apps": patch
"@rocket.chat/core-services": patch
"@rocket.chat/core-typings": patch
"@rocket.chat/fuselage-ui-kit": patch
"@rocket.chat/rest-typings": patch
"@rocket.chat/ddp-streamer": patch
"@rocket.chat/presence": patch
"rocketchat-services": patch
---

Added the `user` param to apps-engine update method call, allowing apps' new `onUpdate` hook to know who triggered the update.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ yarn dsv # run only meteor (front and back) with pre-built packages

After initialized, you can access the server at http://localhost:3000

More details at: [Developer Docs](https://developer.rocket.chat/v1/docs/server-environment-setup)
PS: For Windows you MUST use WSL2 and have +12Gb RAM


# Gitpod Setup

1. Click the button below to open this project in Gitpod.
Expand Down
42 changes: 42 additions & 0 deletions apps/meteor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,47 @@
# @rocket.chat/meteor

## 6.10.1

### Patch Changes

- Bump @rocket.chat/meteor version.

- Bump @rocket.chat/meteor version.

- ([#32819](https://github.com/RocketChat/Rocket.Chat/pull/32819) by [@dionisio-bot](https://github.com/dionisio-bot)) Fixed issue with livechat agents not being able to leave omnichannel rooms if joining after a room has been closed by the visitor (due to race conditions)

- ([#32894](https://github.com/RocketChat/Rocket.Chat/pull/32894)) Security Hotfix (https://docs.rocket.chat/docs/security-fixes-and-updates)

- ([#32829](https://github.com/RocketChat/Rocket.Chat/pull/32829) by [@dionisio-bot](https://github.com/dionisio-bot)) Fixes an issue not displaying all groups in settings list

- ([#32836](https://github.com/RocketChat/Rocket.Chat/pull/32836) by [@dionisio-bot](https://github.com/dionisio-bot)) Security Hotfix (https://docs.rocket.chat/guides/security/security-updates)

- <details><summary>Updated dependencies []:</summary>

- @rocket.chat/core-typings@6.10.1
- @rocket.chat/rest-typings@6.10.1
- @rocket.chat/api-client@0.2.1
- @rocket.chat/license@0.2.1
- @rocket.chat/omnichannel-services@0.2.1
- @rocket.chat/pdf-worker@0.1.1
- @rocket.chat/presence@0.2.1
- @rocket.chat/apps@0.1.1
- @rocket.chat/core-services@0.4.1
- @rocket.chat/cron@0.1.1
- @rocket.chat/fuselage-ui-kit@8.0.1
- @rocket.chat/gazzodown@8.0.1
- @rocket.chat/model-typings@0.5.1
- @rocket.chat/ui-contexts@8.0.1
- @rocket.chat/server-cloud-communication@0.0.2
- @rocket.chat/models@0.1.1
- @rocket.chat/ui-theming@0.2.0
- @rocket.chat/ui-avatar@4.0.1
- @rocket.chat/ui-client@8.0.1
- @rocket.chat/ui-video-conf@8.0.1
- @rocket.chat/web-ui-registration@8.0.1
- @rocket.chat/instance-status@0.1.1
</details>

## 6.10.0

### Minor Changes
Expand Down
4 changes: 4 additions & 0 deletions apps/meteor/app/2fa/server/methods/enable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ Meteor.methods<ServerMethods>({
});
}

if (user.services?.totp?.enabled) {
throw new Meteor.Error('error-2fa-already-enabled');
}

const secret = TOTP.generateSecret();

await Users.disable2FAAndSetTempSecretByUserId(userId, secret.base32);
Expand Down
4 changes: 2 additions & 2 deletions apps/meteor/app/api/server/lib/getUploadFormData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export async function getUploadFormData<
function onFile(
fieldname: string,
file: Readable & { truncated: boolean },
{ filename, encoding }: { filename: string; encoding: string },
{ filename, encoding, mimeType: mimetype }: { filename: string; encoding: string; mimeType: string },
) {
if (options.field && fieldname !== options.field) {
file.resume();
Expand All @@ -85,7 +85,7 @@ export async function getUploadFormData<
file,
filename,
encoding,
mimetype: getMimeType(filename),
mimetype: getMimeType(mimetype, filename),
fieldname,
fields,
fileBuffer: Buffer.concat(fileChunks),
Expand Down
5 changes: 5 additions & 0 deletions apps/meteor/app/api/server/v1/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { executeUpdateMessage } from '../../../lib/server/methods/updateMessage'
import { OEmbed } from '../../../oembed/server/server';
import { executeSetReaction } from '../../../reactions/server/setReaction';
import { settings } from '../../../settings/server';
import { MessageTypes } from '../../../ui-utils/server';
import { normalizeMessagesForUser } from '../../../utils/server/lib/normalizeMessagesForUser';
import { API } from '../api';
import { getPaginationItems } from '../helpers/getPaginationItems';
Expand Down Expand Up @@ -217,6 +218,10 @@ API.v1.addRoute(
throw new Meteor.Error('error-invalid-params', 'The "message" parameter must be provided.');
}

if (MessageTypes.isSystemMessage(this.bodyParams.message)) {
throw new Error("Cannot send system messages using 'chat.sendMessage'");
}

const sent = await executeSendMessage(this.userId, this.bodyParams.message as Pick<IMessage, 'rid'>, this.bodyParams.previewUrls);
const [message] = await normalizeMessagesForUser([sent], this.userId);

Expand Down
Loading

0 comments on commit 887d710

Please sign in to comment.