Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
a4ed2de
feat: apps-engine timeout config (#34147)
dionisio-bot[bot] Dec 9, 2024
bef79cd
fix: engine restart process for Deno used wrong status (#34149)
dionisio-bot[bot] Dec 9, 2024
58e1c80
feat: make Deno capture unhandled exceptions and rejections and repor…
dionisio-bot[bot] Dec 9, 2024
d4c275c
fix: client trying to subscribe to streams before completing the logi…
dionisio-bot[bot] Dec 9, 2024
fde03a5
fix: Allow any user in e2ee room to create and propagate room keys (#…
dionisio-bot[bot] Dec 9, 2024
40e1b60
fix: videoconf ringer fails to accept calls after a logout/login (#34…
dionisio-bot[bot] Dec 10, 2024
826b217
fix: `Waiting Queue` feature not queueing rooms (#34035)
dionisio-bot[bot] Dec 10, 2024
70c577a
chore: fix changeset bump type (#34155)
d-gubert Dec 10, 2024
78e0010
Release 7.0.1
rocketchat-github-ci Dec 10, 2024
6da9df6
fix: app subprocess restart not running onEnable lifecycle (#34173)
dionisio-bot[bot] Dec 12, 2024
f789943
Release 7.0.2
rocketchat-github-ci Dec 12, 2024
b7427fa
Bump 7.0.3
rocketchat-github-ci Dec 16, 2024
78694f3
fix: app subprocess restart on error and better reporting (#34193)
dionisio-bot[bot] Dec 17, 2024
916aa1e
Release 7.0.3
rocketchat-github-ci Dec 17, 2024
be72f58
Bump 7.0.4
rocketchat-github-ci Jan 3, 2025
2a004b3
fix(apps): runtime orchestration fixes (#34877)
dionisio-bot[bot] Jan 3, 2025
c51de29
chore: add reason to app restart log (#34878)
dionisio-bot[bot] Jan 3, 2025
63856f5
fix: decoder error preventing succesfull app subprocess restart (#34880)
dionisio-bot[bot] Jan 3, 2025
aad8fd9
chore: fix lint (#34881)
d-gubert Jan 4, 2025
725c414
Release 7.0.4
rocketchat-github-ci Jan 6, 2025
d1d9891
fix: Start queue worker with service start instead of first call (#34…
dionisio-bot[bot] Jan 9, 2025
9eab523
Release 7.0.5
rocketchat-github-ci Jan 17, 2025
7a3ee4b
fix: Retention policy settings migration not running (#35102)
dionisio-bot[bot] Feb 4, 2025
6fbf07a
chore: Add missing deno-cache directory to output of apps-engine to t…
dionisio-bot[bot] Feb 4, 2025
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
5 changes: 5 additions & 0 deletions .changeset/sour-frogs-return.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

Fixes an issue with the retention policy max age settings not maintaning it's previous value when upgrading from version < 6.10
211 changes: 211 additions & 0 deletions apps/meteor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,216 @@
# @rocket.chat/meteor

## 7.0.5

### Patch Changes

- Bump @rocket.chat/meteor version.

- ([#34924](https://github.com/RocketChat/Rocket.Chat/pull/34924) by [@dionisio-bot](https://github.com/dionisio-bot)) Fixes a behavior when running microservices that caused queue worker to process just the first 60 seconds of request.

This was due to a mistakenly bound context. Queue Worker was changed to start doing work only after it received the first request.

However, with the introduction of ASL and actual context on calls, the worker registration was absorbing the context of the call that created them, causing service calls happening inside the callbacks to fail because of a timeout.

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

- @rocket.chat/omnichannel-services@0.3.11
- @rocket.chat/core-typings@7.0.5
- @rocket.chat/rest-typings@7.0.5
- @rocket.chat/license@1.0.5
- @rocket.chat/pdf-worker@0.2.11
- @rocket.chat/presence@0.2.14
- @rocket.chat/api-client@0.2.14
- @rocket.chat/apps@0.2.5
- @rocket.chat/core-services@0.7.6
- @rocket.chat/cron@0.1.14
- @rocket.chat/freeswitch@1.0.5
- @rocket.chat/fuselage-ui-kit@12.0.5
- @rocket.chat/gazzodown@12.0.5
- @rocket.chat/model-typings@1.0.5
- @rocket.chat/ui-contexts@12.0.5
- @rocket.chat/server-cloud-communication@0.0.2
- @rocket.chat/network-broker@0.1.6
- @rocket.chat/models@1.0.5
- @rocket.chat/ui-theming@0.4.1
- @rocket.chat/ui-avatar@8.0.5
- @rocket.chat/ui-client@12.0.5
- @rocket.chat/ui-video-conf@12.0.5
- @rocket.chat/ui-voip@2.0.5
- @rocket.chat/web-ui-registration@12.0.5
- @rocket.chat/instance-status@0.1.14
</details>

## 7.0.4

### Patch Changes

- ([#34877](https://github.com/RocketChat/Rocket.Chat/pull/34877) by [@dionisio-bot](https://github.com/dionisio-bot)) Fixes an error where the engine would not retry a subprocess restart if the last attempt failed

- Bump @rocket.chat/meteor version.

- Bump @rocket.chat/meteor version.

- ([#34880](https://github.com/RocketChat/Rocket.Chat/pull/34880) by [@dionisio-bot](https://github.com/dionisio-bot)) Fixes an issue that prevented the apps-engine from reestablishing communications with subprocesses in some cases

- ([#34877](https://github.com/RocketChat/Rocket.Chat/pull/34877) by [@dionisio-bot](https://github.com/dionisio-bot)) Fixes error propagation when trying to get the status of apps in some cases

- ([#34877](https://github.com/RocketChat/Rocket.Chat/pull/34877) by [@dionisio-bot](https://github.com/dionisio-bot)) Fixes wrong data being reported to total failed apps metrics and statistics

- <details><summary>Updated dependencies [2a004b3587, 63856f59f0, 2a004b3587, 2a004b3587]:</summary>

- @rocket.chat/fuselage-ui-kit@12.0.4
- @rocket.chat/instance-status@0.1.13
- @rocket.chat/ui-theming@0.4.1
- @rocket.chat/model-typings@1.0.4
- @rocket.chat/ui-video-conf@12.0.4
- @rocket.chat/core-typings@7.0.4
- @rocket.chat/rest-typings@7.0.4
- @rocket.chat/apps-engine@1.47.4
- @rocket.chat/ui-composer@0.4.1
- @rocket.chat/ui-contexts@12.0.4
- @rocket.chat/gazzodown@12.0.4
- @rocket.chat/ui-avatar@8.0.4
- @rocket.chat/ui-client@12.0.4
- @rocket.chat/ui-voip@2.0.4
- @rocket.chat/i18n@1.0.2
- @rocket.chat/models@1.0.4
- @rocket.chat/sha256@1.0.11
- @rocket.chat/omnichannel-services@0.3.10
- @rocket.chat/apps@0.2.4
- @rocket.chat/license@1.0.4
- @rocket.chat/pdf-worker@0.2.10
- @rocket.chat/presence@0.2.13
- @rocket.chat/api-client@0.2.13
- @rocket.chat/core-services@0.7.5
- @rocket.chat/cron@0.1.13
- @rocket.chat/freeswitch@1.0.4
- @rocket.chat/web-ui-registration@12.0.4
- @rocket.chat/server-cloud-communication@0.0.2
- @rocket.chat/network-broker@0.1.5
</details>

## 7.0.3

### Patch Changes

- Bump @rocket.chat/meteor version.

- Bump @rocket.chat/meteor version.

- <details><summary>Updated dependencies [78694f31d1, 78694f31d1, 78694f31d1, 78694f31d1]:</summary>

- @rocket.chat/apps-engine@1.47.3
- @rocket.chat/presence@0.2.12
- @rocket.chat/apps@0.2.3
- @rocket.chat/core-services@0.7.4
- @rocket.chat/core-typings@7.0.3
- @rocket.chat/fuselage-ui-kit@12.0.3
- @rocket.chat/rest-typings@7.0.3
- @rocket.chat/license@1.0.3
- @rocket.chat/omnichannel-services@0.3.9
- @rocket.chat/pdf-worker@0.2.9
- @rocket.chat/api-client@0.2.12
- @rocket.chat/cron@0.1.12
- @rocket.chat/freeswitch@1.0.3
- @rocket.chat/gazzodown@12.0.3
- @rocket.chat/model-typings@1.0.3
- @rocket.chat/ui-contexts@12.0.3
- @rocket.chat/server-cloud-communication@0.0.2
- @rocket.chat/network-broker@0.1.4
- @rocket.chat/models@1.0.3
- @rocket.chat/ui-theming@0.4.0
- @rocket.chat/ui-avatar@8.0.3
- @rocket.chat/ui-client@12.0.3
- @rocket.chat/ui-video-conf@12.0.3
- @rocket.chat/ui-voip@2.0.3
- @rocket.chat/web-ui-registration@12.0.3
- @rocket.chat/instance-status@0.1.12
</details>

## 7.0.2

### Patch Changes

- Bump @rocket.chat/meteor version.

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

- @rocket.chat/apps-engine@1.47.2
- @rocket.chat/presence@0.2.11
- @rocket.chat/apps@0.2.2
- @rocket.chat/core-services@0.7.3
- @rocket.chat/core-typings@7.0.2
- @rocket.chat/fuselage-ui-kit@12.0.2
- @rocket.chat/rest-typings@7.0.2
- @rocket.chat/license@1.0.2
- @rocket.chat/omnichannel-services@0.3.8
- @rocket.chat/pdf-worker@0.2.8
- @rocket.chat/api-client@0.2.11
- @rocket.chat/cron@0.1.11
- @rocket.chat/freeswitch@1.0.2
- @rocket.chat/gazzodown@12.0.2
- @rocket.chat/model-typings@1.0.2
- @rocket.chat/ui-contexts@12.0.2
- @rocket.chat/server-cloud-communication@0.0.2
- @rocket.chat/network-broker@0.1.3
- @rocket.chat/models@1.0.2
- @rocket.chat/ui-theming@0.4.0
- @rocket.chat/ui-avatar@8.0.2
- @rocket.chat/ui-client@12.0.2
- @rocket.chat/ui-video-conf@12.0.2
- @rocket.chat/ui-voip@2.0.2
- @rocket.chat/web-ui-registration@12.0.2
- @rocket.chat/instance-status@0.1.11
</details>

## 7.0.1

### Patch Changes

- Bump @rocket.chat/meteor version.

- ([#34152](https://github.com/RocketChat/Rocket.Chat/pull/34152) by [@dionisio-bot](https://github.com/dionisio-bot)) Removes a validation that allowed only the room creator to propagate E2EE room keys. This was causing issues when the rooms were created via apps or some other integration, as the creator may not be online or able to create E2EE keys

- ([#34114](https://github.com/RocketChat/Rocket.Chat/pull/34114) by [@dionisio-bot](https://github.com/dionisio-bot)) Fixed an issue that caused clients to not properly receive certain server notifications right after login

- ([#34035](https://github.com/RocketChat/Rocket.Chat/pull/34035) by [@dionisio-bot](https://github.com/dionisio-bot)) Fixes `waiting queue` feature. When `Livechat_waiting_queue` setting is enabled, incoming conversations should be sent to the queue instead of being assigned directly.

- ([#34075](https://github.com/RocketChat/Rocket.Chat/pull/34075) by [@dionisio-bot](https://github.com/dionisio-bot)) fixed an issue that caused the conference call ringer to fail to accept calls if the user logged out and in again

- ([#34150](https://github.com/RocketChat/Rocket.Chat/pull/34150) by [@dionisio-bot](https://github.com/dionisio-bot)) Prevent apps' subprocesses from crashing on unhandled rejections or uncaught exceptions

- <details><summary>Updated dependencies [bef79cd260, 58e1c80f8e, a4ed2de60c, a4ed2de60c]:</summary>

- @rocket.chat/apps-engine@1.47.1
- @rocket.chat/i18n@1.0.1
- @rocket.chat/presence@0.2.10
- @rocket.chat/apps@0.2.1
- @rocket.chat/core-services@0.7.2
- @rocket.chat/core-typings@7.0.1
- @rocket.chat/fuselage-ui-kit@12.0.1
- @rocket.chat/rest-typings@7.0.1
- @rocket.chat/ui-contexts@12.0.1
- @rocket.chat/web-ui-registration@12.0.1
- @rocket.chat/ui-client@12.0.1
- @rocket.chat/ui-voip@2.0.1
- @rocket.chat/ui-theming@0.4.0
- @rocket.chat/gazzodown@12.0.1
- @rocket.chat/ui-avatar@8.0.1
- @rocket.chat/ui-video-conf@12.0.1
- @rocket.chat/license@1.0.1
- @rocket.chat/omnichannel-services@0.3.7
- @rocket.chat/pdf-worker@0.2.7
- @rocket.chat/api-client@0.2.10
- @rocket.chat/cron@0.1.10
- @rocket.chat/freeswitch@1.0.1
- @rocket.chat/model-typings@1.0.1
- @rocket.chat/server-cloud-communication@0.0.2
- @rocket.chat/network-broker@0.1.2
- @rocket.chat/models@1.0.1
- @rocket.chat/instance-status@0.1.10
</details>

## 7.0.0

### Major Changes
Expand Down
18 changes: 15 additions & 3 deletions apps/meteor/app/livechat/server/lib/QueueManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ export class QueueManager {

const inquiryAgent = await RoutingManager.delegateAgent(defaultAgent, inquiry);
logger.debug(`Delegating inquiry with id ${inquiry._id} to agent ${defaultAgent?.username}`);
await callbacks.run('livechat.beforeRouteChat', inquiry, inquiryAgent);
const dbInquiry = await LivechatInquiry.findOneById(inquiry._id);
const dbInquiry = await callbacks.run('livechat.beforeRouteChat', inquiry, inquiryAgent);

if (!dbInquiry) {
throw new Error('inquiry-not-found');
Expand All @@ -122,6 +121,10 @@ export class QueueManager {
return LivechatInquiryStatus.QUEUED;
}

if (settings.get('Livechat_waiting_queue')) {
return LivechatInquiryStatus.QUEUED;
}

if (RoutingManager.getConfig()?.autoAssignAgent) {
return LivechatInquiryStatus.READY;
}
Expand All @@ -135,6 +138,7 @@ export class QueueManager {

static async queueInquiry(inquiry: ILivechatInquiryRecord, room: IOmnichannelRoom, defaultAgent?: SelectedAgent | null) {
if (inquiry.status === 'ready') {
logger.debug({ msg: 'Inquiry is ready. Delegating', inquiry, defaultAgent });
return RoutingManager.delegateInquiry(inquiry, defaultAgent, undefined, room);
}

Expand Down Expand Up @@ -261,7 +265,11 @@ export class QueueManager {
throw new Error('room-not-found');
}

if (!newRoom.servedBy && settings.get('Omnichannel_calculate_dispatch_service_queue_statistics')) {
if (
!newRoom.servedBy &&
settings.get('Livechat_waiting_queue') &&
settings.get('Omnichannel_calculate_dispatch_service_queue_statistics')
) {
const [inq] = await LivechatInquiry.getCurrentSortedQueueAsync({
inquiryId: inquiry._id,
department,
Expand Down Expand Up @@ -329,6 +337,10 @@ export class QueueManager {
}

private static dispatchInquiryQueued = async (inquiry: ILivechatInquiryRecord, room: IOmnichannelRoom, agent?: SelectedAgent | null) => {
if (RoutingManager.getConfig()?.autoAssignAgent) {
return;
}

logger.debug(`Notifying agents of new inquiry ${inquiry._id} queued`);

const { department, rid, v } = inquiry;
Expand Down
8 changes: 3 additions & 5 deletions apps/meteor/app/statistics/server/lib/getAppsStatistics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ async function _getAppsStatistics(): Promise<AppsStatistics> {
totalInstalled++;

const status = await app.getStatus();
const storageItem = await app.getStorageItem();
const storageItem = app.getStorageItem();

if (storageItem.installationSource === AppInstallationSource.PRIVATE) {
totalPrivateApps++;
Expand All @@ -51,12 +51,10 @@ async function _getAppsStatistics(): Promise<AppsStatistics> {
}
}

if (status === AppStatus.MANUALLY_DISABLED) {
totalFailed++;
}

if (AppStatusUtils.isEnabled(status)) {
totalActive++;
} else if (status !== AppStatus.MANUALLY_DISABLED) {
totalFailed++;
}
}),
);
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/app/utils/rocketchat.info
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "7.0.0"
"version": "7.0.5"
}
1 change: 1 addition & 0 deletions apps/meteor/client/lib/VideoConfManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ export const VideoConfManager = new (class VideoConfManager extends Emitter<Vide
clearTimeout(call.acceptTimeout);
}
});
this.userId = undefined;
this.incomingDirectCalls.clear();
this.dismissedCalls.clear();
this.currentCallData = undefined;
Expand Down
24 changes: 23 additions & 1 deletion apps/meteor/client/meteorOverrides/ddpOverREST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,35 @@ const withDDPOverREST = (_send: (this: Meteor.IMeteorConnection, message: Meteor
sdk.rest
.post(`/v1/${endpoint}/${method}`, restParams)
.then(({ message: _message }) => {
processResult(_message);
// Calling Meteor.loginWithToken before processing the result of the first login will ensure that the new login request
// is added to the top of the list of methodInvokers.
// The request itself will only be sent after the first login result is processed, but
// the Accounts.onLogin callbacks will be called before this request is effectively sent;
// This way, any requests done inside of onLogin callbacks will be added to the list
// and processed only after the Meteor.loginWithToken request is done
// So, the effective order is:
// 1. regular login with password is sent
// 2. result of the password login is received
// 3. login with token is added to the list of pending requests
// 4. result of the password login is processed
// 5. Accounts.onLogin callbacks are triggered, Meteor.userId is set
// 6. the request for the login with token is effectively sent
// 7. login with token result is processed
// 8. requests initiated inside of the Accounts.onLogin callback are then finally sent
//
// Keep in mind that there's a difference in how meteor3 processes the request results, compared to older meteor versions
// On meteor3, any collection writes triggered by a request result are done async, which means that the `processResult` call
// will not immediatelly trigger the callbacks, like it used to in older versions.
// That means that on meteor3+, it doesn't really make a difference if processResult is called before or after the Meteor.loginWithToken here
// as the result will be processed async, the loginWithToken call will be initiated before it is effectively processed anyway.
if (message.method === 'login') {
const parsedMessage = DDPCommon.parseDDP(_message) as { result?: { token?: string } };
if (parsedMessage.result?.token) {
Meteor.loginWithToken(parsedMessage.result.token);
}
}

processResult(_message);
})
.catch((error) => {
console.error(error);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ callbacks.add(
}

await saveQueueInquiry(inquiry);

return LivechatInquiry.findOneById(inquiry._id);
},
callbacks.priority.HIGH,
'livechat-before-routing-chat',
Expand Down
Loading
Loading