Skip to content

Commit 1ebc017

Browse files
Merge branch 'develop' into fix/omnichannel-contact-sort-by-date
2 parents bb7daa0 + 02dd875 commit 1ebc017

File tree

96 files changed

+1852
-341
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+1852
-341
lines changed

.changeset/breezy-pens-sing.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@rocket.chat/meteor": minor
3+
"@rocket.chat/i18n": minor
4+
---
5+
6+
Removed "Unknown media type" errors on the client side by using `application/octet-stream` as a fallback media type (MIME type) for all files

.changeset/dry-shoes-tap.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@rocket.chat/meteor": patch
3+
---
4+
5+
Fixes the supported versions problem, where in most cases the data chosen was the oldest

.changeset/gold-flowers-shake.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@rocket.chat/i18n': minor
3+
'@rocket.chat/meteor': minor
4+
---
5+
6+
Added E2EE room setup header, with just limited functionality and room actions.

.changeset/green-camels-repair.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@rocket.chat/meteor": patch
3+
---
4+
5+
Fixed 2 issues with `QueueInactivityMonitor` callback. This callback was in charge of scheduling the job that would close the inquiry, but it was checking on a property that didn't exist. This caused the callback to early return without scheduling the job, making the feature to not to work.

.changeset/grumpy-games-greet.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
'@rocket.chat/meteor': patch
3+
---
4+
Changed streaming logic to prevent hidden system messages from being broadcasted through `stream-room-messages`.

.changeset/healthy-clouds-hide.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@rocket.chat/gazzodown": patch
3+
---
4+
5+
Fixes long katex lines overflowing the message component

.changeset/lastmessage-e2ee.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@rocket.chat/meteor": patch
3+
"@rocket.chat/model-typings": patch
4+
---
5+
6+
Fixed last message preview in Sidebar for E2E Ecrypted channels

.changeset/nervous-wolves-collect.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@rocket.chat/meteor': patch
3+
---
4+
5+
Fixes the issue not allowing users without edit-room-retention-policy permission try to edit the room with the retention policy enabled

.changeset/rude-llamas-notice.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@rocket.chat/meteor": patch
3+
"@rocket.chat/i18n": patch
4+
"@rocket.chat/omnichannel-services": patch
5+
---
6+
7+
Added a new setting `Restrict files access to users who can access room` that controls file visibility. This new setting allows users that "can access a room" to also download the files that are there. This is specially important for users with livechat manager or monitor roles, or agents that have special permissions to view closed rooms, since this allows them to download files on the conversation even after the conversation is closed.
8+
New setting is disabled by default and it is mutually exclusive with the setting `Restrict file access to room members` since this allows _more_ types of users to download files.

.changeset/tame-weeks-shout.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
'@rocket.chat/omnichannel-services': minor
3+
'rocketchat-services': minor
4+
'@rocket.chat/omnichannel-transcript': minor
5+
'@rocket.chat/authorization-service': minor
6+
'@rocket.chat/web-ui-registration': minor
7+
'@rocket.chat/stream-hub-service': minor
8+
'@rocket.chat/uikit-playground': minor
9+
'@rocket.chat/presence-service': minor
10+
'@rocket.chat/fuselage-ui-kit': minor
11+
'@rocket.chat/instance-status': minor
12+
'@rocket.chat/account-service': minor
13+
'@rocket.chat/mock-providers': minor
14+
'@rocket.chat/api-client': minor
15+
'@rocket.chat/ddp-client': minor
16+
'@rocket.chat/pdf-worker': minor
17+
'@rocket.chat/ui-theming': minor
18+
'@rocket.chat/core-services': minor
19+
'@rocket.chat/model-typings': minor
20+
'@rocket.chat/ui-video-conf': minor
21+
'@rocket.chat/core-typings': minor
22+
'@rocket.chat/rest-typings': minor
23+
'@rocket.chat/ddp-streamer': minor
24+
'@rocket.chat/queue-worker': minor
25+
'@rocket.chat/presence': minor
26+
'@rocket.chat/ui-composer': minor
27+
'@rocket.chat/ui-contexts': minor
28+
'@rocket.chat/license': minor
29+
'@rocket.chat/gazzodown': minor
30+
'@rocket.chat/ui-avatar': minor
31+
'@rocket.chat/ui-client': minor
32+
'@rocket.chat/livechat': minor
33+
'@rocket.chat/models': minor
34+
'@rocket.chat/ui-kit': minor
35+
'@rocket.chat/apps': minor
36+
'@rocket.chat/cron': minor
37+
'@rocket.chat/i18n': minor
38+
'@rocket.chat/meteor': minor
39+
---
40+
41+
New runtime for apps in the Apps-Engine based on the Deno platform

