Skip to content

Commit

Permalink
Merge branch 'develop' into test/collapser
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Nov 28, 2024
2 parents f90e853 + bc88ffa commit 54f7abf
Show file tree
Hide file tree
Showing 73 changed files with 222 additions and 191 deletions.
5 changes: 5 additions & 0 deletions .changeset/strange-countries-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

fixed an issue that caused the conference call ringer to fail to accept calls if the user logged out and in again
10 changes: 7 additions & 3 deletions apps/meteor/app/ecdh/Session.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type { X25519SecretKey, CryptographyKey } from 'sodium-plus';
import { SodiumPlus, X25519PublicKey } from 'sodium-plus';

let sodium: SodiumPlus;

export class Session {
// Encoding for the key exchange, no requirements to be small
protected readonly stringFormatKey: BufferEncoding = 'base64';
Expand All @@ -21,8 +19,14 @@ export class Session {

public publicKey: X25519PublicKey;

private static sodium: SodiumPlus | undefined;

async sodium(): Promise<SodiumPlus> {
return sodium || SodiumPlus.auto();
if (!Session.sodium) {
Session.sodium = await SodiumPlus.auto();
}

return Session.sodium;
}

get publicKeyString(): string {
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/app/lib/server/functions/setUserAvatar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export async function setUserAvatar(
}

return {
buffer: dataURI instanceof Buffer ? dataURI : Buffer.from(dataURI, 'binary'),
buffer: typeof dataURI === 'string' ? Buffer.from(dataURI, 'binary') : dataURI,
type: contentType,
};
}
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/app/livechat/client/externalFrame/crypto.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function ab2str(buf: ArrayBuffer): string {
function ab2str(buf: ArrayLike<number> | ArrayBuffer): string {
return String.fromCharCode(...new Uint16Array(buf));
}

Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/app/meteor-accounts-saml/server/lib/Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ export class SAMLUtils {
return mainValue;
}

public static convertArrayBufferToString(buffer: ArrayBuffer, encoding: BufferEncoding = 'utf8'): string {
public static convertArrayBufferToString(buffer: Buffer<ArrayBufferLike>, encoding: BufferEncoding = 'utf8'): string {
return Buffer.from(buffer).toString(encoding);
}

Expand Down
1 change: 1 addition & 0 deletions apps/meteor/client/lib/VideoConfManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ export const VideoConfManager = new (class VideoConfManager extends Emitter<Vide
clearTimeout(call.acceptTimeout);
}
});
this.userId = undefined;
this.incomingDirectCalls.clear();
this.dismissedCalls.clear();
this.currentCallData = undefined;
Expand Down
4 changes: 1 addition & 3 deletions apps/meteor/client/views/room/webdav/SaveToWebdavModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,11 @@ const SaveToWebdavModal = ({ onClose, data }: SaveToWebdavModalProps): ReactElem
fileRequest.current.onload = async (): Promise<void> => {
const arrayBuffer = fileRequest.current?.response;
if (arrayBuffer) {
const fileData = new Uint8Array(arrayBuffer);

try {
if (!title) {
throw new Error('File name is required');
}
const response = await uploadFileToWebdav(accountId, fileData, title);
const response = await uploadFileToWebdav(accountId, arrayBuffer, title);
if (!response.success) {
throw new Error(response.message ? t(response.message) : 'Error uploading file');
}
Expand Down
4 changes: 2 additions & 2 deletions apps/meteor/ee/server/services/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@
"@types/ejson": "^2.2.2",
"@types/express": "^4.17.21",
"@types/fibers": "^3.1.4",
"@types/node": "~20.16.15",
"@types/node": "~20.17.8",
"@types/ws": "^8.5.13",
"npm-run-all": "^4.1.5",
"pino-pretty": "^7.6.1",
"ts-node": "^10.9.2",
"typescript": "~5.6.3"
"typescript": "~5.7.2"
},
"volta": {
"extends": "../../../package.json"
Expand Down
6 changes: 3 additions & 3 deletions apps/meteor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"@types/meteor-collection-hooks": "^0.8.9",
"@types/mkdirp": "^1.0.2",
"@types/mocha": "github:whitecolor/mocha-types",
"@types/node": "~20.16.15",
"@types/node": "~20.17.8",
"@types/node-gcm": "^1.0.5",
"@types/node-rsa": "^1.1.4",
"@types/nodemailer": "^6.4.16",
Expand Down Expand Up @@ -214,7 +214,7 @@
"supports-color": "~7.2.0",
"template-file": "^6.0.1",
"ts-node": "^10.9.2",
"typescript": "~5.6.3"
"typescript": "~5.7.2"
},
"dependencies": {
"@babel/runtime": "~7.26.0",
Expand Down Expand Up @@ -433,7 +433,7 @@
"tinykeys": "^1.4.0",
"twilio": "^3.84.1",
"twit": "^2.2.11",
"typia": "~6.11.4",
"typia": "~6.12.2",
"ua-parser-js": "^1.0.39",
"underscore": "^1.13.7",
"universal-perf-hooks": "^1.0.1",
Expand Down
6 changes: 3 additions & 3 deletions apps/meteor/server/lib/ldap/Connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,11 @@ export class LDAPConnection {
return value.map((item) => this.extractLdapAttribute(item));
}

if (value instanceof Buffer) {
return value.toString();
if (typeof value === 'string') {
return value;
}

return value;
return value.toString();
}

public extractLdapEntryData(entry: ldapjs.SearchEntry): ILDAPEntry {
Expand Down
2 changes: 1 addition & 1 deletion apps/uikit-playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"eslint": "~8.45.0",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.14",
"typescript": "~5.6.3",
"typescript": "~5.7.2",
"vite": "^5.4.11"
},
"volta": {
Expand Down
4 changes: 2 additions & 2 deletions ee/apps/account-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@rocket.chat/string-helpers": "~0.31.25",
"@rocket.chat/tools": "workspace:^",
"@rocket.chat/tracing": "workspace:^",
"@types/node": "~20.16.15",
"@types/node": "~20.17.8",
"bcrypt": "^5.1.1",
"ejson": "^2.2.3",
"event-loop-stats": "^1.4.1",
Expand All @@ -46,7 +46,7 @@
"@types/polka": "^0.5.7",
"eslint": "~8.45.0",
"ts-node": "^10.9.2",
"typescript": "~5.6.3"
"typescript": "~5.7.2"
},
"main": "./dist/ee/apps/account-service/src/service.js",
"files": [
Expand Down
4 changes: 2 additions & 2 deletions ee/apps/authorization-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@rocket.chat/rest-typings": "workspace:^",
"@rocket.chat/string-helpers": "~0.31.25",
"@rocket.chat/tracing": "workspace:^",
"@types/node": "~20.16.15",
"@types/node": "~20.17.8",
"ejson": "^2.2.3",
"event-loop-stats": "^1.4.1",
"eventemitter3": "^5.0.1",
Expand All @@ -42,7 +42,7 @@
"@types/polka": "^0.5.7",
"eslint": "~8.45.0",
"ts-node": "^10.9.2",
"typescript": "~5.6.3"
"typescript": "~5.7.2"
},
"main": "./dist/ee/apps/authorization-service/src/service.js",
"files": [
Expand Down
4 changes: 2 additions & 2 deletions ee/apps/ddp-streamer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@
"@types/ejson": "^2.2.2",
"@types/gc-stats": "^1.4.3",
"@types/meteor": "^2.9.8",
"@types/node": "~20.16.15",
"@types/node": "~20.17.8",
"@types/polka": "^0.5.7",
"@types/uuid": "^10.0.0",
"@types/ws": "^8.5.13",
"eslint": "~8.45.0",
"pino-pretty": "^7.6.1",
"ts-node": "^10.9.2",
"typescript": "~5.6.3"
"typescript": "~5.7.2"
},
"main": "./dist/service.js",
"files": [
Expand Down
4 changes: 2 additions & 2 deletions ee/apps/omnichannel-transcript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@rocket.chat/pdf-worker": "workspace:^",
"@rocket.chat/tools": "workspace:^",
"@rocket.chat/tracing": "workspace:^",
"@types/node": "~20.16.15",
"@types/node": "~20.17.8",
"ejson": "^2.2.3",
"emoji-toolkit": "^7.0.1",
"event-loop-stats": "^1.4.1",
Expand All @@ -48,7 +48,7 @@
"@types/polka": "^0.5.7",
"eslint": "~8.45.0",
"ts-node": "^10.9.2",
"typescript": "~5.6.3"
"typescript": "~5.7.2"
},
"main": "./dist/ee/apps/omnichannel-transcript/src/service.js",
"files": [
Expand Down
4 changes: 2 additions & 2 deletions ee/apps/presence-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@rocket.chat/presence": "workspace:^",
"@rocket.chat/string-helpers": "~0.31.25",
"@rocket.chat/tracing": "workspace:^",
"@types/node": "~20.16.15",
"@types/node": "~20.17.8",
"ejson": "^2.2.3",
"event-loop-stats": "^1.4.1",
"eventemitter3": "^5.0.1",
Expand All @@ -42,7 +42,7 @@
"@types/polka": "^0.5.7",
"eslint": "~8.45.0",
"ts-node": "^10.9.2",
"typescript": "~5.6.3"
"typescript": "~5.7.2"
},
"main": "./dist/ee/apps/presence-service/src/service.js",
"files": [
Expand Down
4 changes: 2 additions & 2 deletions ee/apps/queue-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@rocket.chat/network-broker": "workspace:^",
"@rocket.chat/omnichannel-services": "workspace:^",
"@rocket.chat/tracing": "workspace:^",
"@types/node": "~20.16.15",
"@types/node": "~20.17.8",
"ejson": "^2.2.3",
"emoji-toolkit": "^7.0.1",
"event-loop-stats": "^1.4.1",
Expand All @@ -45,7 +45,7 @@
"@types/polka": "^0.5.7",
"eslint": "~8.45.0",
"ts-node": "^10.9.2",
"typescript": "~5.6.3"
"typescript": "~5.7.2"
},
"main": "./dist/ee/apps/queue-worker/src/service.js",
"files": [
Expand Down
4 changes: 2 additions & 2 deletions ee/apps/stream-hub-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@rocket.chat/network-broker": "workspace:^",
"@rocket.chat/string-helpers": "~0.31.25",
"@rocket.chat/tracing": "workspace:^",
"@types/node": "~20.16.15",
"@types/node": "~20.17.8",
"ejson": "^2.2.3",
"event-loop-stats": "^1.4.1",
"eventemitter3": "^5.0.1",
Expand All @@ -44,7 +44,7 @@
"@types/polka": "^0.5.7",
"eslint": "~8.45.0",
"ts-node": "^10.9.2",
"typescript": "~5.6.3"
"typescript": "~5.7.2"
},
"main": "./dist/ee/apps/stream-hub-service/src/service.js",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion ee/packages/license/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"eslint": "~8.45.0",
"jest": "~29.7.0",
"jest-websocket-mock": "~2.5.0",
"typescript": "~5.6.3"
"typescript": "~5.7.2"
},
"scripts": {
"build": "tsc",
Expand Down
4 changes: 2 additions & 2 deletions ee/packages/network-broker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
"@rocket.chat/eslint-config": "workspace:^",
"@types/chai": "~4.3.20",
"@types/ejson": "^2.2.2",
"@types/node": "~20.16.15",
"@types/node": "~20.17.8",
"@types/sinon": "^10.0.20",
"chai": "^4.5.0",
"eslint": "~8.45.0",
"jest": "~29.7.0",
"sinon": "^19.0.2",
"typescript": "~5.6.3"
"typescript": "~5.7.2"
},
"scripts": {
"lint": "eslint src",
Expand Down
4 changes: 2 additions & 2 deletions ee/packages/omnichannel-services/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@types/jest": "~29.5.14",
"eslint": "~8.45.0",
"jest": "~29.7.0",
"typescript": "~5.6.3"
"typescript": "~5.7.2"
},
"dependencies": {
"@rocket.chat/core-services": "workspace:^",
Expand All @@ -21,7 +21,7 @@
"@rocket.chat/rest-typings": "workspace:^",
"@rocket.chat/string-helpers": "~0.31.25",
"@rocket.chat/tools": "workspace:^",
"@types/node": "~20.16.15",
"@types/node": "~20.17.8",
"date-fns": "^2.30.0",
"ejson": "^2.2.3",
"emoji-toolkit": "^7.0.1",
Expand Down
2 changes: 1 addition & 1 deletion ee/packages/pdf-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"jest": "~29.7.0",
"react-dom": "~18.3.1",
"storybook": "^8.4.4",
"typescript": "~5.6.3"
"typescript": "~5.7.2"
},
"volta": {
"extends": "../../../package.json"
Expand Down
4 changes: 2 additions & 2 deletions ee/packages/presence/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
"@rocket.chat/apps-engine": "workspace:^",
"@rocket.chat/eslint-config": "workspace:^",
"@rocket.chat/rest-typings": "workspace:^",
"@types/node": "~20.16.15",
"@types/node": "~20.17.8",
"babel-jest": "^29.7.0",
"eslint": "~8.45.0",
"jest": "~29.7.0",
"typescript": "~5.6.3"
"typescript": "~5.7.2"
},
"scripts": {
"lint": "eslint src",
Expand Down
2 changes: 1 addition & 1 deletion ee/packages/ui-theming/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"eslint-plugin-testing-library": "^6.4.0",
"react": "~17.0.2",
"react-docgen-typescript-plugin": "~1.0.8",
"typescript": "~5.6.3"
"typescript": "~5.7.2"
},
"scripts": {
"lint": "eslint --ext .js,.jsx,.ts,.tsx .",
Expand Down
2 changes: 1 addition & 1 deletion packages/account-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"devDependencies": {
"eslint": "~8.45.0",
"typescript": "~5.6.3"
"typescript": "~5.7.2"
},
"scripts": {
"lint": "eslint --ext .js,.jsx,.ts,.tsx .",
Expand Down
2 changes: 1 addition & 1 deletion packages/agenda/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"devDependencies": {
"@types/debug": "^4.1.12",
"eslint": "~8.45.0",
"typescript": "~5.6.3"
"typescript": "~5.7.2"
},
"scripts": {
"lint": "eslint --ext .js,.jsx,.ts,.tsx .",
Expand Down
2 changes: 1 addition & 1 deletion packages/api-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"eslint": "~8.45.0",
"jest": "~29.7.0",
"jest-fetch-mock": "^3.0.3",
"typescript": "~5.6.3"
"typescript": "~5.7.2"
},
"scripts": {
"build": "tsc",
Expand Down
4 changes: 2 additions & 2 deletions packages/apps-engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"@types/debug": "^4.1.12",
"@types/lodash.clonedeep": "^4.5.9",
"@types/nedb": "^1.8.16",
"@types/node": "~20.16.15",
"@types/node": "~20.17.8",
"@types/semver": "^7.5.8",
"@types/stack-trace": "0.0.33",
"@types/uuid": "~10.0.0",
Expand All @@ -88,7 +88,7 @@
"tap-bark": "^1.0.0",
"ts-node": "^6.2.0",
"typedoc": "~0.24.8",
"typescript": "~5.6.3",
"typescript": "~5.7.2",
"uglify-es": "^3.3.10"
},
"dependencies": {
Expand Down
4 changes: 3 additions & 1 deletion packages/apps-engine/src/server/AppManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,9 @@ export class AppManager {
return this.getCompiler().toSandBox(this, stored, parseResult);
}

return appPackageOrInstance;
if (appPackageOrInstance instanceof ProxiedApp) {
return appPackageOrInstance;
}
})();

await this.purgeAppConfig(app, { keepScheduledJobs: true });
Expand Down
Loading

0 comments on commit 54f7abf

Please sign in to comment.