diff --git a/.changeset/bump-patch-1729717124346.md b/.changeset/bump-patch-1729717124346.md new file mode 100644 index 000000000000..e1eaa7980afb --- /dev/null +++ b/.changeset/bump-patch-1729717124346.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Bump @rocket.chat/meteor version. diff --git a/.changeset/pre.json b/.changeset/pre.json index 0d6531af024a..f28b23fe5d37 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -71,6 +71,7 @@ "brown-pants-press", "bump-patch-1729526930133", "bump-patch-1729648473274", + "bump-patch-1729717124346", "chilled-boats-sip", "chilled-files-relate", "chilly-flowers-brake", diff --git a/_templates/service/new/service.ejs.t b/_templates/service/new/service.ejs.t index 699539365259..bdd160b43cdf 100644 --- a/_templates/service/new/service.ejs.t +++ b/_templates/service/new/service.ejs.t @@ -3,6 +3,7 @@ to: ee/apps/<%= name %>/src/service.ts --- import { api, getConnection, getTrashCollection } from '@rocket.chat/core-services'; import { broker } from '@rocket.chat/network-broker'; +import { startTracing } from '@rocket.chat/tracing'; import polka from 'polka'; import { registerServiceModels } from '../../../../apps/meteor/ee/server/lib/registerServiceModels'; @@ -10,7 +11,9 @@ import { registerServiceModels } from '../../../../apps/meteor/ee/server/lib/reg const PORT = process.env.PORT || <%= h.random() %>; (async () => { - const db = await getConnection(); + const { db } = await getConnection(); + + startTracing({ service: '<%= name %>', db: client }); registerServiceModels(db, await getTrashCollection()); diff --git a/apps/meteor/CHANGELOG.md b/apps/meteor/CHANGELOG.md index 55bba48a1b49..bae262dff62f 100644 --- a/apps/meteor/CHANGELOG.md +++ b/apps/meteor/CHANGELOG.md @@ -1,5 +1,40 @@ # @rocket.chat/meteor +## 7.0.0-rc.3 + +### Patch Changes + +- Bump @rocket.chat/meteor version. + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/rest-typings@7.0.0-rc.3 + - @rocket.chat/license@1.0.0-rc.3 + - @rocket.chat/omnichannel-services@0.3.6-rc.3 + - @rocket.chat/pdf-worker@0.2.6-rc.3 + - @rocket.chat/presence@0.2.9-rc.3 + - @rocket.chat/api-client@0.2.9-rc.3 + - @rocket.chat/apps@0.2.0-rc.3 + - @rocket.chat/core-services@0.7.1-rc.3 + - @rocket.chat/cron@0.1.9-rc.3 + - @rocket.chat/freeswitch@1.0.0-rc.3 + - @rocket.chat/fuselage-ui-kit@12.0.0-rc.3 + - @rocket.chat/gazzodown@12.0.0-rc.3 + - @rocket.chat/model-typings@1.0.0-rc.3 + - @rocket.chat/ui-contexts@12.0.0-rc.3 + - @rocket.chat/server-cloud-communication@0.0.2 + - @rocket.chat/network-broker@0.1.1-rc.3 + - @rocket.chat/models@1.0.0-rc.3 + - @rocket.chat/ui-theming@0.4.0-rc.0 + - @rocket.chat/ui-avatar@8.0.0-rc.3 + - @rocket.chat/ui-client@12.0.0-rc.3 + - @rocket.chat/ui-video-conf@12.0.0-rc.3 + - @rocket.chat/ui-voip@2.0.0-rc.3 + - @rocket.chat/web-ui-registration@12.0.0-rc.3 + - @rocket.chat/instance-status@0.1.9-rc.3 +
+ ## 7.0.0-rc.2 ### Patch Changes diff --git a/apps/meteor/app/api/server/v1/misc.ts b/apps/meteor/app/api/server/v1/misc.ts index 5cd522d20533..c026236231d8 100644 --- a/apps/meteor/app/api/server/v1/misc.ts +++ b/apps/meteor/app/api/server/v1/misc.ts @@ -664,7 +664,8 @@ API.v1.addRoute( const settingsIds: string[] = []; if (this.bodyParams.setDeploymentAs === 'new-workspace') { - await WorkspaceCredentials.unsetCredentialByScope(); + await WorkspaceCredentials.removeAllCredentials(); + settingsIds.push( 'Cloud_Service_Agree_PrivacyTerms', 'Cloud_Workspace_Id', diff --git a/apps/meteor/app/apps/server/bridges/cloud.ts b/apps/meteor/app/apps/server/bridges/cloud.ts index 30ca897240f8..0f908ccfe0a3 100644 --- a/apps/meteor/app/apps/server/bridges/cloud.ts +++ b/apps/meteor/app/apps/server/bridges/cloud.ts @@ -12,7 +12,7 @@ export class AppCloudBridge extends CloudWorkspaceBridge { public async getWorkspaceToken(scope: string, appId: string): Promise { this.orch.debugLog(`App ${appId} is getting the workspace's token`); - const token = await getWorkspaceAccessTokenWithScope(scope); + const token = await getWorkspaceAccessTokenWithScope({ scope }); return token; } diff --git a/apps/meteor/app/cloud/server/functions/getWorkspaceAccessToken.ts b/apps/meteor/app/cloud/server/functions/getWorkspaceAccessToken.ts index 93cfa3266ecf..6595c8e90fc4 100644 --- a/apps/meteor/app/cloud/server/functions/getWorkspaceAccessToken.ts +++ b/apps/meteor/app/cloud/server/functions/getWorkspaceAccessToken.ts @@ -1,6 +1,8 @@ import type { IWorkspaceCredentials } from '@rocket.chat/core-typings'; import { WorkspaceCredentials } from '@rocket.chat/models'; +import { SystemLogger } from '../../../../server/lib/logger/system'; +import { workspaceScopes } from '../oauthScopes'; import { getWorkspaceAccessTokenWithScope } from './getWorkspaceAccessTokenWithScope'; import { retrieveRegistrationStatus } from './retrieveRegistrationStatus'; @@ -24,20 +26,27 @@ export async function getWorkspaceAccessToken(forceNew = false, scope = '', save return ''; } - const workspaceCredentials = await WorkspaceCredentials.getCredentialByScope(scope); - if (!workspaceCredentials) { - throw new CloudWorkspaceAccessTokenError(); + // Note: If no scope is given, it means we should assume the default scope, we store the default scopes + // in the global variable workspaceScopes. + if (scope === '') { + scope = workspaceScopes.join(' '); } - if (!hasWorkspaceAccessTokenExpired(workspaceCredentials) && !forceNew) { + const workspaceCredentials = await WorkspaceCredentials.getCredentialByScope(scope); + if (workspaceCredentials && !hasWorkspaceAccessTokenExpired(workspaceCredentials) && !forceNew) { + SystemLogger.debug( + `Workspace credentials cache hit using scope: ${scope}. Avoiding generating a new access token from cloud services.`, + ); return workspaceCredentials.accessToken; } - const accessToken = await getWorkspaceAccessTokenWithScope(scope, throwOnError); + SystemLogger.debug(`Workspace credentials cache miss using scope: ${scope}, fetching new access token from cloud services.`); + + const accessToken = await getWorkspaceAccessTokenWithScope({ scope, throwOnError }); if (save) { await WorkspaceCredentials.updateCredentialByScope({ - scope, + scope: accessToken.scope, accessToken: accessToken.token, expirationDate: accessToken.expiresAt, }); diff --git a/apps/meteor/app/cloud/server/functions/getWorkspaceAccessTokenWithScope.ts b/apps/meteor/app/cloud/server/functions/getWorkspaceAccessTokenWithScope.ts index 3a04031ebb88..1137b899967a 100644 --- a/apps/meteor/app/cloud/server/functions/getWorkspaceAccessTokenWithScope.ts +++ b/apps/meteor/app/cloud/server/functions/getWorkspaceAccessTokenWithScope.ts @@ -8,10 +8,24 @@ import { CloudWorkspaceAccessTokenError } from './getWorkspaceAccessToken'; import { removeWorkspaceRegistrationInfo } from './removeWorkspaceRegistrationInfo'; import { retrieveRegistrationStatus } from './retrieveRegistrationStatus'; -export async function getWorkspaceAccessTokenWithScope(scope = '', throwOnError = false) { +type WorkspaceAccessTokenWithScope = { + token: string; + expiresAt: Date; + scope: string; +}; + +type GetWorkspaceAccessTokenWithScopeParams = { + scope?: string; + throwOnError?: boolean; +}; + +export async function getWorkspaceAccessTokenWithScope({ + scope = '', + throwOnError = false, +}: GetWorkspaceAccessTokenWithScopeParams): Promise { const { workspaceRegistered } = await retrieveRegistrationStatus(); - const tokenResponse = { token: '', expiresAt: new Date() }; + const tokenResponse = { token: '', expiresAt: new Date(), scope: '' }; if (!workspaceRegistered) { return tokenResponse; @@ -62,6 +76,7 @@ export async function getWorkspaceAccessTokenWithScope(scope = '', throwOnError return { token: payload.access_token, expiresAt, + scope: payload.scope, }; } catch (err: any) { if (err instanceof CloudWorkspaceAccessTokenError) { diff --git a/apps/meteor/app/cloud/server/functions/saveRegistrationData.ts b/apps/meteor/app/cloud/server/functions/saveRegistrationData.ts index 746904687d67..63633c567845 100644 --- a/apps/meteor/app/cloud/server/functions/saveRegistrationData.ts +++ b/apps/meteor/app/cloud/server/functions/saveRegistrationData.ts @@ -1,5 +1,5 @@ import { applyLicense } from '@rocket.chat/license'; -import { Settings, WorkspaceCredentials } from '@rocket.chat/models'; +import { Settings } from '@rocket.chat/models'; import { notifyOnSettingChangedById } from '../../../lib/server/lib/notifyListener'; import { settings } from '../../../settings/server'; @@ -59,12 +59,6 @@ async function saveRegistrationDataBase({ { _id: 'Cloud_Workspace_Registration_Client_Uri', value: registration_client_uri }, ]; - await WorkspaceCredentials.updateCredentialByScope({ - scope: '', - accessToken: '', - expirationDate: new Date(0), - }); - const promises = [...settingsData.map(({ _id, value }) => Settings.updateValueById(_id, value))]; (await Promise.all(promises)).forEach((value, index) => { diff --git a/apps/meteor/app/e2e/server/methods/updateGroupKey.ts b/apps/meteor/app/e2e/server/methods/updateGroupKey.ts index 6974ba225d9f..5f7860107bd9 100644 --- a/apps/meteor/app/e2e/server/methods/updateGroupKey.ts +++ b/apps/meteor/app/e2e/server/methods/updateGroupKey.ts @@ -1,9 +1,13 @@ import type { ServerMethods } from '@rocket.chat/ddp-client'; -import { Subscriptions } from '@rocket.chat/models'; +import { Subscriptions, Rooms } from '@rocket.chat/models'; import { Meteor } from 'meteor/meteor'; import { methodDeprecationLogger } from '../../../lib/server/lib/deprecationWarningLogger'; -import { notifyOnSubscriptionChangedById, notifyOnSubscriptionChanged } from '../../../lib/server/lib/notifyListener'; +import { + notifyOnSubscriptionChangedById, + notifyOnSubscriptionChanged, + notifyOnRoomChangedById, +} from '../../../lib/server/lib/notifyListener'; declare module '@rocket.chat/ddp-client' { // eslint-disable-next-line @typescript-eslint/naming-convention @@ -12,32 +16,45 @@ declare module '@rocket.chat/ddp-client' { } } +export async function updateGroupKey(rid: string, uid: string, key: string, callerUserId: string) { + // I have a subscription to this room + const mySub = await Subscriptions.findOneByRoomIdAndUserId(rid, callerUserId); + + if (mySub) { + // Setting the key to myself, can set directly to the final field + if (callerUserId === uid) { + const setGroupE2EKeyResponse = await Subscriptions.setGroupE2EKey(mySub._id, key); + // Case: I create an encrypted room before setting up my keys, and I reset the e2e keys + // Next login, I'll create the keys for the room, and set them here. + // However as I reset my keys, I'm on the `usersWaitingForKeys` queue + // So I need to remove myself from the queue and notify the time i reach here + // This way, I can provide the keys to other users + const { modifiedCount } = await Rooms.removeUsersFromE2EEQueueByRoomId(mySub.rid, [callerUserId]); + if (setGroupE2EKeyResponse.modifiedCount) { + void notifyOnSubscriptionChangedById(mySub._id); + } + if (modifiedCount) { + void notifyOnRoomChangedById(mySub.rid); + } + return; + } + + // uid also has subscription to this room + const { value } = await Subscriptions.setGroupE2ESuggestedKey(uid, rid, key); + if (value) { + void notifyOnSubscriptionChanged(value); + } + } +} + Meteor.methods({ async 'e2e.updateGroupKey'(rid, uid, key) { - methodDeprecationLogger.method('e2e.updateGroupKey', '8.0.0'); const userId = Meteor.userId(); if (!userId) { throw new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'e2e.acceptSuggestedGroupKey' }); } - // I have a subscription to this room - const mySub = await Subscriptions.findOneByRoomIdAndUserId(rid, userId); - - if (mySub) { - // Setting the key to myself, can set directly to the final field - if (userId === uid) { - const setGroupE2EKeyResponse = await Subscriptions.setGroupE2EKey(mySub._id, key); - if (setGroupE2EKeyResponse.modifiedCount) { - void notifyOnSubscriptionChangedById(mySub._id); - } - return; - } - - // uid also has subscription to this room - const { value } = await Subscriptions.setGroupE2ESuggestedKey(uid, rid, key); - if (value) { - void notifyOnSubscriptionChanged(value); - } - } + methodDeprecationLogger.method('e2e.updateGroupKey', '8.0.0'); + return updateGroupKey(rid, uid, key, userId); }, }); diff --git a/apps/meteor/app/livechat/server/lib/Helper.ts b/apps/meteor/app/livechat/server/lib/Helper.ts index a6af9cee2f24..cf11c8d12b2a 100644 --- a/apps/meteor/app/livechat/server/lib/Helper.ts +++ b/apps/meteor/app/livechat/server/lib/Helper.ts @@ -407,7 +407,6 @@ export const dispatchInquiryQueued = async (inquiry: ILivechatInquiryRecord, age return; } - logger.debug(`Notifying ${await onlineAgents.count()} agents of new inquiry`); const notificationUserName = v && (v.name || v.username); for await (const agent of onlineAgents) { diff --git a/apps/meteor/app/livechat/server/lib/LivechatTyped.ts b/apps/meteor/app/livechat/server/lib/LivechatTyped.ts index 9e6636d46e72..c522218f283e 100644 --- a/apps/meteor/app/livechat/server/lib/LivechatTyped.ts +++ b/apps/meteor/app/livechat/server/lib/LivechatTyped.ts @@ -132,7 +132,7 @@ class LivechatClass { Livechat.logger.debug(`Fetching online bot agents for department ${department}`); const botAgents = await Livechat.getBotAgents(department); if (botAgents) { - const onlineBots = await botAgents.count(); + const onlineBots = await Livechat.countBotAgents(department); this.logger.debug(`Found ${onlineBots} online`); if (onlineBots > 0) { return true; @@ -632,6 +632,14 @@ class LivechatClass { return Users.findBotAgents(); } + private async countBotAgents(department?: string) { + if (department) { + return LivechatDepartmentAgents.countBotsForDepartment(department); + } + + return Users.countBotAgents(); + } + private async resolveChatTags( room: IOmnichannelRoom, options: CloseRoomParams['options'] = {}, diff --git a/apps/meteor/app/livechat/server/lib/QueueManager.ts b/apps/meteor/app/livechat/server/lib/QueueManager.ts index 4506e38b99d4..24be8d42b7a4 100644 --- a/apps/meteor/app/livechat/server/lib/QueueManager.ts +++ b/apps/meteor/app/livechat/server/lib/QueueManager.ts @@ -331,7 +331,6 @@ export class QueueManager { return; } - logger.debug(`Notifying ${await onlineAgents.count()} agents of new inquiry`); const notificationUserName = v && (v.name || v.username); for await (const agent of onlineAgents) { diff --git a/apps/meteor/app/livechat/server/lib/analytics/dashboards.ts b/apps/meteor/app/livechat/server/lib/analytics/dashboards.ts index dd0d54970065..cf5a0abd5d54 100644 --- a/apps/meteor/app/livechat/server/lib/analytics/dashboards.ts +++ b/apps/meteor/app/livechat/server/lib/analytics/dashboards.ts @@ -247,11 +247,11 @@ const getConversationsMetricsAsync = async ({ language: user.language || settings.get('Language') || 'en', })) || []; const metrics = ['Total_conversations', 'Open_conversations', 'On_Hold_conversations', 'Total_messages']; - const visitorsCount = await LivechatVisitors.getVisitorsBetweenDate({ + const visitorsCount = await LivechatVisitors.countVisitorsBetweenDate({ start: new Date(start), end: new Date(end), department: departmentId, - }).count(); + }); return { totalizers: [ ...totalizers.filter((metric: { title: string }) => metrics.includes(metric.title)), diff --git a/apps/meteor/app/livechat/server/lib/departmentsLib.ts b/apps/meteor/app/livechat/server/lib/departmentsLib.ts index f149078788e3..fa66fdbfe573 100644 --- a/apps/meteor/app/livechat/server/lib/departmentsLib.ts +++ b/apps/meteor/app/livechat/server/lib/departmentsLib.ts @@ -296,8 +296,8 @@ export async function getRequiredDepartment(onlineRequired = true) { return dept; } - const onlineAgents = await LivechatDepartmentAgents.getOnlineForDepartment(dept._id); - if (onlineAgents && (await onlineAgents.count())) { + const onlineAgents = await LivechatDepartmentAgents.countOnlineForDepartment(dept._id); + if (onlineAgents) { return dept; } } diff --git a/apps/meteor/app/statistics/server/lib/statistics.ts b/apps/meteor/app/statistics/server/lib/statistics.ts index 9defbaa42bef..9ca39d2e9d5f 100644 --- a/apps/meteor/app/statistics/server/lib/statistics.ts +++ b/apps/meteor/app/statistics/server/lib/statistics.ts @@ -2,7 +2,7 @@ import { log } from 'console'; import os from 'os'; import { Analytics, Team, VideoConf, Presence } from '@rocket.chat/core-services'; -import type { IRoom, IStats } from '@rocket.chat/core-typings'; +import type { IRoom, IStats, ISetting } from '@rocket.chat/core-typings'; import { UserStatus } from '@rocket.chat/core-typings'; import { NotificationQueue, @@ -92,7 +92,7 @@ export const statistics = { }; // Version - const uniqueID = await Settings.findOne('uniqueID'); + const uniqueID = await Settings.findOne>('uniqueID', { projection: { createdAt: 1 } }); statistics.uniqueId = settings.get('uniqueID'); if (uniqueID) { statistics.installedAt = uniqueID.createdAt.toISOString(); @@ -520,7 +520,7 @@ export const statistics = { ); statsPms.push( - NotificationQueue.col.estimatedDocumentCount().then((count) => { + NotificationQueue.estimatedDocumentCount().then((count) => { statistics.pushQueue = count; }), ); @@ -546,27 +546,27 @@ export const statistics = { statistics.messageAuditLoad = settings.get('Message_Auditing_Panel_Load_Count'); statistics.joinJitsiButton = settings.get('Jitsi_Click_To_Join_Count'); statistics.slashCommandsJitsi = settings.get('Jitsi_Start_SlashCommands_Count'); - statistics.totalOTRRooms = await Rooms.findByCreatedOTR().count(); + statistics.totalOTRRooms = await Rooms.countByCreatedOTR({ readPreference }); statistics.totalOTR = settings.get('OTR_Count'); - statistics.totalBroadcastRooms = await Rooms.findByBroadcast().count(); + statistics.totalBroadcastRooms = await Rooms.countByBroadcast({ readPreference }); statistics.totalTriggeredEmails = settings.get('Triggered_Emails_Count'); statistics.totalRoomsWithStarred = await Messages.countRoomsWithStarredMessages({ readPreference }); statistics.totalRoomsWithPinned = await Messages.countRoomsWithPinnedMessages({ readPreference }); statistics.totalUserTOTP = await Users.countActiveUsersTOTPEnable({ readPreference }); statistics.totalUserEmail2fa = await Users.countActiveUsersEmail2faEnable({ readPreference }); - statistics.totalPinned = await Messages.findPinned({ readPreference }).count(); - statistics.totalStarred = await Messages.findStarred({ readPreference }).count(); + statistics.totalPinned = await Messages.countPinned({ readPreference }); + statistics.totalStarred = await Messages.countStarred({ readPreference }); statistics.totalLinkInvitation = await Invites.estimatedDocumentCount(); statistics.totalLinkInvitationUses = await Invites.countUses(); statistics.totalEmailInvitation = settings.get('Invitation_Email_Count'); - statistics.totalE2ERooms = await Rooms.findByE2E({ readPreference }).count(); + statistics.totalE2ERooms = await Rooms.countByE2E({ readPreference }); statistics.logoChange = Object.keys(settings.get('Assets_logo') || {}).includes('url'); statistics.showHomeButton = settings.get('Layout_Show_Home_Button'); statistics.totalEncryptedMessages = await Messages.countByType('e2e', { readPreference }); statistics.totalManuallyAddedUsers = settings.get('Manual_Entry_User_Count'); - statistics.totalSubscriptionRoles = await RolesRaw.findByScope('Subscriptions').count(); - statistics.totalUserRoles = await RolesRaw.findByScope('Users').count(); - statistics.totalCustomRoles = await RolesRaw.findCustomRoles({ readPreference }).count(); + statistics.totalSubscriptionRoles = await RolesRaw.countByScope('Subscriptions', { readPreference }); + statistics.totalUserRoles = await RolesRaw.countByScope('Users', { readPreference }); + statistics.totalCustomRoles = await RolesRaw.countCustomRoles({ readPreference }); statistics.totalWebRTCCalls = settings.get('WebRTC_Calls_Count'); statistics.uncaughtExceptionsCount = settings.get('Uncaught_Exceptions_Count'); diff --git a/apps/meteor/client/views/account/security/EndToEnd.tsx b/apps/meteor/client/views/account/security/EndToEnd.tsx index 5546cbd00a88..d2c3865d891b 100644 --- a/apps/meteor/client/views/account/security/EndToEnd.tsx +++ b/apps/meteor/client/views/account/security/EndToEnd.tsx @@ -1,6 +1,7 @@ import { Box, PasswordInput, Field, FieldGroup, FieldLabel, FieldRow, FieldError, FieldHint, Button, Divider } from '@rocket.chat/fuselage'; import { useUniqueId } from '@rocket.chat/fuselage-hooks'; import { useToastMessageDispatch, useMethod, useTranslation, useLogout } from '@rocket.chat/ui-contexts'; +import { Accounts } from 'meteor/accounts-base'; import type { ComponentProps, ReactElement } from 'react'; import React, { useCallback, useEffect } from 'react'; import { Controller, useForm } from 'react-hook-form'; @@ -12,8 +13,8 @@ const EndToEnd = (props: ComponentProps): ReactElement => { const dispatchToastMessage = useToastMessageDispatch(); const logout = useLogout(); - const publicKey = localStorage.getItem('public_key'); - const privateKey = localStorage.getItem('private_key'); + const publicKey = Accounts.storageLocation.getItem('public_key'); + const privateKey = Accounts.storageLocation.getItem('private_key'); const resetE2eKey = useMethod('e2e.resetOwnE2EKey'); diff --git a/apps/meteor/client/views/room/E2EESetup/RoomE2EESetup.tsx b/apps/meteor/client/views/room/E2EESetup/RoomE2EESetup.tsx index c3319ac32c4b..7a9ca6772472 100644 --- a/apps/meteor/client/views/room/E2EESetup/RoomE2EESetup.tsx +++ b/apps/meteor/client/views/room/E2EESetup/RoomE2EESetup.tsx @@ -1,4 +1,5 @@ import { FeaturePreview, FeaturePreviewOff, FeaturePreviewOn } from '@rocket.chat/ui-client'; +import { Accounts } from 'meteor/accounts-base'; import React, { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; @@ -19,7 +20,7 @@ const RoomE2EESetup = () => { const e2eRoomState = useE2EERoomState(room._id); const { t } = useTranslation(); - const randomPassword = window.localStorage.getItem('e2e.randomPassword'); + const randomPassword = Accounts.storageLocation.getItem('e2e.randomPassword'); const onSavePassword = useCallback(() => { if (!randomPassword) { diff --git a/apps/meteor/ee/server/apps/communication/rest.ts b/apps/meteor/ee/server/apps/communication/rest.ts index fc597d00857c..0283f2eef783 100644 --- a/apps/meteor/ee/server/apps/communication/rest.ts +++ b/apps/meteor/ee/server/apps/communication/rest.ts @@ -189,7 +189,7 @@ export class AppsRestApi { return API.v1.failure({ error: 'Invalid purchase type' }); } - const response = await getWorkspaceAccessTokenWithScope('marketplace:purchase'); + const response = await getWorkspaceAccessTokenWithScope({ scope: 'marketplace:purchase' }); if (!response.token) { return API.v1.failure({ error: 'Unauthorized' }); } @@ -289,7 +289,7 @@ export class AppsRestApi { return API.v1.failure({ error: 'Invalid purchase type' }); } - const token = await getWorkspaceAccessTokenWithScope('marketplace:purchase'); + const token = await getWorkspaceAccessTokenWithScope({ scope: 'marketplace:purchase' }); if (!token) { return API.v1.failure({ error: 'Unauthorized' }); } diff --git a/apps/meteor/ee/server/services/CHANGELOG.md b/apps/meteor/ee/server/services/CHANGELOG.md index f7a48e9a27cc..1f90a13a1af1 100644 --- a/apps/meteor/ee/server/services/CHANGELOG.md +++ b/apps/meteor/ee/server/services/CHANGELOG.md @@ -1,5 +1,19 @@ # rocketchat-services +## 2.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/rest-typings@7.0.0-rc.3 + - @rocket.chat/core-services@0.7.1-rc.3 + - @rocket.chat/model-typings@1.0.0-rc.3 + - @rocket.chat/network-broker@0.1.1-rc.3 + - @rocket.chat/models@1.0.0-rc.3 +
+ ## 2.0.0-rc.2 ### Patch Changes diff --git a/apps/meteor/ee/server/services/package.json b/apps/meteor/ee/server/services/package.json index 6d635241a4f9..39ec14932fe8 100644 --- a/apps/meteor/ee/server/services/package.json +++ b/apps/meteor/ee/server/services/package.json @@ -1,7 +1,7 @@ { "name": "rocketchat-services", "private": true, - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.3", "description": "Rocket.Chat Authorization service", "main": "index.js", "scripts": { diff --git a/apps/meteor/server/database/utils.ts b/apps/meteor/server/database/utils.ts index e07df1e9e737..ec3864586924 100644 --- a/apps/meteor/server/database/utils.ts +++ b/apps/meteor/server/database/utils.ts @@ -1,6 +1,3 @@ -import { initDatabaseTracing } from '@rocket.chat/tracing'; import { MongoInternals } from 'meteor/mongo'; export const { db, client } = MongoInternals.defaultRemoteCollectionDriver().mongo; - -initDatabaseTracing(client); diff --git a/apps/meteor/server/models/raw/LivechatDepartmentAgents.ts b/apps/meteor/server/models/raw/LivechatDepartmentAgents.ts index 891542f03e7a..6d7ec76222db 100644 --- a/apps/meteor/server/models/raw/LivechatDepartmentAgents.ts +++ b/apps/meteor/server/models/raw/LivechatDepartmentAgents.ts @@ -267,6 +267,19 @@ export class LivechatDepartmentAgentsRaw extends BaseRaw { + const agents = await this.findByDepartmentId(departmentId, { projection: { username: 1 } }).toArray(); + + if (agents.length === 0) { + return 0; + } + + return Users.countOnlineUserFromList( + agents.map((a) => a.username), + isLivechatEnabledWhenAgentIdle, + ); + } + async getBotsForDepartment(departmentId: string): Promise> { const agents = await this.findByDepartmentId(departmentId).toArray(); @@ -287,6 +300,16 @@ export class LivechatDepartmentAgentsRaw extends BaseRaw { + const agents = await this.findByDepartmentId(departmentId, { projection: { username: 1 } }).toArray(); + + if (agents.length === 0) { + return 0; + } + + return Users.countBotAgents(agents.map((a) => a.username)); + } + async getNextBotForDepartment( departmentId: ILivechatDepartmentAgents['departmentId'], ignoreAgentId?: ILivechatDepartmentAgents['agentId'], diff --git a/apps/meteor/server/models/raw/LivechatVisitors.ts b/apps/meteor/server/models/raw/LivechatVisitors.ts index 396b728159ff..58a56909cb06 100644 --- a/apps/meteor/server/models/raw/LivechatVisitors.ts +++ b/apps/meteor/server/models/raw/LivechatVisitors.ts @@ -105,7 +105,7 @@ export class LivechatVisitorsRaw extends BaseRaw implements IL return this.findOne(query, options); } - getVisitorsBetweenDate({ start, end, department }: { start: Date; end: Date; department?: string }): FindCursor { + countVisitorsBetweenDate({ start, end, department }: { start: Date; end: Date; department?: string }): Promise { const query = { disabled: { $ne: true }, _updatedAt: { @@ -115,7 +115,7 @@ export class LivechatVisitorsRaw extends BaseRaw implements IL ...(department && department !== 'undefined' && { department }), }; - return this.find(query, { projection: { _id: 1 } }); + return this.countDocuments(query); } async getNextVisitorUsername(): Promise { diff --git a/apps/meteor/server/models/raw/Messages.ts b/apps/meteor/server/models/raw/Messages.ts index 3f79e174fec0..84013af5b895 100644 --- a/apps/meteor/server/models/raw/Messages.ts +++ b/apps/meteor/server/models/raw/Messages.ts @@ -539,6 +539,16 @@ export class MessagesRaw extends BaseRaw implements IMessagesModel { return this.find(query, options); } + countPinned(options?: CountDocumentsOptions): Promise { + const query: Filter = { + t: { $ne: 'rm' as MessageTypesValues }, + _hidden: { $ne: true }, + pinned: true, + }; + + return this.countDocuments(query, options); + } + findPaginatedPinnedByRoom(roomId: IMessage['rid'], options?: FindOptions): FindPaginated> { const query: Filter = { t: { $ne: 'rm' }, @@ -559,6 +569,15 @@ export class MessagesRaw extends BaseRaw implements IMessagesModel { return this.find(query, options); } + countStarred(options?: CountDocumentsOptions): Promise { + const query: Filter = { + '_hidden': { $ne: true }, + 'starred._id': { $exists: true }, + }; + + return this.countDocuments(query, options); + } + async setFederationReactionEventId(username: string, _id: string, reaction: string, federationEventId: string): Promise { await this.updateOne( { _id }, diff --git a/apps/meteor/server/models/raw/Roles.ts b/apps/meteor/server/models/raw/Roles.ts index c3dfab7a702a..d223e8249cae 100644 --- a/apps/meteor/server/models/raw/Roles.ts +++ b/apps/meteor/server/models/raw/Roles.ts @@ -1,7 +1,7 @@ import type { IRole, IRoom, IUser, RocketChatRecordDeleted } from '@rocket.chat/core-typings'; import type { IRolesModel } from '@rocket.chat/model-typings'; import { Subscriptions, Users } from '@rocket.chat/models'; -import type { Collection, FindCursor, Db, Filter, FindOptions, Document } from 'mongodb'; +import type { Collection, FindCursor, Db, Filter, FindOptions, Document, CountDocumentsOptions } from 'mongodb'; import { notifyOnSubscriptionChangedByRoomIdAndUserId } from '../../../app/lib/server/lib/notifyListener'; import { BaseRaw } from './BaseRaw'; @@ -184,6 +184,14 @@ export class RolesRaw extends BaseRaw implements IRolesModel { return this.find(query, options || {}); } + countByScope(scope: IRole['scope'], options?: CountDocumentsOptions): Promise { + const query = { + scope, + }; + + return this.countDocuments(query, options); + } + findCustomRoles(options?: FindOptions): FindCursor { const query: Filter = { protected: false, @@ -192,6 +200,14 @@ export class RolesRaw extends BaseRaw implements IRolesModel { return this.find(query, options || {}); } + countCustomRoles(options?: CountDocumentsOptions): Promise { + const query: Filter = { + protected: false, + }; + + return this.countDocuments(query, options || {}); + } + async updateById( _id: IRole['_id'], name: IRole['name'], diff --git a/apps/meteor/server/models/raw/Rooms.ts b/apps/meteor/server/models/raw/Rooms.ts index 0d0770994fbd..a33e161e0ad5 100644 --- a/apps/meteor/server/models/raw/Rooms.ts +++ b/apps/meteor/server/models/raw/Rooms.ts @@ -26,6 +26,7 @@ import type { UpdateOptions, UpdateResult, ModifyResult, + CountDocumentsOptions, } from 'mongodb'; import { readSecondaryPreferred } from '../../database/readSecondaryPreferred'; @@ -654,6 +655,15 @@ export class RoomsRaw extends BaseRaw implements IRoomsModel { ); } + countByBroadcast(options?: CountDocumentsOptions): Promise { + return this.countDocuments( + { + broadcast: true, + }, + options, + ); + } + setAsFederated(roomId: IRoom['_id']): Promise { return this.updateOne({ _id: roomId }, { $set: { federated: true } }); } @@ -695,6 +705,15 @@ export class RoomsRaw extends BaseRaw implements IRoomsModel { ); } + countByE2E(options?: CountDocumentsOptions): Promise { + return this.countDocuments( + { + encrypted: true, + }, + options, + ); + } + findE2ERoomById(roomId: IRoom['_id'], options: FindOptions = {}): Promise { return this.findOne( { @@ -1485,6 +1504,10 @@ export class RoomsRaw extends BaseRaw implements IRoomsModel { return this.find({ createdOTR: true }); } + countByCreatedOTR(options?: CountDocumentsOptions): Promise { + return this.countDocuments({ createdOTR: true }, options); + } + findByUsernamesOrUids(uids: IRoom['u']['_id'][], usernames: IRoom['u']['username'][]): FindCursor { return this.find({ $or: [{ usernames: { $in: usernames } }, { uids: { $in: uids } }] }); } diff --git a/apps/meteor/server/models/raw/Users.js b/apps/meteor/server/models/raw/Users.js index 3c1badc55e25..1c0c2abecf64 100644 --- a/apps/meteor/server/models/raw/Users.js +++ b/apps/meteor/server/models/raw/Users.js @@ -1449,6 +1449,17 @@ export class UsersRaw extends BaseRaw { return this.find(query); } + countOnlineUserFromList(userList, isLivechatEnabledWhenAgentIdle) { + // TODO: Create class Agent + const username = { + $in: [].concat(userList), + }; + + const query = queryStatusAgentOnline({ username }, isLivechatEnabledWhenAgentIdle); + + return this.countDocuments(query); + } + findOneOnlineAgentByUserList(userList, options, isLivechatEnabledWhenAgentIdle) { // TODO:: Create class Agent const username = { @@ -1480,6 +1491,22 @@ export class UsersRaw extends BaseRaw { return this.find(query); } + countBotAgents(usernameList) { + // TODO:: Create class Agent + const query = { + roles: { + $all: ['bot', 'livechat-agent'], + }, + ...(usernameList && { + username: { + $in: [].concat(usernameList), + }, + }), + }; + + return this.countDocuments(query); + } + removeAllRoomsByUserId(_id) { return this.updateOne( { diff --git a/apps/meteor/server/models/raw/WorkspaceCredentials.ts b/apps/meteor/server/models/raw/WorkspaceCredentials.ts index b989ace8c2a3..09706cdec4bb 100644 --- a/apps/meteor/server/models/raw/WorkspaceCredentials.ts +++ b/apps/meteor/server/models/raw/WorkspaceCredentials.ts @@ -10,31 +10,15 @@ export class WorkspaceCredentialsRaw extends BaseRaw impl } protected modelIndexes(): IndexDescription[] { - return [{ key: { scopes: 1, expirationDate: 1, accessToken: 1 }, unique: true }]; + return [{ key: { scope: 1, expirationDate: 1, accessToken: 1 }, unique: true }]; } getCredentialByScope(scope = ''): Promise { - const query: Filter = { - scopes: { - $all: [scope], - $size: 1, - }, - }; + const query: Filter = { scope }; return this.findOne(query); } - unsetCredentialByScope(scope = ''): Promise { - const query: Filter = { - scopes: { - $all: [scope], - $size: 1, - }, - }; - - return this.deleteOne(query); - } - updateCredentialByScope({ scope, accessToken, @@ -46,18 +30,13 @@ export class WorkspaceCredentialsRaw extends BaseRaw impl }): Promise { const record = { $set: { - scopes: [scope], + scope, accessToken, expirationDate, }, }; - const query: Filter = { - scopes: { - $all: [scope], - $size: 1, - }, - }; + const query: Filter = { scope }; return this.updateOne(query, record, { upsert: true }); } diff --git a/apps/meteor/server/startup/migrations/v316.ts b/apps/meteor/server/startup/migrations/v316.ts index c8641b896e77..210dafc4483f 100644 --- a/apps/meteor/server/startup/migrations/v316.ts +++ b/apps/meteor/server/startup/migrations/v316.ts @@ -1,16 +1,11 @@ -import { Settings, WorkspaceCredentials } from '@rocket.chat/models'; +import { Settings } from '@rocket.chat/models'; import { addMigration } from '../../lib/migrations'; addMigration({ version: 316, - name: 'Remove Cloud_Workspace_Access_Token and Cloud_Workspace_Access_Token_Expires_At from the settings collection and add to the WorkspaceCredentials collection', + name: 'Remove Cloud_Workspace_Access_Token and Cloud_Workspace_Access_Token_Expires_At from the settings collection', async up() { - const workspaceCredentials = await WorkspaceCredentials.getCredentialByScope(); - if (workspaceCredentials) { - return; - } - const accessToken = ((await Settings.getValueById('Cloud_Workspace_Access_Token')) as string) || ''; const expirationDate = ((await Settings.getValueById('Cloud_Workspace_Access_Token_Expires_At')) as Date) || new Date(0); @@ -21,11 +16,5 @@ addMigration({ if (expirationDate) { await Settings.removeById('Cloud_Workspace_Access_Token_Expires_At'); } - - await WorkspaceCredentials.updateCredentialByScope({ - scope: '', - accessToken, - expirationDate, - }); }, }); diff --git a/apps/meteor/server/tracing.ts b/apps/meteor/server/tracing.ts index e08bfebb20ac..8496ce1c49e3 100644 --- a/apps/meteor/server/tracing.ts +++ b/apps/meteor/server/tracing.ts @@ -1,3 +1,5 @@ import { startTracing } from '@rocket.chat/tracing'; -startTracing({ service: 'core' }); +import { client } from './database/utils'; + +startTracing({ service: 'core', db: client }); diff --git a/apps/meteor/tests/unit/app/e2e/server/methods/updateGroupKey.spec.ts b/apps/meteor/tests/unit/app/e2e/server/methods/updateGroupKey.spec.ts new file mode 100644 index 000000000000..9df3b2ab654d --- /dev/null +++ b/apps/meteor/tests/unit/app/e2e/server/methods/updateGroupKey.spec.ts @@ -0,0 +1,63 @@ +import { expect } from 'chai'; +import { beforeEach, describe, it } from 'mocha'; +import proxyquire from 'proxyquire'; +import sinon from 'sinon'; + +const models = { + Subscriptions: { + findOneByRoomIdAndUserId: sinon.stub(), + setGroupE2EKey: sinon.stub(), + setGroupE2ESuggestedKey: sinon.stub(), + }, + Rooms: { + removeUsersFromE2EEQueueByRoomId: sinon.stub(), + }, +}; + +const { updateGroupKey } = proxyquire.noCallThru().load('../../../../../../app/e2e/server/methods/updateGroupKey.ts', { + '../../../lib/server/lib/notifyListener': { + notifyOnSubscriptionChanged: sinon.stub(), + notifyOnRoomChangedById: sinon.stub(), + notifyOnSubscriptionChangedById: sinon.stub(), + }, + '../../../lib/server/lib/deprecationWarningLogger': { + methodDeprecationLogger: { + method: sinon.stub(), + }, + }, + '@rocket.chat/models': models, + 'meteor/meteor': { Meteor: { methods: sinon.stub() } }, +}); + +describe('updateGroupKey', () => { + beforeEach(() => { + models.Subscriptions.findOneByRoomIdAndUserId.reset(); + models.Subscriptions.setGroupE2EKey.reset(); + models.Subscriptions.setGroupE2ESuggestedKey.reset(); + }); + + it('should do nothing if user has no subscription', async () => { + models.Subscriptions.findOneByRoomIdAndUserId.resolves(null); + const res = await updateGroupKey('rid', 'uid', 'key', 'callerUserId'); + + expect(res).to.be.undefined; + }); + it('should suggest the key to the user when uid is different from callerUserId', async () => { + models.Subscriptions.findOneByRoomIdAndUserId.resolves({ _id: 'subscriptionId' }); + models.Subscriptions.setGroupE2ESuggestedKey.resolves({ value: {} }); + const res = await updateGroupKey('rid', 'uid', 'key', 'callerUserId'); + + expect(res).to.be.undefined; + expect(models.Subscriptions.setGroupE2ESuggestedKey.calledOnce).to.be.true; + }); + it('should set the group key when uid is the callerUserId', async () => { + models.Subscriptions.findOneByRoomIdAndUserId.resolves({ _id: 'subscriptionId' }); + models.Subscriptions.setGroupE2EKey.resolves({ modifiedCount: 1 }); + models.Rooms.removeUsersFromE2EEQueueByRoomId.resolves({ modifiedCount: 1 }); + const res = await updateGroupKey('rid', 'uid', 'key', 'uid'); + + expect(res).to.be.undefined; + expect(models.Subscriptions.setGroupE2EKey.calledOnce).to.be.true; + expect(models.Rooms.removeUsersFromE2EEQueueByRoomId.calledOnce).to.be.true; + }); +}); diff --git a/apps/uikit-playground/CHANGELOG.md b/apps/uikit-playground/CHANGELOG.md index 6e2bf8c8e980..225633b3ed1e 100644 --- a/apps/uikit-playground/CHANGELOG.md +++ b/apps/uikit-playground/CHANGELOG.md @@ -1,5 +1,17 @@ # @rocket.chat/uikit-playground +## 0.6.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/fuselage-ui-kit@12.0.0-rc.3 + - @rocket.chat/ui-contexts@12.0.0-rc.3 + - @rocket.chat/ui-avatar@8.0.0-rc.3 +
+ ## 0.6.0-rc.2 ### Patch Changes diff --git a/apps/uikit-playground/package.json b/apps/uikit-playground/package.json index a485363e7a17..7bb295831447 100644 --- a/apps/uikit-playground/package.json +++ b/apps/uikit-playground/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/uikit-playground", "private": true, - "version": "0.6.0-rc.2", + "version": "0.6.0-rc.3", "type": "module", "scripts": { "dev": "vite", diff --git a/ee/apps/account-service/CHANGELOG.md b/ee/apps/account-service/CHANGELOG.md index b8b970166a83..6688e03f81c2 100644 --- a/ee/apps/account-service/CHANGELOG.md +++ b/ee/apps/account-service/CHANGELOG.md @@ -1,5 +1,19 @@ # @rocket.chat/account-service +## 0.4.9-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/rest-typings@7.0.0-rc.3 + - @rocket.chat/core-services@0.7.1-rc.3 + - @rocket.chat/model-typings@1.0.0-rc.3 + - @rocket.chat/network-broker@0.1.1-rc.3 + - @rocket.chat/models@1.0.0-rc.3 +
+ ## 0.4.9-rc.2 ### Patch Changes diff --git a/ee/apps/account-service/package.json b/ee/apps/account-service/package.json index 601a7236d3ad..d16650ab8d58 100644 --- a/ee/apps/account-service/package.json +++ b/ee/apps/account-service/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/account-service", "private": true, - "version": "0.4.9-rc.2", + "version": "0.4.9-rc.3", "description": "Rocket.Chat Account service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/account-service/src/service.ts b/ee/apps/account-service/src/service.ts index b5279998a52b..e9e8cd8bef83 100755 --- a/ee/apps/account-service/src/service.ts +++ b/ee/apps/account-service/src/service.ts @@ -5,12 +5,12 @@ import polka from 'polka'; import { registerServiceModels } from '../../../../apps/meteor/ee/server/lib/registerServiceModels'; -startTracing({ service: 'account-service' }); - const PORT = process.env.PORT || 3033; (async () => { - const db = await getConnection(); + const { db, client } = await getConnection(); + + startTracing({ service: 'account-service', db: client }); registerServiceModels(db, await getTrashCollection()); diff --git a/ee/apps/authorization-service/CHANGELOG.md b/ee/apps/authorization-service/CHANGELOG.md index b9305ec47bba..0ad246d9dc90 100644 --- a/ee/apps/authorization-service/CHANGELOG.md +++ b/ee/apps/authorization-service/CHANGELOG.md @@ -1,5 +1,19 @@ # @rocket.chat/authorization-service +## 0.4.9-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/rest-typings@7.0.0-rc.3 + - @rocket.chat/core-services@0.7.1-rc.3 + - @rocket.chat/model-typings@1.0.0-rc.3 + - @rocket.chat/network-broker@0.1.1-rc.3 + - @rocket.chat/models@1.0.0-rc.3 +
+ ## 0.4.9-rc.2 ### Patch Changes diff --git a/ee/apps/authorization-service/package.json b/ee/apps/authorization-service/package.json index 33bfdcbeff5b..597d3e409bb2 100644 --- a/ee/apps/authorization-service/package.json +++ b/ee/apps/authorization-service/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/authorization-service", "private": true, - "version": "0.4.9-rc.2", + "version": "0.4.9-rc.3", "description": "Rocket.Chat Authorization service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/authorization-service/src/service.ts b/ee/apps/authorization-service/src/service.ts index 699de7aeb518..8b3350c5f754 100755 --- a/ee/apps/authorization-service/src/service.ts +++ b/ee/apps/authorization-service/src/service.ts @@ -7,10 +7,10 @@ import { registerServiceModels } from '../../../../apps/meteor/ee/server/lib/reg const PORT = process.env.PORT || 3034; -startTracing({ service: 'authorization-service' }); - (async () => { - const db = await getConnection(); + const { db, client } = await getConnection(); + + startTracing({ service: 'authorization-service', db: client }); registerServiceModels(db, await getTrashCollection()); diff --git a/ee/apps/ddp-streamer/CHANGELOG.md b/ee/apps/ddp-streamer/CHANGELOG.md index 129d086b7bc9..1fd57b5ad9cd 100644 --- a/ee/apps/ddp-streamer/CHANGELOG.md +++ b/ee/apps/ddp-streamer/CHANGELOG.md @@ -1,5 +1,20 @@ # @rocket.chat/ddp-streamer +## 0.3.9-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/rest-typings@7.0.0-rc.3 + - @rocket.chat/core-services@0.7.1-rc.3 + - @rocket.chat/model-typings@1.0.0-rc.3 + - @rocket.chat/network-broker@0.1.1-rc.3 + - @rocket.chat/models@1.0.0-rc.3 + - @rocket.chat/instance-status@0.1.9-rc.3 +
+ ## 0.3.9-rc.2 ### Patch Changes diff --git a/ee/apps/ddp-streamer/package.json b/ee/apps/ddp-streamer/package.json index b5e7e8c3c3d5..5d258120daa4 100644 --- a/ee/apps/ddp-streamer/package.json +++ b/ee/apps/ddp-streamer/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/ddp-streamer", "private": true, - "version": "0.3.9-rc.2", + "version": "0.3.9-rc.3", "description": "Rocket.Chat DDP-Streamer service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/ddp-streamer/src/service.ts b/ee/apps/ddp-streamer/src/service.ts index 4b43e1baed96..66ad72be4050 100755 --- a/ee/apps/ddp-streamer/src/service.ts +++ b/ee/apps/ddp-streamer/src/service.ts @@ -4,10 +4,10 @@ import { startTracing } from '@rocket.chat/tracing'; import { registerServiceModels } from '../../../../apps/meteor/ee/server/lib/registerServiceModels'; -startTracing({ service: 'ddp-streamer' }); - (async () => { - const db = await getConnection(); + const { db, client } = await getConnection(); + + startTracing({ service: 'ddp-streamer', db: client }); registerServiceModels(db, await getTrashCollection()); diff --git a/ee/apps/omnichannel-transcript/CHANGELOG.md b/ee/apps/omnichannel-transcript/CHANGELOG.md index 9cdbcfaf9369..3104ae81e3d2 100644 --- a/ee/apps/omnichannel-transcript/CHANGELOG.md +++ b/ee/apps/omnichannel-transcript/CHANGELOG.md @@ -1,5 +1,20 @@ # @rocket.chat/omnichannel-transcript +## 0.4.9-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/omnichannel-services@0.3.6-rc.3 + - @rocket.chat/pdf-worker@0.2.6-rc.3 + - @rocket.chat/core-services@0.7.1-rc.3 + - @rocket.chat/model-typings@1.0.0-rc.3 + - @rocket.chat/network-broker@0.1.1-rc.3 + - @rocket.chat/models@1.0.0-rc.3 +
+ ## 0.4.9-rc.2 ### Patch Changes diff --git a/ee/apps/omnichannel-transcript/package.json b/ee/apps/omnichannel-transcript/package.json index cd9c762a34f0..80e4b4e4df4f 100644 --- a/ee/apps/omnichannel-transcript/package.json +++ b/ee/apps/omnichannel-transcript/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/omnichannel-transcript", "private": true, - "version": "0.4.9-rc.2", + "version": "0.4.9-rc.3", "description": "Rocket.Chat service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/omnichannel-transcript/src/service.ts b/ee/apps/omnichannel-transcript/src/service.ts index e313c0069e8d..e78d646bf9ea 100644 --- a/ee/apps/omnichannel-transcript/src/service.ts +++ b/ee/apps/omnichannel-transcript/src/service.ts @@ -6,12 +6,12 @@ import polka from 'polka'; import { registerServiceModels } from '../../../../apps/meteor/ee/server/lib/registerServiceModels'; -startTracing({ service: 'omnichannel-transcript' }); - const PORT = process.env.PORT || 3036; (async () => { - const db = await getConnection(); + const { db, client } = await getConnection(); + + startTracing({ service: 'omnichannel-transcript', db: client }); registerServiceModels(db, await getTrashCollection()); diff --git a/ee/apps/presence-service/CHANGELOG.md b/ee/apps/presence-service/CHANGELOG.md index 8678a5215b8f..297aa361b91b 100644 --- a/ee/apps/presence-service/CHANGELOG.md +++ b/ee/apps/presence-service/CHANGELOG.md @@ -1,5 +1,19 @@ # @rocket.chat/presence-service +## 0.4.9-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/presence@0.2.9-rc.3 + - @rocket.chat/core-services@0.7.1-rc.3 + - @rocket.chat/model-typings@1.0.0-rc.3 + - @rocket.chat/network-broker@0.1.1-rc.3 + - @rocket.chat/models@1.0.0-rc.3 +
+ ## 0.4.9-rc.2 ### Patch Changes diff --git a/ee/apps/presence-service/package.json b/ee/apps/presence-service/package.json index 208a74795886..f9ca853ca550 100644 --- a/ee/apps/presence-service/package.json +++ b/ee/apps/presence-service/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/presence-service", "private": true, - "version": "0.4.9-rc.2", + "version": "0.4.9-rc.3", "description": "Rocket.Chat Presence service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/presence-service/src/service.ts b/ee/apps/presence-service/src/service.ts index 5114c712dae7..f1e86419fc69 100755 --- a/ee/apps/presence-service/src/service.ts +++ b/ee/apps/presence-service/src/service.ts @@ -5,12 +5,12 @@ import polka from 'polka'; import { registerServiceModels } from '../../../../apps/meteor/ee/server/lib/registerServiceModels'; -startTracing({ service: 'presence-service' }); - const PORT = process.env.PORT || 3031; (async () => { - const db = await getConnection(); + const { db, client } = await getConnection(); + + startTracing({ service: 'presence-service', db: client }); registerServiceModels(db, await getTrashCollection()); diff --git a/ee/apps/queue-worker/CHANGELOG.md b/ee/apps/queue-worker/CHANGELOG.md index bba8d6c8e5a1..39c2d5a39b3d 100644 --- a/ee/apps/queue-worker/CHANGELOG.md +++ b/ee/apps/queue-worker/CHANGELOG.md @@ -1,5 +1,19 @@ # @rocket.chat/queue-worker +## 0.4.9-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/omnichannel-services@0.3.6-rc.3 + - @rocket.chat/core-services@0.7.1-rc.3 + - @rocket.chat/model-typings@1.0.0-rc.3 + - @rocket.chat/network-broker@0.1.1-rc.3 + - @rocket.chat/models@1.0.0-rc.3 +
+ ## 0.4.9-rc.2 ### Patch Changes diff --git a/ee/apps/queue-worker/package.json b/ee/apps/queue-worker/package.json index 8aa8902d41f1..fdde9ae58b45 100644 --- a/ee/apps/queue-worker/package.json +++ b/ee/apps/queue-worker/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/queue-worker", "private": true, - "version": "0.4.9-rc.2", + "version": "0.4.9-rc.3", "description": "Rocket.Chat service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/queue-worker/src/service.ts b/ee/apps/queue-worker/src/service.ts index a66d1a579bad..e936621e3389 100644 --- a/ee/apps/queue-worker/src/service.ts +++ b/ee/apps/queue-worker/src/service.ts @@ -6,12 +6,12 @@ import polka from 'polka'; import { registerServiceModels } from '../../../../apps/meteor/ee/server/lib/registerServiceModels'; -startTracing({ service: 'queue-worker' }); - const PORT = process.env.PORT || 3038; (async () => { - const db = await getConnection(); + const { db, client } = await getConnection(); + + startTracing({ service: 'queue-worker', db: client }); registerServiceModels(db, await getTrashCollection()); diff --git a/ee/apps/stream-hub-service/CHANGELOG.md b/ee/apps/stream-hub-service/CHANGELOG.md index a04b851bd289..8585e179eecd 100644 --- a/ee/apps/stream-hub-service/CHANGELOG.md +++ b/ee/apps/stream-hub-service/CHANGELOG.md @@ -1,5 +1,18 @@ # @rocket.chat/stream-hub-service +## 0.4.9-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/core-services@0.7.1-rc.3 + - @rocket.chat/model-typings@1.0.0-rc.3 + - @rocket.chat/network-broker@0.1.1-rc.3 + - @rocket.chat/models@1.0.0-rc.3 +
+ ## 0.4.9-rc.2 ### Patch Changes diff --git a/ee/apps/stream-hub-service/package.json b/ee/apps/stream-hub-service/package.json index 264d475b6798..69efc6df3f5d 100644 --- a/ee/apps/stream-hub-service/package.json +++ b/ee/apps/stream-hub-service/package.json @@ -1,7 +1,7 @@ { "name": "@rocket.chat/stream-hub-service", "private": true, - "version": "0.4.9-rc.2", + "version": "0.4.9-rc.3", "description": "Rocket.Chat Stream Hub service", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/ee/apps/stream-hub-service/src/service.ts b/ee/apps/stream-hub-service/src/service.ts index 26cea9676a02..84567026733c 100755 --- a/ee/apps/stream-hub-service/src/service.ts +++ b/ee/apps/stream-hub-service/src/service.ts @@ -8,12 +8,12 @@ import { registerServiceModels } from '../../../../apps/meteor/ee/server/lib/reg import { DatabaseWatcher } from '../../../../apps/meteor/server/database/DatabaseWatcher'; import { StreamHub } from './StreamHub'; -startTracing({ service: 'stream-hub-service' }); - const PORT = process.env.PORT || 3035; (async () => { - const db = await getConnection(); + const { db, client } = await getConnection(); + + startTracing({ service: 'stream-hub-service', db: client }); registerServiceModels(db, await getTrashCollection()); diff --git a/ee/packages/license/CHANGELOG.md b/ee/packages/license/CHANGELOG.md index f2ef08dda661..06bcacc17ccc 100644 --- a/ee/packages/license/CHANGELOG.md +++ b/ee/packages/license/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/license +## 1.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 +
+ ## 1.0.0-rc.2 ### Patch Changes diff --git a/ee/packages/license/package.json b/ee/packages/license/package.json index 5e9ad34fb587..1d9fc2733d7f 100644 --- a/ee/packages/license/package.json +++ b/ee/packages/license/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/license", - "version": "1.0.0-rc.2", + "version": "1.0.0-rc.3", "private": true, "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", diff --git a/ee/packages/network-broker/CHANGELOG.md b/ee/packages/network-broker/CHANGELOG.md index 693cc81d6134..84a7c6ee70c4 100644 --- a/ee/packages/network-broker/CHANGELOG.md +++ b/ee/packages/network-broker/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/network-broker +## 0.1.1-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-services@0.7.1-rc.3 +
+ ## 0.1.1-rc.2 ### Patch Changes diff --git a/ee/packages/network-broker/package.json b/ee/packages/network-broker/package.json index 7df734e94a0f..d1cc71733da2 100644 --- a/ee/packages/network-broker/package.json +++ b/ee/packages/network-broker/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/network-broker", - "version": "0.1.1-rc.2", + "version": "0.1.1-rc.3", "private": true, "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", diff --git a/ee/packages/omnichannel-services/CHANGELOG.md b/ee/packages/omnichannel-services/CHANGELOG.md index eac24f84cd56..997a7b8401f2 100644 --- a/ee/packages/omnichannel-services/CHANGELOG.md +++ b/ee/packages/omnichannel-services/CHANGELOG.md @@ -1,5 +1,19 @@ # @rocket.chat/omnichannel-services +## 0.3.6-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/rest-typings@7.0.0-rc.3 + - @rocket.chat/pdf-worker@0.2.6-rc.3 + - @rocket.chat/core-services@0.7.1-rc.3 + - @rocket.chat/model-typings@1.0.0-rc.3 + - @rocket.chat/models@1.0.0-rc.3 +
+ ## 0.3.6-rc.2 ### Patch Changes diff --git a/ee/packages/omnichannel-services/package.json b/ee/packages/omnichannel-services/package.json index 9046be3d9f55..5c135d03243e 100644 --- a/ee/packages/omnichannel-services/package.json +++ b/ee/packages/omnichannel-services/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/omnichannel-services", - "version": "0.3.6-rc.2", + "version": "0.3.6-rc.3", "private": true, "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", diff --git a/ee/packages/pdf-worker/CHANGELOG.md b/ee/packages/pdf-worker/CHANGELOG.md index dcb8559ed494..6455f81bbbf4 100644 --- a/ee/packages/pdf-worker/CHANGELOG.md +++ b/ee/packages/pdf-worker/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/pdf-worker +## 0.2.6-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 +
+ ## 0.2.6-rc.2 ### Patch Changes diff --git a/ee/packages/pdf-worker/package.json b/ee/packages/pdf-worker/package.json index 9e5d97d2844c..a5fe9ef3d217 100644 --- a/ee/packages/pdf-worker/package.json +++ b/ee/packages/pdf-worker/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/pdf-worker", - "version": "0.2.6-rc.2", + "version": "0.2.6-rc.3", "private": true, "main": "./dist/index.js", "typings": "./dist/index.d.ts", diff --git a/ee/packages/presence/CHANGELOG.md b/ee/packages/presence/CHANGELOG.md index dc38c9f1994c..e57b75ee05ef 100644 --- a/ee/packages/presence/CHANGELOG.md +++ b/ee/packages/presence/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/presence +## 0.2.9-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/core-services@0.7.1-rc.3 + - @rocket.chat/models@1.0.0-rc.3 +
+ ## 0.2.9-rc.2 ### Patch Changes diff --git a/ee/packages/presence/package.json b/ee/packages/presence/package.json index 89dd73c65545..f6c909876ea6 100644 --- a/ee/packages/presence/package.json +++ b/ee/packages/presence/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/presence", - "version": "0.2.9-rc.2", + "version": "0.2.9-rc.3", "private": true, "devDependencies": { "@babel/core": "~7.25.8", diff --git a/packages/api-client/CHANGELOG.md b/packages/api-client/CHANGELOG.md index e56b16abb69d..cf72a20ae7fe 100644 --- a/packages/api-client/CHANGELOG.md +++ b/packages/api-client/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/api-client +## 0.2.9-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/rest-typings@7.0.0-rc.3 +
+ ## 0.2.9-rc.2 ### Patch Changes diff --git a/packages/api-client/package.json b/packages/api-client/package.json index caa6c88b4d40..76d3d1f44d50 100644 --- a/packages/api-client/package.json +++ b/packages/api-client/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/api-client", - "version": "0.2.9-rc.2", + "version": "0.2.9-rc.3", "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", "@types/jest": "~29.5.13", diff --git a/packages/apps/CHANGELOG.md b/packages/apps/CHANGELOG.md index 590ef352c7cd..2e6b840e2142 100644 --- a/packages/apps/CHANGELOG.md +++ b/packages/apps/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/apps +## 0.2.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/model-typings@1.0.0-rc.3 +
+ ## 0.2.0-rc.2 ### Patch Changes diff --git a/packages/apps/package.json b/packages/apps/package.json index 4d213c876799..26db8fbe241b 100644 --- a/packages/apps/package.json +++ b/packages/apps/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/apps", - "version": "0.2.0-rc.2", + "version": "0.2.0-rc.3", "private": true, "devDependencies": { "eslint": "~8.45.0", diff --git a/packages/core-services/CHANGELOG.md b/packages/core-services/CHANGELOG.md index 37f39bffb5cf..4f969ddabddd 100644 --- a/packages/core-services/CHANGELOG.md +++ b/packages/core-services/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/core-services +## 0.7.1-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/rest-typings@7.0.0-rc.3 + - @rocket.chat/models@1.0.0-rc.3 +
+ ## 0.7.1-rc.2 ### Patch Changes diff --git a/packages/core-services/package.json b/packages/core-services/package.json index 6461f4378c15..97a43a683fc6 100644 --- a/packages/core-services/package.json +++ b/packages/core-services/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/core-services", - "version": "0.7.1-rc.2", + "version": "0.7.1-rc.3", "private": true, "devDependencies": { "@babel/core": "~7.25.8", diff --git a/packages/core-services/src/LocalBroker.ts b/packages/core-services/src/LocalBroker.ts index 5a89e44659a9..4420ab1a9e2d 100644 --- a/packages/core-services/src/LocalBroker.ts +++ b/packages/core-services/src/LocalBroker.ts @@ -1,6 +1,7 @@ import { EventEmitter } from 'events'; import { InstanceStatus } from '@rocket.chat/models'; +import { injectCurrentContext, tracerActiveSpan } from '@rocket.chat/tracing'; import { asyncLocalStorage } from '.'; import type { EventSignatures } from './events/Events'; @@ -17,17 +18,22 @@ export class LocalBroker implements IBroker { private services = new Set(); async call(method: string, data: any): Promise { - const result = await asyncLocalStorage.run( - { - id: 'ctx.id', - nodeID: 'ctx.nodeID', - requestID: 'ctx.requestID', - broker: this, + return tracerActiveSpan( + `action ${method}`, + {}, + () => { + return asyncLocalStorage.run( + { + id: 'ctx.id', + nodeID: 'ctx.nodeID', + requestID: 'ctx.requestID', + broker: this, + }, + (): any => this.methods.get(method)?.(...data), + ); }, - (): any => this.methods.get(method)?.(...data), + injectCurrentContext(), ); - - return result; } async destroyService(instance: ServiceClass): Promise { diff --git a/packages/core-services/src/lib/mongo.ts b/packages/core-services/src/lib/mongo.ts index b41d838cd4a7..d61eab602145 100644 --- a/packages/core-services/src/lib/mongo.ts +++ b/packages/core-services/src/lib/mongo.ts @@ -1,4 +1,4 @@ -import { initDatabaseTracing, isTracingEnabled } from '@rocket.chat/tracing'; +import { isTracingEnabled } from '@rocket.chat/tracing'; import { MongoClient } from 'mongodb'; import type { Db, Collection, MongoClientOptions, Document } from 'mongodb'; @@ -21,28 +21,27 @@ function connectDb(options?: MongoClientOptions): Promise { let db: Db; -export const getConnection = ((): ((options?: MongoClientOptions) => Promise) => { +export const getConnection = ((): ((options?: MongoClientOptions) => Promise<{ db: Db; client: MongoClient }>) => { let client: MongoClient; - return async (options): Promise => { + return async (options): Promise<{ db: Db; client: MongoClient }> => { if (db) { - return db; + return { db, client }; } if (client == null) { client = await connectDb(options); db = client.db(name); } - initDatabaseTracing(client); - // if getConnection was called multiple times before it was connected, wait for the connection - return client.db(name); + return { client, db: client.db(name) }; }; })(); export async function getTrashCollection(): Promise> { if (!db) { - db = await getConnection(); + const { db: clientDb } = await getConnection(); + db = clientDb; } return db.collection('rocketchat__trash'); } diff --git a/packages/core-typings/CHANGELOG.md b/packages/core-typings/CHANGELOG.md index 35ade27cad53..722b482bf227 100644 --- a/packages/core-typings/CHANGELOG.md +++ b/packages/core-typings/CHANGELOG.md @@ -1,5 +1,7 @@ # @rocket.chat/core-typings +## 7.0.0-rc.3 + ## 7.0.0-rc.2 ## 7.0.0-rc.1 diff --git a/packages/core-typings/src/ee/IWorkspaceCredentials.ts b/packages/core-typings/src/ee/IWorkspaceCredentials.ts index 1acf4570f3cf..1fda00d0c8b3 100644 --- a/packages/core-typings/src/ee/IWorkspaceCredentials.ts +++ b/packages/core-typings/src/ee/IWorkspaceCredentials.ts @@ -2,7 +2,7 @@ import type { IRocketChatRecord } from '../IRocketChatRecord'; export interface IWorkspaceCredentials extends IRocketChatRecord { _id: string; - scopes: string[]; + scope: string; expirationDate: Date; accessToken: string; } diff --git a/packages/cron/CHANGELOG.md b/packages/cron/CHANGELOG.md index d940035b4a0a..4ca2dea1a48c 100644 --- a/packages/cron/CHANGELOG.md +++ b/packages/cron/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/cron +## 0.1.9-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/models@1.0.0-rc.3 +
+ ## 0.1.9-rc.2 ### Patch Changes diff --git a/packages/cron/package.json b/packages/cron/package.json index 1fced5836b56..833fc0638dfa 100644 --- a/packages/cron/package.json +++ b/packages/cron/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/cron", - "version": "0.1.9-rc.2", + "version": "0.1.9-rc.3", "private": true, "devDependencies": { "eslint": "~8.45.0", diff --git a/packages/ddp-client/CHANGELOG.md b/packages/ddp-client/CHANGELOG.md index d3784ec7f943..d1f900a25efe 100644 --- a/packages/ddp-client/CHANGELOG.md +++ b/packages/ddp-client/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/ddp-client +## 0.3.9-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/rest-typings@7.0.0-rc.3 + - @rocket.chat/api-client@0.2.9-rc.3 +
+ ## 0.3.9-rc.2 ### Patch Changes diff --git a/packages/ddp-client/package.json b/packages/ddp-client/package.json index fa5acd8ee51f..904fc7b1b075 100644 --- a/packages/ddp-client/package.json +++ b/packages/ddp-client/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ddp-client", - "version": "0.3.9-rc.2", + "version": "0.3.9-rc.3", "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", "@types/jest": "~29.5.13", diff --git a/packages/freeswitch/CHANGELOG.md b/packages/freeswitch/CHANGELOG.md index c1905c5a5979..ed60ac56c645 100644 --- a/packages/freeswitch/CHANGELOG.md +++ b/packages/freeswitch/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/freeswitch +## 1.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 +
+ ## 1.0.0-rc.2 ### Patch Changes diff --git a/packages/freeswitch/package.json b/packages/freeswitch/package.json index 376108bab0ad..f4362426a0f6 100644 --- a/packages/freeswitch/package.json +++ b/packages/freeswitch/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/freeswitch", - "version": "1.0.0-rc.2", + "version": "1.0.0-rc.3", "private": true, "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", diff --git a/packages/fuselage-ui-kit/CHANGELOG.md b/packages/fuselage-ui-kit/CHANGELOG.md index df0ce069ab33..078efc4715c3 100644 --- a/packages/fuselage-ui-kit/CHANGELOG.md +++ b/packages/fuselage-ui-kit/CHANGELOG.md @@ -1,5 +1,18 @@ # Change Log +## 12.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/gazzodown@12.0.0-rc.3 + - @rocket.chat/ui-contexts@12.0.0-rc.3 + - @rocket.chat/ui-avatar@8.0.0-rc.3 + - @rocket.chat/ui-video-conf@12.0.0-rc.3 +
+ ## 12.0.0-rc.2 ### Patch Changes diff --git a/packages/fuselage-ui-kit/package.json b/packages/fuselage-ui-kit/package.json index eb50d9e5a150..56fa8c324666 100644 --- a/packages/fuselage-ui-kit/package.json +++ b/packages/fuselage-ui-kit/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/fuselage-ui-kit", - "version": "12.0.0-rc.2", + "version": "12.0.0-rc.3", "private": true, "description": "UiKit elements for Rocket.Chat Apps built under Fuselage design system", "homepage": "https://rocketchat.github.io/Rocket.Chat.Fuselage/", @@ -101,10 +101,10 @@ "@rocket.chat/icons": "*", "@rocket.chat/prettier-config": "*", "@rocket.chat/styled": "*", - "@rocket.chat/ui-avatar": "8.0.0-rc.2", - "@rocket.chat/ui-contexts": "12.0.0-rc.2", + "@rocket.chat/ui-avatar": "8.0.0-rc.3", + "@rocket.chat/ui-contexts": "12.0.0-rc.3", "@rocket.chat/ui-kit": "0.37.0-rc.0", - "@rocket.chat/ui-video-conf": "12.0.0-rc.2", + "@rocket.chat/ui-video-conf": "12.0.0-rc.3", "@tanstack/react-query": "*", "react": "~17.0.2", "react-dom": "*" diff --git a/packages/gazzodown/CHANGELOG.md b/packages/gazzodown/CHANGELOG.md index da317aade28d..58f2357ec2de 100644 --- a/packages/gazzodown/CHANGELOG.md +++ b/packages/gazzodown/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/gazzodown +## 12.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/ui-contexts@12.0.0-rc.3 + - @rocket.chat/ui-client@12.0.0-rc.3 +
+ ## 12.0.0-rc.2 ### Patch Changes diff --git a/packages/gazzodown/package.json b/packages/gazzodown/package.json index 7ac29d9b8387..3207e71b022c 100644 --- a/packages/gazzodown/package.json +++ b/packages/gazzodown/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/gazzodown", - "version": "12.0.0-rc.2", + "version": "12.0.0-rc.3", "private": true, "main": "./dist/index.js", "typings": "./dist/index.d.ts", @@ -75,8 +75,8 @@ "@rocket.chat/fuselage-tokens": "*", "@rocket.chat/message-parser": "0.31.31", "@rocket.chat/styled": "*", - "@rocket.chat/ui-client": "12.0.0-rc.2", - "@rocket.chat/ui-contexts": "12.0.0-rc.2", + "@rocket.chat/ui-client": "12.0.0-rc.3", + "@rocket.chat/ui-contexts": "12.0.0-rc.3", "katex": "*", "react": "*" }, diff --git a/packages/instance-status/CHANGELOG.md b/packages/instance-status/CHANGELOG.md index df55f1a30e15..1dfec3d3d92f 100644 --- a/packages/instance-status/CHANGELOG.md +++ b/packages/instance-status/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/instance-status +## 0.1.9-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/models@1.0.0-rc.3 +
+ ## 0.1.9-rc.2 ### Patch Changes diff --git a/packages/instance-status/package.json b/packages/instance-status/package.json index 01a5cd758525..05a5d3899e9a 100644 --- a/packages/instance-status/package.json +++ b/packages/instance-status/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/instance-status", - "version": "0.1.9-rc.2", + "version": "0.1.9-rc.3", "private": true, "devDependencies": { "@rocket.chat/eslint-config": "workspace:^", diff --git a/packages/livechat/CHANGELOG.md b/packages/livechat/CHANGELOG.md index 413396856655..c87095501486 100644 --- a/packages/livechat/CHANGELOG.md +++ b/packages/livechat/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/livechat Change Log +## 1.20.1-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/gazzodown@12.0.0-rc.3 +
+ ## 1.20.1-rc.2 ### Patch Changes diff --git a/packages/livechat/package.json b/packages/livechat/package.json index c5affb93aa2a..dab0fe2c0a90 100644 --- a/packages/livechat/package.json +++ b/packages/livechat/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/livechat", - "version": "1.20.1-rc.2", + "version": "1.20.1-rc.3", "files": [ "/build" ], diff --git a/packages/model-typings/CHANGELOG.md b/packages/model-typings/CHANGELOG.md index 5b5bb17cc673..29bba8c7605c 100644 --- a/packages/model-typings/CHANGELOG.md +++ b/packages/model-typings/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/model-typings +## 1.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 +
+ ## 1.0.0-rc.2 ### Patch Changes diff --git a/packages/model-typings/package.json b/packages/model-typings/package.json index 75cb376bba91..5d81916a6bb1 100644 --- a/packages/model-typings/package.json +++ b/packages/model-typings/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/model-typings", - "version": "1.0.0-rc.2", + "version": "1.0.0-rc.3", "private": true, "devDependencies": { "@types/node-rsa": "^1.1.4", diff --git a/packages/model-typings/src/models/ILivechatDepartmentAgentsModel.ts b/packages/model-typings/src/models/ILivechatDepartmentAgentsModel.ts index f0f151fa70d4..827b266421b3 100644 --- a/packages/model-typings/src/models/ILivechatDepartmentAgentsModel.ts +++ b/packages/model-typings/src/models/ILivechatDepartmentAgentsModel.ts @@ -64,7 +64,9 @@ export interface ILivechatDepartmentAgentsModel extends IBaseModel | undefined>; + countOnlineForDepartment(departmentId: string, isLivechatEnabledWhenAgentIdle?: boolean): Promise; getBotsForDepartment(departmentId: string): Promise>; + countBotsForDepartment(departmentId: string): Promise; getNextBotForDepartment( departmentId: ILivechatDepartmentAgents['departmentId'], ignoreAgentId?: ILivechatDepartmentAgents['agentId'], diff --git a/packages/model-typings/src/models/ILivechatVisitorsModel.ts b/packages/model-typings/src/models/ILivechatVisitorsModel.ts index 3e17fc2a5962..998d9106cdf7 100644 --- a/packages/model-typings/src/models/ILivechatVisitorsModel.ts +++ b/packages/model-typings/src/models/ILivechatVisitorsModel.ts @@ -16,7 +16,6 @@ import type { FindPaginated, IBaseModel } from './IBaseModel'; export interface ILivechatVisitorsModel extends IBaseModel { findById(_id: string, options?: FindOptions): FindCursor; getVisitorByToken(token: string, options?: FindOptions): Promise; - getVisitorsBetweenDate({ start, end, department }: { start: Date; end: Date; department?: string }): FindCursor; findByNameRegexWithExceptionsAndConditions

