Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/RocketChat/Rocket.Chat i…
Browse files Browse the repository at this point in the history
…nto fix/livechat-analytics-time-range
  • Loading branch information
matheusbsilva137 committed Aug 21, 2024
2 parents da40a02 + 7937ff7 commit b6009e5
Show file tree
Hide file tree
Showing 354 changed files with 9,506 additions and 1,219 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.
5 changes: 5 additions & 0 deletions .changeset/fast-lobsters-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

Fixed an issue due to an endpoint pagination that was causing that when an agent have assigned more than 50 departments, the departments have a blank space instead of the name.
5 changes: 5 additions & 0 deletions .changeset/gentle-bugs-think.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

Prevent `processRoomAbandonment` callback from erroring out when a room was inactive during a day Business Hours was not configured for.
5 changes: 5 additions & 0 deletions .changeset/gorgeous-hotels-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

Stopped non channel members from dragging and dropping files in a channel they do not belong
5 changes: 5 additions & 0 deletions .changeset/kind-drinks-joke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Fixed issue with asterisk-wrapped text not becoming bold when user enters profile custom status.
5 changes: 5 additions & 0 deletions .changeset/large-geese-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': minor
---

Replaces an outdated banner with the Bubble component in order to display retention policy warning
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/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'.
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/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
5 changes: 5 additions & 0 deletions .changeset/twelve-windows-train.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Fixed: Custom fields in extraData now correctly added to extraRoomInfo by livechat.beforeRoom callback during livechat room creation.
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.
30 changes: 27 additions & 3 deletions .github/actions/build-docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,28 @@ inputs:
required: false
description: 'Containers to build along with Rocket.Chat'
type: string
turbo-cache:
required: false
description: 'Enable turbo cache'
default: 'true'
publish-image:
required: false
description: 'Publish image'
default: 'true'
setup:
required: false
description: 'Setup node.js'
default: 'true'
NPM_TOKEN:
required: false
description: 'NPM token'

runs:
using: composite

steps:
- name: Login to GitHub Container Registry
if: (github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop')
if: inputs.publish-image == 'true' &&(github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop')
uses: docker/login-action@v2
with:
registry: ghcr.io
Expand All @@ -42,17 +57,21 @@ runs:
cd /tmp/build
tar xzf Rocket.Chat.tar.gz
rm Rocket.Chat.tar.gz
- uses: rharkor/[email protected]
# if we are testing a PR from a fork, we already called the turbo cache at this point, so it should be false
if: inputs.turbo-cache == 'true'

- name: Setup NodeJS
uses: ./.github/actions/setup-node
if: inputs.setup == 'true'
with:
node-version: ${{ inputs.node-version }}
cache-modules: true
install: true
NPM_TOKEN: ${{ inputs.NPM_TOKEN }}

- run: yarn build
if: inputs.setup == 'true'
shell: bash

- name: Build Docker images
Expand All @@ -63,9 +82,14 @@ runs:
docker compose -f docker-compose-ci.yml build "${args[@]}"
- name: Publish Docker images to GitHub Container Registry
if: (github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop')
if: inputs.publish-image == 'true' && (github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop')
shell: bash
run: |
args=(rocketchat ${{ inputs.build-containers }})
docker compose -f docker-compose-ci.yml push "${args[@]}"
- name: Clean up temporary files
shell: bash
run: |
sudo rm -rf /tmp/bundle
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
18 changes: 10 additions & 8 deletions .github/workflows/ci-test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,24 @@ jobs:
node-version: ${{ inputs.node-version }}
cache-modules: true
install: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- uses: rharkor/[email protected]

- run: yarn build
# if we are testing a PR from a fork, we need to build the docker image at this point
- uses: ./.github/actions/build-docker
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
with:
CR_USER: ${{ secrets.CR_USER }}
CR_PAT: ${{ secrets.CR_PAT }}
node-version: ${{ inputs.node-version }}

- uses: rharkor/[email protected]
# we already called the turbo cache at this point, so it should be false
turbo-cache: false
# 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 All @@ -159,8 +167,6 @@ jobs:
exit 1
fi
- run: yarn build

- name: Prepare code coverage directory
if: inputs.release == 'ee'
run: |
Expand All @@ -187,10 +193,6 @@ jobs:
run: |
docker compose -f docker-compose-ci.yml up -d
- name: Clean up temporary files
run: |
sudo rm -rf /tmp/bundle
- name: Cache Playwright binaries
if: inputs.type == 'ui'
uses: actions/cache@v3
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
12 changes: 8 additions & 4 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 All @@ -576,13 +580,13 @@ jobs:

steps:
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.CR_USER }}
Expand Down Expand Up @@ -683,13 +687,13 @@ jobs:

steps:
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.CR_USER }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
# Override language selection by uncommenting this and choosing your languages
with:
languages: javascript

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -48,4 +48,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
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
Loading

0 comments on commit b6009e5

Please sign in to comment.