Skip to content

Commit 5169e1c

Browse files
Solve conflicts
2 parents 7cbb029 + e65db19 commit 5169e1c

File tree

114 files changed

+2415
-2930
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+2415
-2930
lines changed

.changeset/cuddly-garlics-cover.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@rocket.chat/meteor": patch
3+
---
4+
5+
Fixes unused `i18nTitle` provided by the app in message composer popup previewer
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@rocket.chat/meteor': minor
3+
---
4+
5+
Includes attachments metadata in JSON export if type is file when exporting messages

.changeset/twenty-camels-worry.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@rocket.chat/meteor': minor
3+
---
4+
5+
Adds wrapExceptions to handle an unhandled promise rejection when adding and/or updating OAuth apps

.changeset/yellow-cars-change.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@rocket.chat/fuselage-ui-kit': patch
3+
'@rocket.chat/ui-video-conf': patch
4+
'@rocket.chat/i18n': patch
5+
'@rocket.chat/meteor': patch
6+
---
7+
8+
Fixes an issue where video conf message block wasn't considering display avatars preference

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
/apps/meteor/app/voip @RocketChat/omnichannel
2121
/apps/meteor/app/sms @RocketChat/omnichannel
2222
/apps/meteor/server @RocketChat/backend
23-
/apps/meteor/server/models @RocketChat/Architecture
23+
/packages/models @RocketChat/Architecture
2424
apps/meteor/server/startup/migrations @RocketChat/Architecture
2525
/apps/meteor/packages/rocketchat-livechat @RocketChat/omnichannel
2626
/apps/meteor/server/services/voip-asterisk @RocketChat/omnichannel

apps/meteor/app/api/server/api.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Logger } from '@rocket.chat/logger';
33
import { Users } from '@rocket.chat/models';
44
import { Random } from '@rocket.chat/random';
55
import type { JoinPathPattern, Method } from '@rocket.chat/rest-typings';
6+
import { wrapExceptions } from '@rocket.chat/tools';
67
import express from 'express';
78
import type { Request, Response } from 'express';
89
import { Accounts } from 'meteor/accounts-base';
@@ -404,10 +405,14 @@ export class APIClass<TBasePath extends string = ''> {
404405
public reloadRoutesToRefreshRateLimiter(): void {
405406
this._routes.forEach((route) => {
406407
if (this.shouldAddRateLimitToRoute(route.options)) {
407-
this.addRateLimiterRuleForRoutes({
408-
routes: [route.path],
409-
rateLimiterOptions: route.options.rateLimiterOptions || defaultRateLimiterOptions,
410-
endpoints: Object.keys(route.endpoints).filter((endpoint) => endpoint !== 'options'),
408+
wrapExceptions(() =>
409+
this.addRateLimiterRuleForRoutes({
410+
routes: [route.path],
411+
rateLimiterOptions: route.options.rateLimiterOptions || defaultRateLimiterOptions,
412+
endpoints: Object.keys(route.endpoints).filter((endpoint) => endpoint !== 'options'),
413+
}),
414+
).catch((error) => {
415+
console.error(error.message);
411416
});
412417
}
413418
});
@@ -426,10 +431,10 @@ export class APIClass<TBasePath extends string = ''> {
426431
throw new Meteor.Error('"rateLimiterOptions" must be an object');
427432
}
428433
if (!rateLimiterOptions.numRequestsAllowed) {
429-
throw new Meteor.Error('You must set "numRequestsAllowed" property in rateLimiter for REST API endpoint');
434+
throw new Meteor.Error(`You must set "numRequestsAllowed" property in rateLimiter for REST API endpoint: ${routes}`);
430435
}
431436
if (!rateLimiterOptions.intervalTimeInMS) {
432-
throw new Meteor.Error('You must set "intervalTimeInMS" property in rateLimiter for REST API endpoint');
437+
throw new Meteor.Error(`You must set "intervalTimeInMS" property in rateLimiter for REST API endpoint: ${routes}`);
433438
}
434439
const addRateLimitRuleToEveryRoute = (routes: string[]) => {
435440
routes.forEach((route) => {

apps/meteor/app/api/server/v1/users.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ API.v1.addRoute(
623623
authRequired: false,
624624
rateLimiterOptions: {
625625
numRequestsAllowed: settings.get('Rate_Limiter_Limit_RegisterUser') ?? 1,
626-
intervalTimeInMS: settings.get('API_Enable_Rate_Limiter_Limit_Time_Default'),
626+
intervalTimeInMS: settings.get('API_Enable_Rate_Limiter_Limit_Time_Default') ?? 600000,
627627
},
628628
validateParams: isUserRegisterParamsPOST,
629629
},

apps/meteor/app/lib/client/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import './startup/settingsOnLoadSiteUrl';
21
import '../lib/MessageTypes';
32
import './OAuthProxy';
43
import './methods/sendMessage';

apps/meteor/app/lib/client/startup/settingsOnLoadSiteUrl.ts

Lines changed: 0 additions & 14 deletions
This file was deleted.

apps/meteor/app/push/server/apn.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1+
import apn from '@parse/node-apn';
12
import type { IAppsTokens, RequiredField } from '@rocket.chat/core-typings';
2-
import apn from 'apn';
33
import EJSON from 'ejson';
44

55
import type { PushOptions, PendingPushNotification } from './definition';
66
import { logger } from './logger';
77

88
let apnConnection: apn.Provider | undefined;
99

10-
declare module 'apn' {
10+
declare module '@parse/node-apn' {
1111
// eslint-disable-next-line @typescript-eslint/naming-convention
1212
interface Notification {
1313
setContentAvailable: (value: boolean | 1 | 0) => void;
@@ -72,7 +72,7 @@ export const sendAPN = ({
7272
response.failed.forEach((failure) => {
7373
logger.debug(`Got error code ${failure.status} for token ${userToken}`);
7474

75-
if (['400', '410'].includes(failure.status ?? '')) {
75+
if (['400', '410'].includes(String(failure.status))) {
7676
logger.debug(`Removing token ${userToken}`);
7777
_removeToken({
7878
apn: userToken,

0 commit comments

Comments
 (0)