diff --git a/.github/workflows/pull-request-build.yml b/.github/workflows/pull-request-build.yml index efacd9d25..abf35bfcc 100644 --- a/.github/workflows/pull-request-build.yml +++ b/.github/workflows/pull-request-build.yml @@ -83,5 +83,6 @@ jobs: name: ${{ runner.os }} Artifacts path: | dist/rocketchat-*.dmg + dist/rocketchat-*.pkg dist/rocketchat-*.exe dist/rocketchat-*.snap diff --git a/electron-builder.json b/electron-builder.json index 4331ad47d..8472cdabd 100644 --- a/electron-builder.json +++ b/electron-builder.json @@ -10,7 +10,7 @@ "category": "public.app-category.productivity", "target": ["dmg", "pkg", "zip", "mas"], "icon": "build/icon.icns", - "bundleVersion": "23050", + "bundleVersion": "24060", "helperBundleId": "chat.rocket.electron.helper", "type": "distribution", "artifactName": "rocketchat-${version}-${os}.${ext}", diff --git a/package.json b/package.json index 0cfee433c..85471d444 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "productName": "Rocket.Chat", "name": "rocketchat", "description": "Official OSX, Windows, and Linux Desktop Clients for Rocket.Chat", - "version": "4.0.0", + "version": "4.0.1", "author": "Rocket.Chat Support ", "copyright": "© 2016-2024, Rocket.Chat", "homepage": "https://rocket.chat", @@ -108,7 +108,7 @@ "chokidar": "~3.5.3", "conventional-changelog-cli": "~4.1.0", "convert-svg-to-png": "~0.6.4", - "electron": "29.4.1", + "electron": "30.1.2", "electron-builder": "24.13.3", "electron-devtools-installer": "^3.2.0", "electron-notarize": "^1.2.2", diff --git a/src/ui/main/serverView/index.ts b/src/ui/main/serverView/index.ts index a04292f31..c916624dd 100644 --- a/src/ui/main/serverView/index.ts +++ b/src/ui/main/serverView/index.ts @@ -6,7 +6,9 @@ import type { ContextMenuParams, Event, Input, + MediaAccessPermissionRequest, MenuItemConstructorOptions, + OpenExternalPermissionRequest, Session, UploadFile, UploadRawData, @@ -269,6 +271,7 @@ export const attachGuestWebContentsEvents = async (): Promise => { const handlePermissionRequest: Parameters< Session['setPermissionRequestHandler'] >[0] = async (_webContents, permission, callback, details) => { + console.log('Permission request', permission, details); switch (permission) { case 'media': { if (process.platform !== 'darwin') { @@ -276,7 +279,7 @@ export const attachGuestWebContentsEvents = async (): Promise => { return; } - const { mediaTypes = [] } = details; + const { mediaTypes = [] } = details as MediaAccessPermissionRequest; const allowed = (!mediaTypes.includes('audio') || (await systemPreferences.askForMediaAccess('microphone'))) && @@ -295,12 +298,14 @@ export const attachGuestWebContentsEvents = async (): Promise => { return; case 'openExternal': { - if (!details.externalURL) { + if (!(details as OpenExternalPermissionRequest).externalURL) { callback(false); return; } - const allowed = await isProtocolAllowed(details.externalURL); + const allowed = await isProtocolAllowed( + (details as OpenExternalPermissionRequest).externalURL as string + ); callback(allowed); return; } diff --git a/yarn.lock b/yarn.lock index 5bf3b72c5..7a9d3c727 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8946,16 +8946,16 @@ __metadata: languageName: node linkType: hard -"electron@npm:29.4.1": - version: 29.4.1 - resolution: "electron@npm:29.4.1" +"electron@npm:30.1.2": + version: 30.1.2 + resolution: "electron@npm:30.1.2" dependencies: "@electron/get": "npm:^2.0.0" "@types/node": "npm:^20.9.0" extract-zip: "npm:^2.0.1" bin: electron: cli.js - checksum: e68040d38affd18b336661ba64138ef67293264ef51d18dd5c2e19f929e8fa3d65147ed92aaa7c17f8f58003823808dbb41eb8f12b17150c22f9b12f4d18d090 + checksum: ab8a67ac4a318aa8a1751d561b070007001398c642f98ebf41ce98e37b4b38e0ae80c7cb5bda1603c889433235f2e0176136e4d3b0ce177ebd9d1ba79f12cdc4 languageName: node linkType: hard @@ -15332,7 +15332,7 @@ __metadata: chokidar: "npm:~3.5.3" conventional-changelog-cli: "npm:~4.1.0" convert-svg-to-png: "npm:~0.6.4" - electron: "npm:29.4.1" + electron: "npm:30.1.2" electron-builder: "npm:24.13.3" electron-devtools-installer: "npm:^3.2.0" electron-dl: "npm:3.5.2"