.changeset/three-squids-brake.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@rocket.chat/meteor': patch
3+
---
4+
5+
Fixed Encrypted thread main message reactivity issues. Earlier the encrypted thread main message was having some reactivity issues and flaky behavior.

.changeset/weak-books-tell.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@rocket.chat/meteor': patch
3+
---
4+
5+
Forces the highlight code language registration, preventing it to not being available when trying to use on the UI

.github/actions/setup-node/action.yml

+8
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ inputs:
1010
install:
1111
required: false
1212
type: boolean
13+
deno-dir:
14+
required: false
15+
type: string
16+
default: ~/.deno-cache
1317

1418
outputs:
1519
node-version:
@@ -19,13 +23,17 @@ runs:
1923
using: composite
2024

2125
steps:
26+
- run: echo 'DENO_DIR=${{ inputs.deno-dir }}' >> $GITHUB_ENV
27+
shell: bash
28+
2229
- name: Cache Node Modules
2330
if: inputs.cache-modules
2431
id: cache-node-modules
2532
uses: actions/cache@v3
2633
with:
2734
path: |
2835
node_modules
36+
${{ env.DENO_DIR }}
2937
apps/meteor/node_modules
3038
apps/meteor/ee/server/services/node_modules
3139
key: node-modules-${{ hashFiles('yarn.lock') }}

.github/workflows/ci-test-e2e.yml

+7
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,13 @@ jobs:
9090
name: MongoDB ${{ matrix.mongodb-version }}${{ inputs.db-watcher-disabled == 'true' && ' [no watchers]' || '' }} (${{ matrix.shard }}/${{ inputs.total-shard }})${{ matrix.mongodb-version == '6.0' && ' - Alpine' || '' }}
9191

