Skip to content

Commit

Permalink
Update electron 30 (#2904)
Browse files Browse the repository at this point in the history
* update to electron 30.0.0

* update electron 30.1.1

* add pkg to macOS pr builds

* bump bundleVersion

* bump version

* update to 30.1.2
  • Loading branch information
jeanfbrito authored Jul 8, 2024
1 parent b4aeef4 commit 6fc447a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pull-request-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,6 @@ jobs:
name: ${{ runner.os }} Artifacts
path: |
dist/rocketchat-*.dmg
dist/rocketchat-*.pkg
dist/rocketchat-*.exe
dist/rocketchat-*.snap
2 changes: 1 addition & 1 deletion electron-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>",
"copyright": "© 2016-2024, Rocket.Chat",
"homepage": "https://rocket.chat",
Expand Down Expand Up @@ -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",
Expand Down
11 changes: 8 additions & 3 deletions src/ui/main/serverView/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import type {
ContextMenuParams,
Event,
Input,
MediaAccessPermissionRequest,
MenuItemConstructorOptions,
OpenExternalPermissionRequest,
Session,
UploadFile,
UploadRawData,
Expand Down Expand Up @@ -269,14 +271,15 @@ export const attachGuestWebContentsEvents = async (): Promise<void> => {
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') {
callback(true);
return;
}

const { mediaTypes = [] } = details;
const { mediaTypes = [] } = details as MediaAccessPermissionRequest;
const allowed =
(!mediaTypes.includes('audio') ||
(await systemPreferences.askForMediaAccess('microphone'))) &&
Expand All @@ -295,12 +298,14 @@ export const attachGuestWebContentsEvents = async (): Promise<void> => {
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;
}
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 6fc447a

Please sign in to comment.