From 10c9ce3fe563c7b7f1d9c1f0d5ebaaf650a99e22 Mon Sep 17 00:00:00 2001 From: Ismael Martinez Ramos Date: Tue, 28 May 2024 18:01:35 +0100 Subject: [PATCH 1/2] Adding teams.live.com to the URLs evaluated across the app --- app/mainAppWindow/index.js | 17 ++++++++++++++--- ...b.IsmaelMartinez.teams_for_linux.appdata.xml | 7 +++++++ package.json | 2 +- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/app/mainAppWindow/index.js b/app/mainAppWindow/index.js index 6fb8787..4f33baa 100644 --- a/app/mainAppWindow/index.js +++ b/app/mainAppWindow/index.js @@ -142,7 +142,7 @@ function applyAppConfiguration(config, window) { function handleTeamsV2OptIn(config) { if (config.optInTeamsV2) { - config.url = 'https://teams.microsoft.com/v2/'; + setConfigUrlTeamsV2(config); window.webContents.executeJavaScript('localStorage.getItem("tmp.isOptedIntoT2Web");', true) .then(result => { if ((result == null) || !result) { @@ -160,6 +160,12 @@ function handleTeamsV2OptIn(config) { } } +function setConfigUrlTeamsV2(config) { + if(!config.url.includes('/v2')) { + config.url = config.url+'/v2/'; + } +} + /** * Applies Electron's spell checker capabilities if language codes are provided. * @param {Array} languages Array of language codes to use with spell checker. @@ -228,7 +234,7 @@ function restoreWindow() { } function processArgs(args) { - var regHttps = /^https:\/\/teams\.microsoft\.com\/.*(?:meetup-join|channel)/g; + var regHttps = /^https:\/\/teams\.(microsoft|live)\.com\/.*(?:meetup-join|channel)/g; var regMS = /^msteams:\/.*(?:meetup-join|channel)/g; logger.debug('processArgs:', args); for (const arg of args) { @@ -330,7 +336,12 @@ function onBeforeSendHeadersHandler(detail, callback) { * @returns {{action: 'deny'} | {action: 'allow', outlivesOpener?: boolean, overrideBrowserWindowOptions?: Electron.BrowserWindowConstructorOptions}} */ function onNewWindow(details) { - if (details.url.startsWith('https://teams.microsoft.com/l/meetup-join') || details.url.startsWith('https://teams.microsoft.com/v2/l/meetup-join')) { + if ( + details.url.startsWith('https://teams.microsoft.com/l/meetup-join') || + details.url.startsWith('https://teams.microsoft.com/v2/l/meetup-join') || + details.url.startsWith('https://teams.live.com/l/meetup-join') || + details.url.startsWith('https://teams.live.com/v2/l/meetup-join') + ) { logger.debug('DEBUG - captured meetup-join url'); return { action: 'deny' }; } else if (details.url === 'about:blank' || details.url === 'about:blank#blocked') { diff --git a/com.github.IsmaelMartinez.teams_for_linux.appdata.xml b/com.github.IsmaelMartinez.teams_for_linux.appdata.xml index d8b3bd1..0c4844b 100644 --- a/com.github.IsmaelMartinez.teams_for_linux.appdata.xml +++ b/com.github.IsmaelMartinez.teams_for_linux.appdata.xml @@ -14,6 +14,13 @@ https://github.com/IsmaelMartinez/teams-for-linux/issues com.github.IsmaelMartinez.teams_for_linux.desktop + + +
    +
  • Adding teams.live.com to the URLs evaluated across the app
  • +
+
+
    diff --git a/package.json b/package.json index 1d54b2f..566d31a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "teams-for-linux", - "version": "1.5.0", + "version": "1.5.1", "main": "app/index.js", "description": "Unofficial client for Microsoft Teams for Linux", "homepage": "https://github.com/IsmaelMartinez/teams-for-linux", From c2a742e9fcc9362944af7df63b6ff889aa745414 Mon Sep 17 00:00:00 2001 From: Ismael Martinez Ramos Date: Tue, 28 May 2024 18:04:46 +0100 Subject: [PATCH 2/2] correcting the appdata information for release 1.5.0 --- com.github.IsmaelMartinez.teams_for_linux.appdata.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/com.github.IsmaelMartinez.teams_for_linux.appdata.xml b/com.github.IsmaelMartinez.teams_for_linux.appdata.xml index 0c4844b..29c37c7 100644 --- a/com.github.IsmaelMartinez.teams_for_linux.appdata.xml +++ b/com.github.IsmaelMartinez.teams_for_linux.appdata.xml @@ -25,7 +25,6 @@
    • Renaming ssoUser to ssoBasicAuthUser, and ssoPasswordCommand to ssoBasicAuthPassswordCommand.
    • -
    • Adding --rpm-digest sha256 to the electron-builder rpm command
    • Adding the config option trayIconEnabled that defaults to true