9292
steps:
93+
- name: Collect Workflow Telemetry
94+
uses: catchpoint/workflow-telemetry-action@v2
95+
with:
96+
theme: dark
97+
job_summary: true
98+
comment_on_pr: false
99+
93100
- name: Login to GitHub Container Registry
94101
if: (github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop')
95102
uses: docker/login-action@v2

.github/workflows/ci-test-unit.yml

+6
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ jobs:
2121
name: Unit Tests
2222

2323
steps:
24+
- name: Collect Workflow Telemetry
25+
uses: catchpoint/workflow-telemetry-action@v2
26+
with:
27+
theme: dark
28+
job_summary: true
29+
comment_on_pr: false
2430
- uses: actions/checkout@v4
2531

2632
- name: Setup NodeJS

.github/workflows/ci.yml

+12
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,12 @@ jobs:
168168
runs-on: ubuntu-20.04
169169

170170
steps:
171+
- name: Collect Workflow Telemetry
172+
uses: catchpoint/workflow-telemetry-action@v2
173+
with:
174+
theme: dark
175+
job_summary: true
176+
comment_on_pr: false
171177
- name: Github Info
172178
run: |
173179
echo "GITHUB_ACTION: $GITHUB_ACTION"
@@ -192,6 +198,12 @@ jobs:
192198
runs-on: ubuntu-20.04
193199

194200
steps:
201+
- name: Collect Workflow Telemetry
202+
uses: catchpoint/workflow-telemetry-action@v2
203+
with:
204+
theme: dark
205+
job_summary: true
206+
comment_on_pr: false
195207
- name: Github Info
196208
run: |
197209
echo "GITHUB_ACTION: $GITHUB_ACTION"

apps/meteor/.docker/Dockerfile

+14-11
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,24 @@ RUN groupadd -g 65533 -r rocketchat \
1313
# --chown requires Docker 17.12 and works only on Linux
1414
ADD --chown=rocketchat:rocketchat . /app
1515

16+
# needs a mongoinstance - defaults to container linking with alias 'mongo'
17+
ENV DEPLOY_METHOD=docker \
18+
NODE_ENV=production \
19+
MONGO_URL=mongodb://mongo:27017/rocketchat \
20+
HOME=/tmp \
21+
PORT=3000 \
22+
ROOT_URL=http://localhost:3000 \
23+
Accounts_AvatarStorePath=/app/uploads \
24+
DENO_DIR=/usr/share/deno
25+
1626
RUN aptMark="$(apt-mark showmanual)" \
1727
&& apt-get install -y --no-install-recommends g++ make python3 ca-certificates \
1828
&& cd /app/bundle/programs/server \
1929
&& npm install \
20-
&& cd npm/node_modules/isolated-vm \
21-
&& npm install \
30+
&& cd npm/node_modules/isolated-vm \
31+
&& npm install \
32+
&& cd /app/bundle/programs/server/npm/node_modules/@rocket.chat/apps-engine/deno-runtime \
33+
&& ../../../deno-bin/bin/deno cache main.ts \
2234
&& apt-mark auto '.*' > /dev/null \
2335
&& apt-mark manual $aptMark > /dev/null \
2436
&& find /usr/local -type f -executable -exec ldd '{}' ';' \
@@ -37,15 +49,6 @@ VOLUME /app/uploads
3749

3850
WORKDIR /app/bundle
3951

40-
# needs a mongoinstance - defaults to container linking with alias 'mongo'
41-
ENV DEPLOY_METHOD=docker \
42-
NODE_ENV=production \
43-
MONGO_URL=mongodb://mongo:27017/rocketchat \
44-
HOME=/tmp \
45-
PORT=3000 \
46-
ROOT_URL=http://localhost:3000 \
47-
Accounts_AvatarStorePath=/app/uploads
48-
4952
EXPOSE 3000
5053

5154
CMD ["node", "main.js"]

apps/meteor/.docker/Dockerfile.alpine

+61-12
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,68 @@
11
FROM node:14.21.3-alpine3.16
22

3-
RUN apk add --no-cache ttf-dejavu
3+
ENV LANG=C.UTF-8
4+
5+
# Installing glibc deps required by Deno
6+
# This replaces libc6-compat
7+
# Copied from https://github.com/Docker-Hub-frolvlad/docker-alpine-glibc, which denoland/deno:alpine-1.37.1 uses
8+
# NOTE: Glibc 2.35 package is broken: https://github.com/sgerrand/alpine-pkg-glibc/issues/176, so we stick to 2.34 for now
9+
RUN ALPINE_GLIBC_BASE_URL="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" && \
10+
ALPINE_GLIBC_PACKAGE_VERSION="2.34-r0" && \
11+
ALPINE_GLIBC_BASE_PACKAGE_FILENAME="glibc-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \
12+
ALPINE_GLIBC_BIN_PACKAGE_FILENAME="glibc-bin-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \
13+
ALPINE_GLIBC_I18N_PACKAGE_FILENAME="glibc-i18n-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \
14+
apk add --no-cache --virtual=.build-dependencies wget ca-certificates && \
15+
echo \
16+
"-----BEGIN PUBLIC KEY-----\
17+
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApZ2u1KJKUu/fW4A25y9m\
18+
y70AGEa/J3Wi5ibNVGNn1gT1r0VfgeWd0pUybS4UmcHdiNzxJPgoWQhV2SSW1JYu\
19+
tOqKZF5QSN6X937PTUpNBjUvLtTQ1ve1fp39uf/lEXPpFpOPL88LKnDBgbh7wkCp\
20+
m2KzLVGChf83MS0ShL6G9EQIAUxLm99VpgRjwqTQ/KfzGtpke1wqws4au0Ab4qPY\
21+
KXvMLSPLUp7cfulWvhmZSegr5AdhNw5KNizPqCJT8ZrGvgHypXyiFvvAH5YRtSsc\
22+
Zvo9GI2e2MaZyo9/lvb+LbLEJZKEQckqRj4P26gmASrZEPStwc+yqy1ShHLA0j6m\
23+
1QIDAQAB\
24+
-----END PUBLIC KEY-----" | sed 's/ */\n/g' > "/etc/apk/keys/sgerrand.rsa.pub" && \
25+
wget \
26+
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
27+
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
28+
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \
29+
mv /etc/nsswitch.conf /etc/nsswitch.conf.bak && \
30+
apk add --no-cache --force-overwrite \
31+
"$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
32+
"$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
33+
"$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \
34+
\
35+
mv /etc/nsswitch.conf.bak /etc/nsswitch.conf && \
36+
rm "/etc/apk/keys/sgerrand.rsa.pub" && \
37+
(/usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 "$LANG" || true) && \
38+
echo "export LANG=$LANG" > /etc/profile.d/locale.sh && \
39+
\
40+
apk del glibc-i18n && \
41+
\
42+
rm "/root/.wget-hsts" && \
43+
apk del .build-dependencies && \
44+
rm \
45+
"$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
46+
"$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
47+
"$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \
48+
apk add --no-cache ttf-dejavu
449

550
ADD . /app
651

752
LABEL maintainer="buildmaster@rocket.chat"
853

54+
# needs a mongo instance - defaults to container linking with alias 'mongo'
55+
ENV DEPLOY_METHOD=docker \
56+
NODE_ENV=production \
57+
MONGO_URL=mongodb://mongo:27017/rocketchat \
58+
HOME=/tmp \
59+
PORT=3000 \
60+
ROOT_URL=http://localhost:3000 \
61+
Accounts_AvatarStorePath=/app/uploads \
62+
DENO_DIR=/usr/share/deno
63+
964
RUN set -x \
10-
&& apk add --no-cache --virtual .fetch-deps python3 make g++ libc6-compat \
65+
&& apk add --no-cache --virtual .fetch-deps python3 make g++ \
1166
&& cd /app/bundle/programs/server \
1267
&& npm install --production \
1368
# Start hack for sharp...
@@ -20,20 +75,14 @@ RUN set -x \
2075
&& npm install isolated-vm@4.4.2 \
2176
&& mv node_modules/isolated-vm npm/node_modules/isolated-vm \
2277
# End hack for isolated-vm
23-
&& cd npm \
78+
# Cache Deno dependencies for Apps-Engine
79+
&& cd npm/node_modules/@rocket.chat/apps-engine/deno-runtime \
80+
&& /app/bundle/programs/server/npm/node_modules/deno-bin/bin/deno cache main.ts \
81+
&& cd /app/bundle/programs/server/npm \
2482
&& npm rebuild bcrypt --build-from-source \
2583
&& npm cache clear --force \
2684
&& apk del .fetch-deps
2785

28-
# needs a mongo instance - defaults to container linking with alias 'mongo'
29-
ENV DEPLOY_METHOD=docker \
30-
NODE_ENV=production \
31-
MONGO_URL=mongodb://mongo:27017/rocketchat \
32-
HOME=/tmp \
33-
PORT=3000 \
34-
ROOT_URL=http://localhost:3000 \
35-
Accounts_AvatarStorePath=/app/uploads
36-
3786
VOLUME /app/uploads
3887

3988
WORKDIR /app/bundle

apps/meteor/app/api/server/lib/getUploadFormData.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import type { ValidateFunction } from 'ajv';
55
import busboy from 'busboy';
66
import type { Request } from 'express';
77

8+
import { getMimeType } from '../../../utils/lib/mimeTypes';
9+
810
type UploadResult<K> = {
911
file: Readable & { truncated: boolean };
1012
fieldname: string;
@@ -61,7 +63,7 @@ export async function getUploadFormData<
6163
function onFile(
6264
fieldname: string,
6365
file: Readable & { truncated: boolean },
64-
{ filename, encoding, mimeType: mimetype }: { filename: string; encoding: string; mimeType: string },
66+
{ filename, encoding }: { filename: string; encoding: string },
6567
) {
6668
if (options.field && fieldname !== options.field) {
6769
file.resume();
@@ -83,7 +85,7 @@ export async function getUploadFormData<
8385
file,
8486
filename,
8587
encoding,
86-
mimetype,
88+
mimetype: getMimeType(filename),
8789
fieldname,
8890
fields,
8991
fileBuffer: Buffer.concat(fileChunks),

apps/meteor/app/apps/server/bridges/commands.ts

+2-6
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ export class AppCommandsBridge extends CommandBridge {
111111
permission: command.permission,
112112
callback: this._appCommandExecutor.bind(this),
113113
providesPreview: command.providesPreview,
114-
previewer: !command.previewer ? undefined : this._appCommandPreviewer.bind(this),
115-
previewCallback: (!command.executePreviewItem ? undefined : this._appCommandPreviewExecutor.bind(this)) as
114+
previewer: command.providesPreview ? this._appCommandPreviewer.bind(this) : undefined,
115+
previewCallback: (command.providesPreview ? this._appCommandPreviewExecutor.bind(this) : undefined) as
116116
| (typeof slashCommands.commands)[string]['previewCallback']
117117
| undefined,
118118
} as SlashCommand;
@@ -155,10 +155,6 @@ export class AppCommandsBridge extends CommandBridge {
155155
if (typeof command.providesPreview !== 'boolean') {
156156
throw new Error('Invalid Slash Command parameter provided, it must be a valid ISlashCommand object.');
157157
}
158-
159-
if (typeof command.executor !== 'function') {
160-
throw new Error('Invalid Slash Command parameter provided, it must be a valid ISlashCommand object.');
161-
}
162158
}
163159

164160
private async _appCommandExecutor({ command, message, params, triggerId, userId }: SlashCommandCallbackParams<string>): Promise<void> {

0 commit comments

Comments
 (0)