Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .docker/Dockerfile.rhel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM registry.access.redhat.com/ubi8/nodejs-12

ENV RC_VERSION 3.15.0
ENV RC_VERSION 3.15.1

MAINTAINER [email protected]

Expand Down
76 changes: 76 additions & 0 deletions .github/history.json
Original file line number Diff line number Diff line change
Expand Up @@ -61066,6 +61066,82 @@
"4.2"
],
"pull_requests": []
},
"3.14.5": {
"node_version": "12.22.1",
"npm_version": "6.14.1",
"apps_engine_version": "1.25.0",
"mongo_versions": [
"3.4",
"3.6",
"4.0"
],
"pull_requests": [
{
"pr": "22258",
"title": "[IMPROVE] Send only relevant data via WebSocket",
"userLogin": "sampaiodiego",
"description": "Previously when any data changed on subscriptions or rooms we were getting fresh data from database, to also remove undesired fields, but sometimes the data that changed was not relevant so we were sending the whole object everytime **without** the fields that actually changed. This change aims to reduce this overhead and also send less data to clients.",
"milestone": "3.14.5",
"contributors": [
"sampaiodiego",
"web-flow"
]
},
{
"pr": "22257",
"title": "[FIX] Support DISABLE_PRESENCE_MONITOR env var in new DB watchers",
"userLogin": "sampaiodiego",
"milestone": "3.14.5",
"contributors": [
"sampaiodiego"
]
}
]
},
"3.15.1": {
"node_version": "12.22.1",
"npm_version": "6.14.1",
"apps_engine_version": "1.26.0",
"mongo_versions": [
"3.4",
"3.6",
"4.0",
"4.2"
],
"pull_requests": [
{
"pr": "22290",
"title": "[FIX] Attachments and avatars not rendered if deployed on subfolder",
"userLogin": "gabriellsh",
"milestone": "3.15.1",
"contributors": [
"gabriellsh",
"tassoevan",
"web-flow"
]
},
{
"pr": "22395",
"title": "[FIX] Setup wizard infinite loop when on subfolder.",
"userLogin": "gabriellsh",
"milestone": "3.15.1",
"contributors": [
"gabriellsh",
"tassoevan",
"web-flow"
]
},
{
"pr": "22257",
"title": "[FIX] Support DISABLE_PRESENCE_MONITOR env var in new DB watchers",
"userLogin": "sampaiodiego",
"milestone": "3.14.5",
"contributors": [
"sampaiodiego"
]
}
]
}
}
}
2 changes: 1 addition & 1 deletion .snapcraft/resources/prepareRocketChat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

curl -SLf "https://releases.rocket.chat/3.15.0/download/" -o rocket.chat.tgz
curl -SLf "https://releases.rocket.chat/3.15.1/download/" -o rocket.chat.tgz

tar xf rocket.chat.tgz --strip 1

Expand Down
2 changes: 1 addition & 1 deletion .snapcraft/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# 5. `snapcraft snap`

name: rocketchat-server
version: 3.15.0
version: 3.15.1
summary: Rocket.Chat server
description: Have your own Slack like online chat, built with Meteor. https://rocket.chat/
confinement: strict
Expand Down
49 changes: 49 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@

# 3.15.1
`2021-06-21 · 3 🐛 · 3 👩‍💻👨‍💻`

### Engine versions
- Node: `12.22.1`
- NPM: `6.14.1`
- MongoDB: `3.4, 3.6, 4.0, 4.2`
- Apps-Engine: `1.26.0`

### 🐛 Bug fixes


