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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions .github/pr-title-checker-config.json

This file was deleted.

17 changes: 0 additions & 17 deletions .github/workflows/pr-title-checker.yml

This file was deleted.

1 change: 1 addition & 0 deletions apps/meteor/app/2fa/server/code/PasswordCheckFallback.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { IUser } from '@rocket.chat/core-typings';
import { Accounts } from 'meteor/accounts-base';
import type { Meteor } from 'meteor/meteor';

import type { ICodeCheck, IProcessInvalidCodeResult } from './ICodeCheck';
import { settings } from '../../../settings/server';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Users } from '@rocket.chat/models';
import { Meteor } from 'meteor/meteor';

import { addUserToDefaultChannels } from './addUserToDefaultChannels';

Expand Down
1 change: 1 addition & 0 deletions apps/meteor/app/livechat/imports/server/rest/inquiries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { getPaginationItems } from '../../../../api/server/helpers/getPagination
import { findInquiries, findOneInquiryByRoomId } from '../../../server/api/lib/inquiries';
import { returnRoomAsInquiry } from '../../../server/lib/rooms';
import { takeInquiry } from '../../../server/lib/takeInquiry';
import { Meteor } from 'meteor/meteor';

API.v1.addRoute(
'livechat/inquiries.list',
Expand Down
9 changes: 5 additions & 4 deletions apps/meteor/app/livechat/server/api/v1/room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
} from '@rocket.chat/rest-typings';
import { isPOSTLivechatVisitorDepartmentTransferParams } from '@rocket.chat/rest-typings/src/v1/omnichannel';
import { check } from 'meteor/check';
import { Meteor } from 'meteor/meteor';

import { callbacks } from '../../../../../server/lib/callbacks';
import { i18n } from '../../../../../server/lib/i18n';
Expand Down Expand Up @@ -67,7 +68,7 @@ API.v1.addRoute(
agentId: Match.Maybe(String),
});

check(this.queryParams, extraCheckParams as any);
check(this.queryParams, extraCheckParams);

const { token, rid, agentId, ...extraParams } = this.queryParams;

Expand Down Expand Up @@ -291,7 +292,7 @@ API.v1.addRoute(
};

