Skip to content

Commit

Permalink
Merge branch 'develop' into trigger-msg-refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed May 10, 2024
2 parents 3b80cbf + bf4b4cc commit 0277c98
Show file tree
Hide file tree
Showing 235 changed files with 2,897 additions and 1,235 deletions.
7 changes: 7 additions & 0 deletions .changeset/chilly-poems-explode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@rocket.chat/meteor": minor
"@rocket.chat/core-typings": minor
"@rocket.chat/i18n": patch
---

Introduced a tab layout to the users page and implemented a tab called "All" that lists all users.
5 changes: 5 additions & 0 deletions .changeset/flat-starfishes-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Fixed a problem in how server was processing errors that was sending 2 ephemeral error messages when @all or @here were used while they were disabled via permissions
5 changes: 5 additions & 0 deletions .changeset/fresh-students-remember.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

Fixed an issue where translations would fallback to english some of the times.
6 changes: 6 additions & 0 deletions .changeset/lazy-gorilas-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@rocket.chat/meteor": patch
"@rocket.chat/i18n": patch
---

Fixed an issue with object storage settings that was not allowing admins to decide if files generated via "Export conversation" feature were being proxied through server or not.
9 changes: 9 additions & 0 deletions .changeset/nasty-swans-compete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@rocket.chat/meteor": patch
"@rocket.chat/core-services": patch
"@rocket.chat/omnichannel-services": patch
"@rocket.chat/pdf-worker": patch
---

Fixed multiple issues with PDF generation logic when a quoted message was too big to fit in one single page. This was causing an internal infinite loop within the library (as it tried to make it fit, failing and then trying to fit on next page where the same happened thus causing a loop).
The library was not able to break down some nested views and thus was trying to fit the whole quote on one single page. Logic was updated to allow wrapping of the contents when messages are quoted (so they can span multiple lines) and removed a bunch of unnecesary views from the code.
5 changes: 5 additions & 0 deletions .changeset/rich-bananas-complain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Fixed an issue on Users converter that was not returning the `statusText` property from users even when the typing indicated property existed.
5 changes: 5 additions & 0 deletions .changeset/shiny-crabs-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/fuselage-ui-kit': patch
---

Fix translation param on video conf joined message
7 changes: 7 additions & 0 deletions .changeset/silly-clocks-return.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@rocket.chat/omnichannel-services': patch
'@rocket.chat/core-services': patch
'@rocket.chat/meteor': patch
---

Fixed error handling for files bigger than NATS max allowed payload. This should prevent PDFs from erroring out when generating from rooms that contain heavy images.
5 changes: 5 additions & 0 deletions .changeset/strange-bears-dance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': minor
---

Adds CheckOption to departments multi selects improving options visibility state
5 changes: 5 additions & 0 deletions .changeset/tall-wombats-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Replaces the burger menu with an appropriate button fixing the semantics and mismatching color
5 changes: 5 additions & 0 deletions .changeset/warm-squids-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': minor
---

Changes the scrollbar color in order to improve the contrast and accessibility compliance
7 changes: 7 additions & 0 deletions .changeset/wild-teachers-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@rocket.chat/meteor": minor
"@rocket.chat/core-typings": minor
"@rocket.chat/i18n": minor
---

Added "Rocket.Chat Cloud Workspace ID" to workspace statistics page
5 changes: 5 additions & 0 deletions .changeset/young-yaks-suffer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

bump fuselage adding `AttachmentAuthorName` missing color token
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
/apps/meteor/server/models @RocketChat/Architecture
apps/meteor/server/startup/migrations @RocketChat/Architecture
/apps/meteor/packages/rocketchat-livechat @RocketChat/omnichannel
/apps/meteor/server/services/voip @RocketChat/omnichannel
/apps/meteor/server/services/voip-asterisk @RocketChat/omnichannel
/apps/meteor/server/services/omnichannel-voip @RocketChat/omnichannel
/apps/meteor/server/features/EmailInbox @RocketChat/omnichannel
/apps/meteor/ee/app/canned-responses @RocketChat/omnichannel
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/ci-test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ on:
type:
required: true
type: string
db-watcher-disabled:
default: 'false'
required: false
type: string
secrets:
CR_USER:
required: true
Expand Down Expand Up @@ -83,7 +87,7 @@ jobs:
mongodb-version: ${{ fromJSON(inputs.mongodb-version) }}
shard: ${{ fromJSON(inputs.shard) }}