- Attachments and avatars not rendered if deployed on subfolder ([#22290](https://github.com/RocketChat/Rocket.Chat/pull/22290))

- Setup wizard infinite loop when on subfolder. ([#22395](https://github.com/RocketChat/Rocket.Chat/pull/22395))

- Support DISABLE_PRESENCE_MONITOR env var in new DB watchers ([#22257](https://github.com/RocketChat/Rocket.Chat/pull/22257))

### 👩‍💻👨‍💻 Core Team 🤓

- [@gabriellsh](https://github.com/gabriellsh)
- [@sampaiodiego](https://github.com/sampaiodiego)
- [@tassoevan](https://github.com/tassoevan)

# 3.15.0
`2021-05-28 · 8 🎉 · 12 🚀 · 62 🐛 · 47 🔍 · 34 👩‍💻👨‍💻`

Expand Down Expand Up @@ -605,6 +629,31 @@
- [@thassiov](https://github.com/thassiov)
- [@tiagoevanp](https://github.com/tiagoevanp)

# 3.14.5
`2021-06-06 · 1 🚀 · 1 🐛 · 1 👩‍💻👨‍💻`

### Engine versions
- Node: `12.22.1`
- NPM: `6.14.1`
- MongoDB: `3.4, 3.6, 4.0`
- Apps-Engine: `1.25.0`

### 🚀 Improvements


- Send only relevant data via WebSocket ([#22258](https://github.com/RocketChat/Rocket.Chat/pull/22258))

Previously when any data changed on subscriptions or rooms we were getting fresh data from database, to also remove undesired fields, but sometimes the data that changed was not relevant so we were sending the whole object everytime **without** the fields that actually changed. This change aims to reduce this overhead and also send less data to clients.

### 🐛 Bug fixes


- Support DISABLE_PRESENCE_MONITOR env var in new DB watchers ([#22257](https://github.com/RocketChat/Rocket.Chat/pull/22257))

### 👩‍💻👨‍💻 Core Team 🤓

- [@sampaiodiego](https://github.com/sampaiodiego)

# 3.14.4
`2021-05-28 · 2 🐛 · 1 🔍 · 2 👩‍💻👨‍💻`

Expand Down
2 changes: 1 addition & 1 deletion app/utils/lib/getURL.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const _getURL = (path, { cdn, full, cloud, cloud_route, cloud_params, _cd
}

if (full) {
return siteUrl + url;
return s.rtrim(siteUrl, pathPrefix) + url;
}

return url;
Expand Down
2 changes: 1 addition & 1 deletion app/utils/rocketchat.info
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "3.15.0"
"version": "3.15.1"
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const ImageAttachment: FC<ImageAttachmentProps> = ({
{...imageDimensions}
loadImage={loadImage}
setLoadImage={setLoadImage}
src={url}
src={getURL(url)}
previewUrl={`data:image/png;base64,${imagePreview}`}
/>
</Attachment.Content>
Expand Down
3 changes: 2 additions & 1 deletion client/providers/AvatarUrlProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useMemo, FC } from 'react';

import { roomTypes } from '../../app/utils/client';
import { getURL } from '../../app/utils/lib/getURL';
import { AvatarUrlContext } from '../contexts/AvatarUrlContext';
import { useSetting } from '../contexts/SettingsContext';

Expand All @@ -19,7 +20,7 @@ const AvatarUrlProvider: FC = ({ children }) => {
`${cdnAvatarUrl}/avatar/${uid}${etag ? `?etag=${etag}` : ''}`;
}
return (uid: string, etag?: string): string =>
`/avatar/${uid}${etag ? `?etag=${etag}` : ''}`;
getURL(`/avatar/${uid}${etag ? `?etag=${etag}` : ''}`);
})(),
getRoomPathAvatar: ({ type, ...room }: any): string =>
roomTypes.getConfig(type || room.t).getAvatarPath({ username: room._id, ...room }),
Expand Down
7 changes: 4 additions & 3 deletions client/startup/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ import { IUser } from '../../definition/IUser';
import { appLayout } from '../lib/appLayout';
import { createTemplateForComponent } from '../lib/portals/createTemplateForComponent';

const SetupWizardRoute = lazy(() => import('../views/setupWizard/SetupWizardRoute'));
const MailerUnsubscriptionPage = lazy(() => import('../views/mailer/MailerUnsubscriptionPage'));
const NotFoundPage = lazy(() => import('../views/notFound/NotFoundPage'));

FlowRouter.wait();

FlowRouter.route('/', {
Expand Down Expand Up @@ -161,22 +165,19 @@ FlowRouter.route('/invite/:hash', {
FlowRouter.route('/setup-wizard/:step?', {
name: 'setup-wizard',
action: () => {
const SetupWizardRoute = lazy(() => import('../views/setupWizard/SetupWizardRoute'));
appLayout.render({ component: SetupWizardRoute });
},
});

FlowRouter.route('/mailer/unsubscribe/:_id/:createdAt', {
name: 'mailer-unsubscribe',
action: () => {
const MailerUnsubscriptionPage = lazy(() => import('../views/mailer/MailerUnsubscriptionPage'));
appLayout.render({ component: MailerUnsubscriptionPage });
},
});

FlowRouter.notFound = {
action: (): void => {
const NotFoundPage = lazy(() => import('../views/notFound/NotFoundPage'));
appLayout.render({ component: NotFoundPage });
},
};
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Rocket.Chat",
"description": "The Ultimate Open Source WebChat Platform",
"version": "3.15.0",
"version": "3.15.1",
"author": {
"name": "Rocket.Chat",
"url": "https://rocket.chat/"
Expand Down
35 changes: 20 additions & 15 deletions server/modules/watchers/watchers.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ type Watcher = <T extends IBaseData>(model: IBaseRaw<T>, fn: (event: IChange<T>)

type BroadcastCallback = <T extends keyof EventSignatures>(event: T, ...args: Parameters<EventSignatures[T]>) => Promise<void>;

const startMonitor = typeof process.env.DISABLE_PRESENCE_MONITOR === 'undefined'
|| !['true', 'yes'].includes(String(process.env.DISABLE_PRESENCE_MONITOR).toLowerCase());

export function initWatchers(models: IModelsParam, broadcast: BroadcastCallback, watch: Watcher): void {
const {
Messages,
Expand Down Expand Up @@ -164,22 +167,24 @@ export function initWatchers(models: IModelsParam, broadcast: BroadcastCallback,
});
});

watch<IUserSession>(UsersSessions, async ({ clientAction, id, data }) => {
switch (clientAction) {
case 'inserted':
case 'updated':
data = data ?? await UsersSessions.findOneById(id);
if (!data) {
return;
}
if (startMonitor) {
watch<IUserSession>(UsersSessions, async ({ clientAction, id, data }) => {
switch (clientAction) {
case 'inserted':
case 'updated':
data = data ?? await UsersSessions.findOneById(id);
if (!data) {
return;
}

broadcast('watch.userSessions', { clientAction, userSession: data });
break;
case 'removed':
broadcast('watch.userSessions', { clientAction, userSession: { _id: id } });
break;
}
});
broadcast('watch.userSessions', { clientAction, userSession: data });
break;
case 'removed':
broadcast('watch.userSessions', { clientAction, userSession: { _id: id } });
break;
}
});
}

watch<IInquiry>(LivechatInquiry, async ({ clientAction, id, data, diff }) => {
switch (clientAction) {
Expand Down