const room = await LivechatRooms.findOneById(this.bodyParams.roomId);
if (!room || room.t !== 'l') {
if (room?.t !== 'l') {
throw new Error('error-invalid-room');
}

Expand Down Expand Up @@ -358,7 +359,7 @@ const livechatVisitorDepartmentTransfer = API.v1.post(
}
const room = await LivechatRooms.findOneById(rid);

if (!room || room.t !== 'l') {
if (room?.t !== 'l') {
return API.v1.failure('error-invalid-room');
}

Expand Down Expand Up @@ -463,7 +464,7 @@ API.v1.addRoute(

const firstError = result.find((item) => item.status === 'rejected');
if (firstError) {
throw new Error((firstError as PromiseRejectedResult).reason.error);
throw new Error(firstError.reason.error);
}

await callbacks.run('livechat.saveInfo', await LivechatRooms.findOneById(roomData._id), {
Expand Down
1 change: 1 addition & 0 deletions apps/meteor/app/livechat/server/lib/rooms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
Users,
ReadReceipts,
} from '@rocket.chat/models';
import { Meteor } from 'meteor/meteor';

import { normalizeTransferredByData } from './Helper';
import { QueueManager } from './QueueManager';
Expand Down
1 change: 1 addition & 0 deletions apps/meteor/app/livechat/server/lib/sendTranscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { MessageTypes } from '@rocket.chat/message-types';
import { LivechatRooms, Messages, Uploads, Users } from '@rocket.chat/models';
import createDOMPurify from 'dompurify';
import { JSDOM } from 'jsdom';
import { Meteor } from 'meteor/meteor';
import moment from 'moment-timezone';

import { callbacks } from '../../../../server/lib/callbacks';
Expand Down
1 change: 1 addition & 0 deletions apps/meteor/app/slashcommands-leave/server/leave.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { api } from '@rocket.chat/core-services';
import type { SlashCommandCallbackParams } from '@rocket.chat/core-typings';
import { Users } from '@rocket.chat/models';
import { Meteor } from 'meteor/meteor';

import { i18n } from '../../../server/lib/i18n';
import { leaveRoomMethod } from '../../lib/server/methods/leaveRoom';
Expand Down
1 change: 1 addition & 0 deletions apps/meteor/client/lib/2fa/overrideLoginMethod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Accounts } from 'meteor/accounts-base';
import type { Meteor } from 'meteor/meteor';

import { isTotpInvalidError, isTotpMaxAttemptsError, isTotpRequiredError } from './utils';

Expand Down
2 changes: 2 additions & 0 deletions apps/meteor/client/lib/2fa/utils.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { Meteor } from 'meteor/meteor';

export const isTotpRequiredError = (
error: unknown,
): error is Meteor.Error & ({ error: 'totp-required' } | { errorType: 'totp-required' }) =>
Expand Down
2 changes: 2 additions & 0 deletions apps/meteor/client/meteor/minimongo/DiffSequence.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Meteor } from 'meteor/meteor';

import type { IdMap } from './IdMap';
import { clone, hasOwn, equals } from './common';
import type { Observer, OrderedObserver, UnorderedObserver } from './observers';
Expand Down
6 changes: 3 additions & 3 deletions apps/meteor/client/views/marketplace/AppMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { App } from '@rocket.chat/core-typings';
import { MenuItem, MenuItemContent, MenuSection, MenuV2, Skeleton } from '@rocket.chat/fuselage';
import { MenuItem, MenuItemContent, MenuSection, Menu, Skeleton } from '@rocket.chat/fuselage';
import { useHandleMenuAction } from '@rocket.chat/ui-client';
import { memo } from 'react';
import { useTranslation } from 'react-i18next';
Expand Down Expand Up @@ -31,7 +31,7 @@ const AppMenu = ({ app, isAppDetailsPage }: AppMenuProps) => {
}

return (
<MenuV2 title={t('More_options')} onAction={onAction} disabledKeys={disabledKeys} detached>
<Menu title={t('More_options')} onAction={onAction} disabledKeys={disabledKeys} detached>
{sections.map(({ items }, idx) => (
<MenuSection key={idx} items={items}>
{items.map((option) => (
Expand All @@ -41,7 +41,7 @@ const AppMenu = ({ app, isAppDetailsPage }: AppMenuProps) => {
))}
</MenuSection>
))}
</MenuV2>
</Menu>
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ type DepartmentItemMenuProps = {
archived: boolean;
};

// TODO: Use MenuV2 instead of Menu
const DepartmentItemMenu = ({ department, archived }: DepartmentItemMenuProps): ReactElement => {
const { t } = useTranslation();
const queryClient = useQueryClient();
Expand Down
1 change: 1 addition & 0 deletions apps/meteor/client/views/root/hooks/useIframe.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useEffectEvent } from '@rocket.chat/fuselage-hooks';
import { useLoginWithIframe, useLoginWithToken, useSetting } from '@rocket.chat/ui-contexts';
import type { Meteor } from 'meteor/meteor';
import { useCallback, useEffect, useState } from 'react';

export const useIframe = () => {
Expand Down
3 changes: 2 additions & 1 deletion apps/meteor/definition/externals/meteor/accounts-base.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
declare module 'meteor/accounts-base' {
import type { Meteor } from 'meteor/meteor';

namespace Accounts {
const storageLocation: Window['localStorage'];
function createUser(
Expand Down Expand Up @@ -65,7 +67,6 @@ declare module 'meteor/accounts-base' {

export const _options: AccountsServerOptions;

// eslint-disable-next-line @typescript-eslint/no-namespace
namespace oauth {
function credentialRequestCompleteHandler(
callback?: (error?: globalThis.Error | Meteor.Error | Meteor.TypedError) => void,
Expand Down
1 change: 1 addition & 0 deletions apps/meteor/definition/externals/meteor/http.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'meteor/http';
import type { Meteor } from 'meteor/meteor';

declare module 'meteor/http' {
namespace HTTP {
Expand Down
1 change: 1 addition & 0 deletions apps/meteor/definition/externals/meteor/oauth.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
declare module 'meteor/oauth' {
import type { IRocketChatRecord } from '@rocket.chat/core-typings';
import type { Meteor } from 'meteor/meteor';
import type { Mongo } from 'meteor/mongo';

// These functions may only be used on the client's Mongo.Collection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
validateForbiddenErrorResponse,
validateUnauthorizedErrorResponse,
} from '@rocket.chat/rest-typings';
import { Meteor } from 'meteor/meteor';

import { findMonitors, findMonitorByUsername } from './lib/monitors';
import { API } from '../../../../../app/api/server';
Expand Down
1 change: 1 addition & 0 deletions apps/meteor/ee/app/livechat-enterprise/server/lib/unit.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { LivechatUnit } from '@rocket.chat/models';
import { getUnitsFromUser } from '@rocket.chat/omni-core-ee';
import { Meteor } from 'meteor/meteor';

import type { CheckUnitsFromUser } from '../../../../../app/livechat/server/api/lib/livechat';
import { checkUnitsFromUser } from '../../../../../app/livechat/server/api/lib/livechat';
Expand Down
1 change: 1 addition & 0 deletions apps/meteor/ee/server/api/roles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { IRole } from '@rocket.chat/core-typings';
import { License } from '@rocket.chat/license';
import { Roles } from '@rocket.chat/models';
import { ajv } from '@rocket.chat/rest-typings';
import { Meteor } from 'meteor/meteor';

import { API } from '../../../app/api/server/api';
import { hasPermissionAsync } from '../../../app/authorization/server/functions/hasPermission';
Expand Down
1 change: 1 addition & 0 deletions apps/meteor/ee/server/configuration/abac.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { License } from '@rocket.chat/license';
import { Users } from '@rocket.chat/models';
import { Meteor } from 'meteor/meteor';

import { settings } from '../../../app/settings/server';
import { LDAPEE } from '../sdk';
Expand Down
2 changes: 2 additions & 0 deletions apps/meteor/ee/server/configuration/contact-verification.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Meteor } from 'meteor/meteor';

import { addSettings } from '../settings/contact-verification';

Meteor.startup(async () => {
Expand Down
4 changes: 2 additions & 2 deletions apps/meteor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@
"@rocket.chat/favicon": "workspace:^",
"@rocket.chat/federation-matrix": "workspace:^",
"@rocket.chat/federation-sdk": "0.3.9",
"@rocket.chat/fuselage": "^0.71.0",
"@rocket.chat/fuselage": "^0.73.0",
"@rocket.chat/fuselage-forms": "^1.0.0",
"@rocket.chat/fuselage-hooks": "^0.39.0",
"@rocket.chat/fuselage-hooks": "^0.40.0",
"@rocket.chat/fuselage-toastbar": "^0.35.2",
"@rocket.chat/fuselage-tokens": "~0.33.2",
"@rocket.chat/fuselage-ui-kit": "workspace:^",
Expand Down
1 change: 1 addition & 0 deletions apps/meteor/packages/autoupdate/autoupdate_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
// The client version of the client code currently running in the
// browser.

import { Meteor } from 'meteor/meteor';
import { ClientVersions } from './client_versions.js';

const clientArch = Meteor.isCordova ? 'web.cordova' : Meteor.isModern ? 'web.browser' : 'web.browser.legacy';
Expand Down
1 change: 1 addition & 0 deletions apps/meteor/packages/autoupdate/autoupdate_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
// The ID of each document is the client architecture, and the fields of
// the document are the versions described above.

import { Meteor } from 'meteor/meteor';
import { ClientVersions } from './client_versions.js';

export const Autoupdate = (__meteor_runtime_config__.autoupdate = {
Expand Down
1 change: 1 addition & 0 deletions apps/meteor/server/lib/cas/loginHandler.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { CredentialTokens, Users } from '@rocket.chat/models';
import { getObjectKeys, wrapExceptions } from '@rocket.chat/tools';
import { Accounts } from 'meteor/accounts-base';
import { Meteor } from 'meteor/meteor';

import { createNewUser } from './createNewUser';
import { findExistingCASUser } from './findExistingCASUser';
Expand Down
1 change: 1 addition & 0 deletions apps/meteor/server/lib/cas/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import url from 'url';
import { validate } from '@rocket.chat/cas-validate';
import type { ICredentialToken, RequiredField } from '@rocket.chat/core-typings';
import { CredentialTokens } from '@rocket.chat/models';
import { Meteor } from 'meteor/meteor';
import _ from 'underscore';

import { logger } from './logger';
Expand Down
1 change: 1 addition & 0 deletions apps/meteor/server/lib/compareUserPassword.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { IUser, IPassword } from '@rocket.chat/core-typings';
import { Accounts } from 'meteor/accounts-base';
import type { Meteor } from 'meteor/meteor';

/**
* Check if a given password is the one user by given user or if the user doesn't have a password
Expand Down
1 change: 1 addition & 0 deletions apps/meteor/server/lib/compareUserPasswordHistory.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { IUser, IPassword } from '@rocket.chat/core-typings';
import { Accounts } from 'meteor/accounts-base';
import type { Meteor } from 'meteor/meteor';

import { settings } from '../../app/settings/server';

Expand Down
1 change: 1 addition & 0 deletions apps/meteor/server/services/video-conference/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { Random } from '@rocket.chat/random';
import type { PaginatedResult } from '@rocket.chat/rest-typings';
import { wrapExceptions } from '@rocket.chat/tools';
import type * as UiKit from '@rocket.chat/ui-kit';
import { Meteor } from 'meteor/meteor';
import { MongoInternals } from 'meteor/mongo';

import { RocketChatAssets } from '../../../app/assets/server';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class ToastMessages {
waitForDisplay({ type, message }: { type: 'success' | 'error'; message?: string } = { type: 'success' }) {
if (message) {
return expect(
this.toastByType[type].last().locator('[role="alert"]', {
this.toastByType[type].last().locator(`[role=${type === 'error' ? '"alert"' : '"status"'}]`, {
hasText: message,
}),
).toBeVisible();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ const tStub = sinon.stub();
const { sendTranscript } = p.noCallThru().load('../../../../../../app/livechat/server/lib/sendTranscript', {
'@rocket.chat/models': modelsMock,
'@rocket.chat/logger': { Logger: mockLogger },
'meteor/meteor': {
Meteor: {
Error: globalThis.Error,
},
},
'meteor/check': { check: checkMock },
'../../../../server/lib/callbacks': {
callbacks: {
Expand Down
4 changes: 2 additions & 2 deletions apps/uikit-playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"@lezer/highlight": "^1.2.3",
"@rocket.chat/core-typings": "workspace:^",
"@rocket.chat/css-in-js": "~0.31.25",
"@rocket.chat/fuselage": "^0.71.0",
"@rocket.chat/fuselage-hooks": "^0.39.0",
"@rocket.chat/fuselage": "^0.73.0",
"@rocket.chat/fuselage-hooks": "^0.40.0",
"@rocket.chat/fuselage-toastbar": "^0.35.2",
"@rocket.chat/fuselage-tokens": "~0.33.2",
"@rocket.chat/fuselage-ui-kit": "workspace:~",
Expand Down
4 changes: 2 additions & 2 deletions ee/packages/ui-theming/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"devDependencies": {
"@rocket.chat/css-in-js": "~0.31.25",
"@rocket.chat/emitter": "^0.32.0",
"@rocket.chat/fuselage": "^0.71.0",
"@rocket.chat/fuselage-hooks": "^0.39.0",
"@rocket.chat/fuselage": "^0.73.0",
"@rocket.chat/fuselage-hooks": "^0.40.0",
"@rocket.chat/fuselage-tokens": "~0.33.2",
"@rocket.chat/icons": "~0.46.0",
"@rocket.chat/ui-contexts": "workspace:~",
Expand Down
4 changes: 2 additions & 2 deletions packages/fuselage-ui-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
"@rocket.chat/apps-engine": "workspace:^",
"@rocket.chat/core-typings": "workspace:^",
"@rocket.chat/emitter": "^0.32.0",
"@rocket.chat/fuselage": "^0.71.0",
"@rocket.chat/fuselage-hooks": "^0.39.0",
"@rocket.chat/fuselage": "^0.73.0",
"@rocket.chat/fuselage-hooks": "^0.40.0",
"@rocket.chat/fuselage-tokens": "~0.33.2",
"@rocket.chat/icons": "~0.46.0",
"@rocket.chat/jest-presets": "workspace:~",
Expand Down
4 changes: 2 additions & 2 deletions packages/gazzodown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"@rocket.chat/core-typings": "workspace:^",
"@rocket.chat/css-in-js": "~0.31.25",
"@rocket.chat/emitter": "^0.32.0",
"@rocket.chat/fuselage": "^0.71.0",
"@rocket.chat/fuselage-hooks": "^0.39.0",
"@rocket.chat/fuselage": "^0.73.0",
"@rocket.chat/fuselage-hooks": "^0.40.0",
"@rocket.chat/fuselage-tokens": "~0.33.2",
"@rocket.chat/icons": "~0.46.0",
"@rocket.chat/jest-presets": "workspace:~",
Expand Down
2 changes: 1 addition & 1 deletion packages/livechat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"@babel/preset-typescript": "~7.27.1",
"@rocket.chat/core-typings": "workspace:^",
"@rocket.chat/ddp-client": "workspace:^",
"@rocket.chat/fuselage-hooks": "^0.39.0",
"@rocket.chat/fuselage-hooks": "^0.40.0",
"@rocket.chat/fuselage-tokens": "~0.33.2",
"@rocket.chat/logo": "^0.32.4",
"@rocket.chat/ui-contexts": "workspace:^",
Expand Down
Loading
Loading