name: MongoDB ${{ matrix.mongodb-version }} (${{ matrix.shard }}/${{ inputs.total-shard }})${{ matrix.mongodb-version == '6.0' && ' - Alpine' || '' }}
name: MongoDB ${{ matrix.mongodb-version }}${{ inputs.db-watcher-disabled == 'true' && ' [no watchers]' || '' }} (${{ matrix.shard }}/${{ inputs.total-shard }})${{ matrix.mongodb-version == '6.0' && ' - Alpine' || '' }}

steps:
- name: Login to GitHub Container Registry
Expand Down Expand Up @@ -161,6 +165,7 @@ jobs:
TRANSPORTER: ${{ inputs.transporter }}
COVERAGE_DIR: '/tmp/coverage'
COVERAGE_REPORTER: 'lcov'
DISABLE_DB_WATCHERS: ${{ inputs.db-watcher-disabled }}
run: |
docker compose -f docker-compose-ci.yml up -d
Expand Down
32 changes: 31 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,40 @@ jobs:
REPORTER_ROCKETCHAT_URL: ${{ secrets.REPORTER_ROCKETCHAT_URL }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

test-ui-ee-no-watcher:
name: 🔨 Test UI (EE)
needs: [checks, build-gh-docker-coverage, release-versions]

uses: ./.github/workflows/ci-test-e2e.yml
with:
type: ui
release: ee
transporter: 'nats://nats:4222'
enterprise-license: ${{ needs.release-versions.outputs.enterprise-license }}
shard: '[1, 2, 3, 4, 5]'
total-shard: 5
mongodb-version: "['6.0']"
node-version: ${{ needs.release-versions.outputs.node-version }}
lowercase-repo: ${{ needs.release-versions.outputs.lowercase-repo }}
rc-dockerfile: ${{ needs.release-versions.outputs.rc-dockerfile }}
rc-docker-tag: ${{ needs.release-versions.outputs.rc-docker-tag }}
rc-dockerfile-alpine: ${{ needs.release-versions.outputs.rc-dockerfile-alpine }}
rc-docker-tag-alpine: ${{ needs.release-versions.outputs.rc-docker-tag-alpine }}
gh-docker-tag: ${{ needs.release-versions.outputs.gh-docker-tag }}
retries: ${{ (github.event_name == 'release' || github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master') && 2 || 0 }}
db-watcher-disabled: 'true'
secrets:
CR_USER: ${{ secrets.CR_USER }}
CR_PAT: ${{ secrets.CR_PAT }}
QASE_API_TOKEN: ${{ secrets.QASE_API_TOKEN }}
REPORTER_ROCKETCHAT_API_KEY: ${{ secrets.REPORTER_ROCKETCHAT_API_KEY }}
REPORTER_ROCKETCHAT_URL: ${{ secrets.REPORTER_ROCKETCHAT_URL }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

tests-done:
name: ✅ Tests Done
runs-on: ubuntu-20.04
needs: [checks, test-unit, test-api, test-ui, test-api-ee, test-ui-ee]
needs: [checks, test-unit, test-api, test-ui, test-api-ee, test-ui-ee, test-ui-ee-no-watcher]

steps:
- name: Test finish aggregation
Expand Down
5 changes: 4 additions & 1 deletion apps/meteor/app/api/server/lib/getServerInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@ import {
getCachedSupportedVersionsToken,
wrapPromise,
} from '../../../cloud/server/functions/supportedVersionsToken/supportedVersionsToken';
import { settings } from '../../../settings/server';
import { Info, minimumClientVersions } from '../../../utils/rocketchat.info';

const removePatchInfo = (version: string): string => version.replace(/(\d+\.\d+).*/, '$1');

export async function getServerInfo(userId?: string): Promise<IWorkspaceInfo> {
const hasPermissionToViewStatistics = userId && (await hasPermissionAsync(userId, 'view-statistics'));
const supportedVersionsToken = await wrapPromise(getCachedSupportedVersionsToken());
const cloudWorkspaceId = settings.get<string | undefined>('Cloud_Workspace_Id');

return {
version: removePatchInfo(Info.version),

...(hasPermissionToViewStatistics && {
info: {
...Info,
Expand All @@ -28,5 +29,7 @@ export async function getServerInfo(userId?: string): Promise<IWorkspaceInfo> {
supportedVersionsToken.result && {
supportedVersions: { signed: supportedVersionsToken.result },
}),

cloudWorkspaceId,
};
}
3 changes: 3 additions & 0 deletions apps/meteor/app/api/server/v1/roles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { getUsersInRolePaginated } from '../../../authorization/server/functions
import { hasPermissionAsync } from '../../../authorization/server/functions/hasPermission';
import { hasRoleAsync, hasAnyRoleAsync } from '../../../authorization/server/functions/hasRole';
import { apiDeprecationLogger } from '../../../lib/server/lib/deprecationWarningLogger';
import { notifyListenerOnRoleChanges } from '../../../lib/server/lib/notifyListenerOnRoleChanges';
import { settings } from '../../../settings/server/index';
import { API } from '../api';
import { getPaginationItems } from '../helpers/getPaginationItems';
Expand Down Expand Up @@ -179,6 +180,8 @@ API.v1.addRoute(

await Roles.removeById(role._id);

void notifyListenerOnRoleChanges(role._id, 'removed', role);

return API.v1.success();
},
},
Expand Down
12 changes: 6 additions & 6 deletions apps/meteor/app/api/server/v1/voip/extensions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Voip } from '@rocket.chat/core-services';
import { VoipAsterisk } from '@rocket.chat/core-services';
import type { IVoipExtensionBase } from '@rocket.chat/core-typings';
import { Users } from '@rocket.chat/models';
import { Match, check } from 'meteor/check';
Expand All @@ -14,7 +14,7 @@ API.v1.addRoute(
{ authRequired: true, permissionsRequired: ['manage-voip-call-settings'] },
{
async get() {
const version = await Voip.getConnectorVersion();
const version = await VoipAsterisk.getConnectorVersion();
return API.v1.success(version);
},
},
Expand All @@ -26,7 +26,7 @@ API.v1.addRoute(
{ authRequired: true, permissionsRequired: ['manage-voip-call-settings'] },
{
async get() {
const list = await Voip.getExtensionList();
const list = await VoipAsterisk.getExtensionList();
const result = list.result as IVoipExtensionBase[];
return API.v1.success({ extensions: result });
},
Expand All @@ -48,7 +48,7 @@ API.v1.addRoute(
extension: String,
}),
);
const endpointDetails = await Voip.getExtensionDetails(this.queryParams);
const endpointDetails = await VoipAsterisk.getExtensionDetails(this.queryParams);
return API.v1.success({ ...endpointDetails.result });
},
},
Expand All @@ -68,7 +68,7 @@ API.v1.addRoute(
extension: String,
}),
);
const endpointDetails = await Voip.getRegistrationInfo(this.queryParams);
const endpointDetails = await VoipAsterisk.getRegistrationInfo(this.queryParams);
const encKey = settings.get<string>('VoIP_JWT_Secret');
if (!encKey) {
logger.warn('No JWT keys set. Sending registration info as plain text');
Expand Down Expand Up @@ -111,7 +111,7 @@ API.v1.addRoute(
return API.v1.notFound('Extension not found');
}

const endpointDetails = await Voip.getRegistrationInfo({ extension });
const endpointDetails = await VoipAsterisk.getRegistrationInfo({ extension });
const encKey = settings.get<string>('VoIP_JWT_Secret');
if (!encKey) {
logger.warn('No JWT keys set. Sending registration info as plain text');
Expand Down
8 changes: 4 additions & 4 deletions apps/meteor/app/api/server/v1/voip/queues.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Voip } from '@rocket.chat/core-services';
import { VoipAsterisk } from '@rocket.chat/core-services';
import type { IVoipConnectorResult, IQueueSummary, IQueueMembershipDetails, IQueueMembershipSubscription } from '@rocket.chat/core-typings';
import { Match, check } from 'meteor/check';

Expand All @@ -9,7 +9,7 @@ API.v1.addRoute(
{ authRequired: true, permissionsRequired: ['inbound-voip-calls'] },
{
async get() {
const queueSummary = await Voip.getQueueSummary();
const queueSummary = await VoipAsterisk.getQueueSummary();
return API.v1.success({ summary: queueSummary.result as IQueueSummary[] });
},
},
Expand All @@ -26,7 +26,7 @@ API.v1.addRoute(
extension: String,
}),
);
const membershipDetails: IVoipConnectorResult = await Voip.getQueuedCallsForThisExtension(this.queryParams);
const membershipDetails: IVoipConnectorResult = await VoipAsterisk.getQueuedCallsForThisExtension(this.queryParams);
return API.v1.success(membershipDetails.result as IQueueMembershipDetails);
},
},
Expand All @@ -43,7 +43,7 @@ API.v1.addRoute(
extension: String,
}),
);
const membershipDetails: IVoipConnectorResult = await Voip.getQueueMembership(this.queryParams);
const membershipDetails: IVoipConnectorResult = await VoipAsterisk.getQueueMembership(this.queryParams);
return API.v1.success(membershipDetails.result as IQueueMembershipSubscription);
},
},
Expand Down
6 changes: 3 additions & 3 deletions apps/meteor/app/api/server/v1/voip/server-connection.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Voip } from '@rocket.chat/core-services';
import { VoipAsterisk } from '@rocket.chat/core-services';
import { Match, check } from 'meteor/check';

