Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into impr…
Browse files Browse the repository at this point in the history
…ove/threadMetrics

* 'develop' of github.com:RocketChat/Rocket.Chat: (49 commits)
  feat: add `sidepanelNavigation` to Feature preview list (#33156)
  refactor: Realtime Monitoring Counters to TS (#33182)
  fix: restore tooltips to units Multiselect (#33174)
  test: Add unit test for RoomMenu options (#32891)
  chore: remove notifyListener call that was causing startup issues (#33154)
  fix: Multi-step modals closing unexpectedly (#33158)
  Revert "refactor: Realtime Monitoring Counters to TS" (#33170)
  refactor: Realtime Monitoring Counters to TS (#33166)
  refactor: Uses `source` instead of `room` to render the `OmnichannelRoomIcon` (#33118)
  refactor: Realtime Monitoring Overviews to TS (#33167)
  test: Add e2e tests for teams multi-step modals (#33168)
  feat: add Advanced settings accordion to `EditRoomInfo` (#33114)
  chore: Revive Livechat Storybook (#33137)
  refactor: Realtime `Doughnout Charts` to TS (#33092)
  feat: create contact endpoint (#32693)
  chore: remove left streaming code (#33039)
  fix: show only relevant userInfoActions for mentioned non-members (#31525)
  feat: Setting for enabling files encryption and fix whitelist media types stopping E2EE uploads (#33003)
  refactor: Replace proxy functions from `LivechatTyped` class with direct calls (#33110)
  Revert "fix: Inconsistent Markdown Formatting in Custom Status Field" (#33127)
  ...
  • Loading branch information
gabriellsh committed Sep 2, 2024
2 parents 2cd7827 + bb94c9c commit e9b49ff
Show file tree
Hide file tree
Showing 384 changed files with 7,504 additions and 2,110 deletions.
5 changes: 5 additions & 0 deletions .changeset/bright-humans-cross.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': minor
---

Federation actions like sending message in a federated DM, reacting in a federated chat, etc, will no longer work if the configuration is invalid.
7 changes: 7 additions & 0 deletions .changeset/brown-singers-appear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@rocket.chat/ui-client': minor
'@rocket.chat/i18n': minor
'@rocket.chat/meteor': minor
---

added `sidepanelNavigation` to feature preview list
6 changes: 6 additions & 0 deletions .changeset/cool-rocks-remember.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@rocket.chat/meteor": patch
"@rocket.chat/model-typings": patch
---

Fixed login with third-party apps not working without the "Manage OAuth Apps" permission
5 changes: 5 additions & 0 deletions .changeset/giant-spiders-pay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Fixes an issue where the Announcement modal with long words was adding a horizontal scrollbar
5 changes: 5 additions & 0 deletions .changeset/nasty-windows-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

Allow apps to react/unreact to messages via bridge
5 changes: 5 additions & 0 deletions .changeset/new-mayflies-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Deactivating users who federated will now be permanent.
7 changes: 7 additions & 0 deletions .changeset/ninety-hounds-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@rocket.chat/rest-typings': patch
'@rocket.chat/meteor': patch
'@rocket.chat/i18n': patch
---

Fix: Show correct user info actions for non-members in channels.
7 changes: 7 additions & 0 deletions .changeset/purple-dolls-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@rocket.chat/web-ui-registration': patch
'@rocket.chat/i18n': patch
'@rocket.chat/meteor': patch
---

Fixes an issue where creating a new user with an invalid username (containing special characters) resulted in an error message, but the user was still created. The user creation process now properly aborts when an invalid username is provided.
5 changes: 5 additions & 0 deletions .changeset/rich-pillows-hang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Fixes the `expanded` prop being accidentally forwarded to `ContextualbarHeader`
5 changes: 5 additions & 0 deletions .changeset/rooms-table-ts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': minor
---

Add "Created at" column to admin rooms table
6 changes: 6 additions & 0 deletions .changeset/rotten-camels-pretend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@rocket.chat/meteor": patch
"@rocket.chat/core-typings": patch
---

Fixed issue with system messages being counted as agents' first responses in livechat rooms (which caused the "best first response time" and "average first response time" metrics to be unreliable for all agents)
5 changes: 5 additions & 0 deletions .changeset/six-beers-fry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': minor
---

New button added to validate Matrix Federation configuration. A new field inside admin settings will reflect the configuration status being either 'Valid' or 'Invalid'.
9 changes: 9 additions & 0 deletions .changeset/sixty-spoons-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@rocket.chat/meteor": minor
"@rocket.chat/core-typings": minor
"@rocket.chat/model-typings": minor
"@rocket.chat/models": minor
"@rocket.chat/rest-typings": minor
---

Introduced "create contacts" endpoint to omnichannel
5 changes: 5 additions & 0 deletions .changeset/smart-mice-attack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

Fixed an issue where teams were being created with no room associated with it.
6 changes: 6 additions & 0 deletions .changeset/spicy-kings-think.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@rocket.chat/meteor": patch
---

Fixes multiple problems with the `processRoomAbandonment` hook. This hook is in charge of calculating the time a room has been abandoned (this means, the time that elapsed since a room was last answered by an agent until it was closed). However, when business hours were enabled and the user didn't open on one day, if an abandoned room happened to be abandoned _over_ the day there was no business hour configuration, then the process will error out.
Additionally, the values the code was calculating were not right. When business hours are enabled, this code should only count the abandonment time _while a business hour was open_. When rooms were left abandoned for days or weeks, this will also throw an error or output an invalid count.
5 changes: 5 additions & 0 deletions .changeset/strong-rings-rush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

Restored tooltips to the unit edit department field selected options
6 changes: 6 additions & 0 deletions .changeset/strong-terms-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@rocket.chat/meteor": patch
"@rocket.chat/model-typings": patch
---

Fixed issue with livechat analytics in a given date range considering conversation data from the following day
7 changes: 7 additions & 0 deletions .changeset/stupid-fishes-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@rocket.chat/core-typings': minor
'@rocket.chat/i18n': minor
'@rocket.chat/meteor': minor
---

Added a new setting to enable/disable file encryption in an end to end encrypted room.
5 changes: 5 additions & 0 deletions .changeset/stupid-pigs-share.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': minor
---

Wraps some room settings in an accordion advanced settings section in room edit contextual bar to improve organization
5 changes: 5 additions & 0 deletions .changeset/ten-bulldogs-clap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

fixed an issue with the "follow message" button not changing state after click
7 changes: 7 additions & 0 deletions .changeset/two-bikes-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@rocket.chat/meteor': patch
---

Fixed an issue related to setting Accounts_ForgetUserSessionOnWindowClose, this setting was not working as expected.

The new meteor 2.16 release introduced a new option to configure the Accounts package and choose between the local storage or session storage. They also changed how Meteor.\_localstorage works internally. Due to these changes in Meteor, our setting to use session storage wasn't working as expected. This PR fixes this issue and configures the Accounts package according to the workspace settings.
15 changes: 15 additions & 0 deletions .changeset/violet-radios-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
'@rocket.chat/core-typings': minor
'@rocket.chat/i18n': minor
'@rocket.chat/meteor': minor
---

Fixed a bug related to uploading end to end encrypted file.

E2EE files and uploads are uploaded as files of mime type `application/octet-stream` as we can't reveal the mime type of actual content since it is encrypted and has to be kept confidential.

The server resolves the mime type of encrypted file as `application/octet-stream` but it wasn't playing nicely with existing settings related to whitelisted and blacklisted media types.

E2EE files upload was getting blocked if `application/octet-stream` is not a whitelisted media type.

Now this PR solves this issue by always accepting E2EE uploads even if `application/octet-stream` is not whitelisted but it will block the upload if `application/octet-stream` is black listed.
5 changes: 5 additions & 0 deletions .changeset/wise-avocados-taste.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Fixes an issue where multi-step modals were closing unexpectedly
4 changes: 4 additions & 0 deletions .github/actions/build-docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ inputs:
required: false
description: 'Setup node.js'
default: 'true'
NPM_TOKEN:
required: false
description: 'NPM token'

runs:
using: composite
Expand Down Expand Up @@ -65,6 +68,7 @@ runs:
node-version: ${{ inputs.node-version }}
cache-modules: true
install: true
NPM_TOKEN: ${{ inputs.NPM_TOKEN }}

- run: yarn build
if: inputs.setup == 'true'
Expand Down
4 changes: 4 additions & 0 deletions .github/actions/meteor-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ inputs:
required: true
description: 'Node version'
type: string
NPM_TOKEN:
required: false
description: 'NPM token'

runs:
using: composite
Expand All @@ -29,6 +32,7 @@ runs:
node-version: ${{ inputs.node-version }}
cache-modules: true
install: true
NPM_TOKEN: ${{ inputs.NPM_TOKEN }}

# - name: Free disk space
# run: |
Expand Down
20 changes: 16 additions & 4 deletions .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
name: 'Setup Node'
description: 'Setup NodeJS'

inputs:
node-version:
required: true
type: string
description: 'Node version'
cache-modules:
required: false
type: boolean
description: 'Cache node_modules'
install:
required: false
type: boolean
description: 'Install dependencies'
deno-dir:
required: false
type: string
description: 'Deno directory'
default: ~/.deno-cache
NPM_TOKEN:
required: false
description: 'NPM token'

outputs:
node-version:
description: 'Node version'
value: ${{ steps.node-version.outputs.node-version }}

runs:
Expand Down Expand Up @@ -49,6 +54,13 @@ runs:
node-version: ${{ inputs.node-version }}
cache: 'yarn'

- name: yarn login
shell: bash
if: inputs.NPM_TOKEN
run: |
echo "//registry.npmjs.org/:_authToken=${{ inputs.NPM_TOKEN }}" > ~/.npmrc
- name: yarn install
if: inputs.install
shell: bash
run: yarn
1 change: 1 addition & 0 deletions .github/workflows/ci-code-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
node-version: ${{ inputs.node-version }}
cache-modules: true
install: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

# - name: Free disk space
# run: |
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci-test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ jobs:
node-version: ${{ inputs.node-version }}
cache-modules: true
install: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- uses: rharkor/[email protected]

- run: yarn build
Expand All @@ -145,6 +147,7 @@ jobs:
# the same reason we need to rebuild the docker image at this point is the reason we dont want to publish it
publish-image: false
setup: false
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Start httpbin container and wait for it to be ready
if: inputs.type == 'api'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
node-version: ${{ inputs.node-version }}
cache-modules: true
install: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- uses: rharkor/[email protected]

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ jobs:
node-version: ${{ needs.release-versions.outputs.node-version }}
cache-modules: true
install: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Cache vite
uses: actions/cache@v3
Expand Down Expand Up @@ -253,6 +254,7 @@ jobs:
node-version: ${{ needs.release-versions.outputs.node-version }}
platform: ${{ matrix.platform }}
build-containers: ${{ matrix.platform == 'alpine' && 'authorization-service account-service ddp-streamer-service presence-service stream-hub-service queue-worker-service omnichannel-transcript-service' || '' }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

build-gh-docker:
name: 🚢 Build Docker Images for Production
Expand Down Expand Up @@ -280,6 +282,7 @@ jobs:
node-version: ${{ needs.release-versions.outputs.node-version }}
platform: ${{ matrix.platform }}
build-containers: ${{ matrix.platform == 'alpine' && 'authorization-service account-service ddp-streamer-service presence-service stream-hub-service queue-worker-service omnichannel-transcript-service' || '' }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Rename official Docker tag to GitHub Container Registry
if: matrix.platform == 'official'
Expand Down Expand Up @@ -560,6 +563,7 @@ jobs:
release: preview
username: ${{ secrets.CR_USER }}
password: ${{ secrets.CR_PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

docker-image-publish:
name: 🚀 Publish Docker Image (main)
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
node-version: 14.21.3
cache-modules: true
install: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- uses: rharkor/[email protected]

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr-update-description.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
node-version: 14.21.3
cache-modules: true
install: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- uses: rharkor/[email protected]

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
node-version: 14.21.3
cache-modules: true
install: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- uses: rharkor/[email protected]

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ yarn-error.log*
*.sublime-workspace

**/.vim/

data/
registration.yaml
18 changes: 18 additions & 0 deletions apps/meteor/app/api/server/v1/federation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,21 @@ API.v1.addRoute(
},
},
);

API.v1.addRoute(
'federation/configuration.verify',
{ authRequired: true, permissionsRequired: ['view-privileged-setting'] },
{
async get() {
const service = License.hasValidLicense() ? FederationEE : Federation;

const status = await service.configurationStatus();

if (!status.externalReachability.ok || !status.appservice.ok) {
return API.v1.failure(status);
}

return API.v1.success(status);
},
},
);
9 changes: 5 additions & 4 deletions apps/meteor/app/api/server/v1/oauthapps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ API.v1.addRoute(
{ authRequired: true, validateParams: isOauthAppsGetParams },
{
async get() {
if (!(await hasPermissionAsync(this.userId, 'manage-oauth-apps'))) {
return API.v1.unauthorized();
}
const isOAuthAppsManager = await hasPermissionAsync(this.userId, 'manage-oauth-apps');

const oauthApp = await OAuthApps.findOneAuthAppByIdOrClientId(this.queryParams);
const oauthApp = await OAuthApps.findOneAuthAppByIdOrClientId(
this.queryParams,
!isOAuthAppsManager ? { projection: { clientSecret: 0 } } : {},
);

if (!oauthApp) {
return API.v1.failure('OAuth app not found.');
Expand Down
Loading

0 comments on commit e9b49ff

Please sign in to comment.