( searchTerm: string, exceptions: string[], @@ -77,4 +76,5 @@ export interface ILivechatVisitorsModel extends IBaseModel { data: { name?: string; username?: string; email?: string; phone?: string; livechatData: { [k: string]: any } }, ): Promise; setLastChatById(_id: string, lastChat: Required): Promise; + countVisitorsBetweenDate({ start, end, department }: { start: Date; end: Date; department?: string }): Promise; } diff --git a/packages/model-typings/src/models/IMessagesModel.ts b/packages/model-typings/src/models/IMessagesModel.ts index 986a50c8cd29..116b00fc6fee 100644 --- a/packages/model-typings/src/models/IMessagesModel.ts +++ b/packages/model-typings/src/models/IMessagesModel.ts @@ -291,4 +291,6 @@ export interface IMessagesModel extends IBaseModel { findThreadsByRoomId(rid: string, skip: number, limit: number): FindCursor; decreaseReplyCountById(_id: string, inc?: number): Promise; + countPinned(options?: CountDocumentsOptions): Promise; + countStarred(options?: CountDocumentsOptions): Promise; } diff --git a/packages/model-typings/src/models/IRolesModel.ts b/packages/model-typings/src/models/IRolesModel.ts index f039253f7bc3..84d49ef6baee 100644 --- a/packages/model-typings/src/models/IRolesModel.ts +++ b/packages/model-typings/src/models/IRolesModel.ts @@ -1,5 +1,5 @@ import type { IRole, IUser, IRoom } from '@rocket.chat/core-typings'; -import type { FindCursor, FindOptions } from 'mongodb'; +import type { FindCursor, FindOptions, CountDocumentsOptions } from 'mongodb'; import type { IBaseModel } from './IBaseModel'; @@ -62,4 +62,6 @@ export interface IRolesModel extends IBaseModel { canAddUserToRole(uid: IUser['_id'], roleId: IRole['_id'], scope?: IRoom['_id']): Promise; countUsersInRole(roleId: IRole['_id'], scope?: IRoom['_id']): Promise; + countByScope(scope: IRole['scope'], options?: CountDocumentsOptions): Promise; + countCustomRoles(options?: CountDocumentsOptions): Promise; } diff --git a/packages/model-typings/src/models/IRoomsModel.ts b/packages/model-typings/src/models/IRoomsModel.ts index d1235fc58958..83932626ed6e 100644 --- a/packages/model-typings/src/models/IRoomsModel.ts +++ b/packages/model-typings/src/models/IRoomsModel.ts @@ -8,6 +8,7 @@ import type { UpdateOptions, UpdateResult, ModifyResult, + CountDocumentsOptions, } from 'mongodb'; import type { Updater } from '../updater'; @@ -309,4 +310,7 @@ export interface IRoomsModel extends IBaseModel { e2eQueue?: IRoom['usersWaitingForE2EKeys'], ): Promise>; countGroupDMsByUids(uids: NonNullable): Promise; + countByCreatedOTR(options?: CountDocumentsOptions): Promise; + countByBroadcast(options?: CountDocumentsOptions): Promise; + countByE2E(options?: CountDocumentsOptions): Promise; } diff --git a/packages/model-typings/src/models/IUsersModel.ts b/packages/model-typings/src/models/IUsersModel.ts index 6029b4913f2d..a2863aba8fe5 100644 --- a/packages/model-typings/src/models/IUsersModel.ts +++ b/packages/model-typings/src/models/IUsersModel.ts @@ -224,6 +224,7 @@ export interface IUsersModel extends IBaseModel { countFederatedExternalUsers(): Promise; findOnlineUserFromList(userList: string[], isLivechatEnabledWhenAgentIdle?: boolean): FindCursor; + countOnlineUserFromList(userList: string[], isLivechatEnabledWhenAgentIdle?: boolean): Promise; getUnavailableAgents( departmentId?: string, extraQuery?: Document, @@ -244,6 +245,7 @@ export interface IUsersModel extends IBaseModel { ): Promise; findBotAgents(usernameList?: string[]): FindCursor; + countBotAgents(usernameList?: string[]): Promise; removeAllRoomsByUserId(userId: string): Promise; removeRoomByUserId(userId: string, rid: string): Promise; addRoomByUserId(userId: string, rid: string): Promise; diff --git a/packages/model-typings/src/models/IWorkspaceCredentialsModel.ts b/packages/model-typings/src/models/IWorkspaceCredentialsModel.ts index 58b9a8a5049d..fa13dfa82977 100644 --- a/packages/model-typings/src/models/IWorkspaceCredentialsModel.ts +++ b/packages/model-typings/src/models/IWorkspaceCredentialsModel.ts @@ -5,7 +5,6 @@ import type { IBaseModel } from './IBaseModel'; export interface IWorkspaceCredentialsModel extends IBaseModel { getCredentialByScope(scope?: string): Promise; - unsetCredentialByScope(scope?: string): Promise; updateCredentialByScope(credentials: { scope: string; accessToken: string; expirationDate: Date }): Promise; removeAllCredentials(): Promise; } diff --git a/packages/models/CHANGELOG.md b/packages/models/CHANGELOG.md index 897dbca44163..9778f5366e8e 100644 --- a/packages/models/CHANGELOG.md +++ b/packages/models/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/models +## 1.0.0-rc.3 + +### Patch Changes + +-

Updated dependencies []: + + - @rocket.chat/model-typings@1.0.0-rc.3 +
+ ## 1.0.0-rc.2 ### Patch Changes diff --git a/packages/models/package.json b/packages/models/package.json index f138766a4dd3..58c96184b345 100644 --- a/packages/models/package.json +++ b/packages/models/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/models", - "version": "1.0.0-rc.2", + "version": "1.0.0-rc.3", "private": true, "devDependencies": { "@rocket.chat/jest-presets": "workspace:~", diff --git a/packages/rest-typings/CHANGELOG.md b/packages/rest-typings/CHANGELOG.md index b10699809231..9c320da06e8b 100644 --- a/packages/rest-typings/CHANGELOG.md +++ b/packages/rest-typings/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/rest-typings +## 7.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 +
+ ## 7.0.0-rc.2 ### Patch Changes diff --git a/packages/tracing/src/index.ts b/packages/tracing/src/index.ts index 8e97dabc63c5..95e726fd4420 100644 --- a/packages/tracing/src/index.ts +++ b/packages/tracing/src/index.ts @@ -2,8 +2,9 @@ import { context, propagation, SpanStatusCode, trace } from '@opentelemetry/api' import type { Span, SpanOptions, Tracer } from '@opentelemetry/api'; import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-grpc'; import { NodeSDK } from '@opentelemetry/sdk-node'; +import type { MongoClient } from 'mongodb'; -export { initDatabaseTracing } from './traceDatabaseCalls'; +import { initDatabaseTracing } from './traceDatabaseCalls'; let tracer: Tracer | undefined; @@ -11,7 +12,11 @@ export function isTracingEnabled() { return ['yes', 'true'].includes(String(process.env.TRACING_ENABLED).toLowerCase()); } -export const startTracing = ({ service }: { service: string }) => { +export const startTracing = ({ service, db }: { service: string; db: MongoClient }) => { + if (!isTracingEnabled()) { + return; + } + const exporter = new OTLPTraceExporter(); const sdk = new NodeSDK({ @@ -22,6 +27,8 @@ export const startTracing = ({ service }: { service: string }) => { sdk.start(); tracer = trace.getTracer(service); + + initDatabaseTracing(tracer, db); }; export function tracerSpan ReturnType>( diff --git a/packages/tracing/src/traceDatabaseCalls.ts b/packages/tracing/src/traceDatabaseCalls.ts index 6ddde0b39753..8f5f2ba4a7bd 100644 --- a/packages/tracing/src/traceDatabaseCalls.ts +++ b/packages/tracing/src/traceDatabaseCalls.ts @@ -1,15 +1,8 @@ +import type { Tracer } from '@opentelemetry/api'; import { trace, context, SpanStatusCode } from '@opentelemetry/api'; import type { MongoClient } from 'mongodb'; -import { isTracingEnabled } from '.'; - -const tracer = trace.getTracer('core'); - -export const initDatabaseTracing = (client: MongoClient) => { - if (!isTracingEnabled()) { - return; - } - +export const initDatabaseTracing = (tracer: Tracer, client: MongoClient) => { const DurationStart = new Map(); client.on('commandStarted', (event) => { diff --git a/packages/ui-avatar/CHANGELOG.md b/packages/ui-avatar/CHANGELOG.md index 69b982da2b70..a8931e77564f 100644 --- a/packages/ui-avatar/CHANGELOG.md +++ b/packages/ui-avatar/CHANGELOG.md @@ -1,5 +1,14 @@ # @rocket.chat/ui-avatar +## 8.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@12.0.0-rc.3 +
+ ## 8.0.0-rc.2 ### Patch Changes diff --git a/packages/ui-avatar/package.json b/packages/ui-avatar/package.json index 4eeeb05e9956..188b5cba0e47 100644 --- a/packages/ui-avatar/package.json +++ b/packages/ui-avatar/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-avatar", - "version": "8.0.0-rc.2", + "version": "8.0.0-rc.3", "private": true, "devDependencies": { "@babel/core": "~7.25.8", @@ -30,7 +30,7 @@ ], "peerDependencies": { "@rocket.chat/fuselage": "*", - "@rocket.chat/ui-contexts": "12.0.0-rc.2", + "@rocket.chat/ui-contexts": "12.0.0-rc.3", "react": "~17.0.2" }, "volta": { diff --git a/packages/ui-client/CHANGELOG.md b/packages/ui-client/CHANGELOG.md index 2c467a91aff2..cee0baffbac0 100644 --- a/packages/ui-client/CHANGELOG.md +++ b/packages/ui-client/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/ui-client +## 12.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@12.0.0-rc.3 + - @rocket.chat/ui-avatar@8.0.0-rc.3 +
+ ## 12.0.0-rc.2 ### Patch Changes diff --git a/packages/ui-client/package.json b/packages/ui-client/package.json index 4811cdbd44b5..94684b465d05 100644 --- a/packages/ui-client/package.json +++ b/packages/ui-client/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-client", - "version": "12.0.0-rc.2", + "version": "12.0.0-rc.3", "private": true, "main": "./dist/index.js", "typings": "./dist/index.d.ts", @@ -60,8 +60,8 @@ "@rocket.chat/fuselage": "*", "@rocket.chat/fuselage-hooks": "*", "@rocket.chat/icons": "*", - "@rocket.chat/ui-avatar": "8.0.0-rc.2", - "@rocket.chat/ui-contexts": "12.0.0-rc.2", + "@rocket.chat/ui-avatar": "8.0.0-rc.3", + "@rocket.chat/ui-contexts": "12.0.0-rc.3", "react": "*", "react-i18next": "*" }, diff --git a/packages/ui-contexts/CHANGELOG.md b/packages/ui-contexts/CHANGELOG.md index cd3a2999445d..674ccf92fa78 100644 --- a/packages/ui-contexts/CHANGELOG.md +++ b/packages/ui-contexts/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/ui-contexts +## 12.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/core-typings@7.0.0-rc.3 + - @rocket.chat/rest-typings@7.0.0-rc.3 + - @rocket.chat/ddp-client@0.3.9-rc.3 +
+ ## 12.0.0-rc.2 ### Patch Changes diff --git a/packages/ui-contexts/package.json b/packages/ui-contexts/package.json index 2be1327ded89..82d74e0e221e 100644 --- a/packages/ui-contexts/package.json +++ b/packages/ui-contexts/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-contexts", - "version": "12.0.0-rc.2", + "version": "12.0.0-rc.3", "private": true, "devDependencies": { "@rocket.chat/core-typings": "workspace:^", diff --git a/packages/ui-video-conf/CHANGELOG.md b/packages/ui-video-conf/CHANGELOG.md index ea3fb9a440eb..78fb1ed355db 100644 --- a/packages/ui-video-conf/CHANGELOG.md +++ b/packages/ui-video-conf/CHANGELOG.md @@ -1,5 +1,15 @@ # @rocket.chat/ui-video-conf +## 12.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@12.0.0-rc.3 + - @rocket.chat/ui-avatar@8.0.0-rc.3 +
+ ## 12.0.0-rc.2 ### Patch Changes diff --git a/packages/ui-video-conf/package.json b/packages/ui-video-conf/package.json index 4d15b5745c12..9b063ed2dd20 100644 --- a/packages/ui-video-conf/package.json +++ b/packages/ui-video-conf/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-video-conf", - "version": "12.0.0-rc.2", + "version": "12.0.0-rc.3", "private": true, "main": "./dist/index.js", "typings": "./dist/index.d.ts", @@ -58,8 +58,8 @@ "@rocket.chat/fuselage-hooks": "*", "@rocket.chat/icons": "*", "@rocket.chat/styled": "*", - "@rocket.chat/ui-avatar": "8.0.0-rc.2", - "@rocket.chat/ui-contexts": "12.0.0-rc.2", + "@rocket.chat/ui-avatar": "8.0.0-rc.3", + "@rocket.chat/ui-contexts": "12.0.0-rc.3", "react": "~17.0.2", "react-dom": "^17.0.2" }, diff --git a/packages/ui-voip/CHANGELOG.md b/packages/ui-voip/CHANGELOG.md index 5bb5779af93e..08dcddb94073 100644 --- a/packages/ui-voip/CHANGELOG.md +++ b/packages/ui-voip/CHANGELOG.md @@ -1,5 +1,16 @@ # @rocket.chat/ui-voip +## 2.0.0-rc.3 + +### Patch Changes + +-
Updated dependencies []: + + - @rocket.chat/ui-contexts@12.0.0-rc.3 + - @rocket.chat/ui-avatar@8.0.0-rc.3 + - @rocket.chat/ui-client@12.0.0-rc.3 +
+ ## 2.0.0-rc.2 ### Patch Changes diff --git a/packages/ui-voip/package.json b/packages/ui-voip/package.json index f1e79d3352ed..ff25c6795899 100644 --- a/packages/ui-voip/package.json +++ b/packages/ui-voip/package.json @@ -1,6 +1,6 @@ { "name": "@rocket.chat/ui-voip", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.3", "private": true, "main": "./dist/index.js", "typings": "./dist/index.d.ts", @@ -67,9 +67,9 @@ "@rocket.chat/fuselage-hooks": "*", "@rocket.chat/icons": "*", "@rocket.chat/styled": "*", - "@rocket.chat/ui-avatar": "8.0.0-rc.2", - "@rocket.chat/ui-client": "12.0.0-rc.2", - "@rocket.chat/ui-contexts": "12.0.0-rc.2", + "@rocket.chat/ui-avatar": "8.0.0-rc.3", + "@rocket.chat/ui-client": "12.0.0-rc.3", + "@rocket.chat/ui-contexts": "12.0.0-rc.3", "react": "~17.0.2", "react-aria": "~3.23.1", "react-dom": "^17.0.2" diff --git a/packages/ui-voip/src/components/VoipActionButton/VoipActionButton.tsx b/packages/ui-voip/src/components/VoipActionButton/VoipActionButton.tsx index a10084934cd4..249582107b5f 100644 --- a/packages/ui-voip/src/components/VoipActionButton/VoipActionButton.tsx +++ b/packages/ui-voip/src/components/VoipActionButton/VoipActionButton.tsx @@ -11,9 +11,9 @@ type ActionButtonProps = Pick, 'clas const VoipActionButton = ({ disabled, label, pressed, icon, danger, success, className, onClick }: ActionButtonProps) => ( } title={label} diff --git a/packages/ui-voip/src/components/VoipActionButton/__snapshots__/VoipActionButton.spec.tsx.snap b/packages/ui-voip/src/components/VoipActionButton/__snapshots__/VoipActionButton.spec.tsx.snap index 2f4b29aa9de8..516c82d68465 100644 --- a/packages/ui-voip/src/components/VoipActionButton/__snapshots__/VoipActionButton.spec.tsx.snap +++ b/packages/ui-voip/src/components/VoipActionButton/__snapshots__/VoipActionButton.spec.tsx.snap @@ -25,7 +25,7 @@ exports[`renders NeutralButton without crashing 1`] = `