import { API } from '../../api';
Expand All @@ -18,7 +18,7 @@ API.v1.addRoute(
}),
);
const { host, port, username, password } = this.queryParams;
return API.v1.success(await Voip.checkManagementConnection(host, port, username, password));
return API.v1.success(await VoipAsterisk.checkManagementConnection(host, port, username, password));
},
},
);
Expand Down Expand Up @@ -53,7 +53,7 @@ API.v1.addRoute(
}
}

return API.v1.success(await Voip.checkCallserverConnection(socketUrl));
return API.v1.success(await VoipAsterisk.checkCallserverConnection(socketUrl));
},
},
);
1 change: 1 addition & 0 deletions apps/meteor/app/apps/server/converters/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export class AppUsersConverter {
name: user.name,
roles: user.roles,
status: user.status,
statusText: user.statusText,
statusConnection,
utcOffset: user.utcOffset,
createdAt: user.createdAt,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { RoomSettingsEnum } from '../../../../definition/IRoomTypeConfig';
import { roomCoordinator } from '../../../../server/lib/rooms/roomCoordinator';
import { hasPermissionAsync } from '../../../authorization/server/functions/hasPermission';
import { setRoomAvatar } from '../../../lib/server/functions/setRoomAvatar';
import { notifyOnRoomChangedById } from '../../../lib/server/lib/notifyListener';
import { saveReactWhenReadOnly } from '../functions/saveReactWhenReadOnly';
import { saveRoomAnnouncement } from '../functions/saveRoomAnnouncement';
import { saveRoomCustomFields } from '../functions/saveRoomCustomFields';
Expand Down Expand Up @@ -487,6 +488,8 @@ export async function saveRoomSettings(
});
}

void notifyOnRoomChangedById(rid);

return {
result: true,
rid: room._id,
Expand Down
3 changes: 3 additions & 0 deletions apps/meteor/app/e2e/server/methods/setRoomKeyID.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { check } from 'meteor/check';
import { Meteor } from 'meteor/meteor';

import { canAccessRoomIdAsync } from '../../../authorization/server/functions/canAccessRoom';
import { notifyOnRoomChangedById } from '../../../lib/server/lib/notifyListener';

declare module '@rocket.chat/ui-contexts' {
// eslint-disable-next-line @typescript-eslint/naming-convention
Expand Down Expand Up @@ -44,5 +45,7 @@ Meteor.methods<ServerMethods>({
}

await Rooms.setE2eKeyId(room._id, keyID);

void notifyOnRoomChangedById(room._id);
},
});

0 comments on commit 0277c98

Please sign in to comment.