Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/1098 try to fix meeting links not opening #1275

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions app/mainAppWindow/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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<string>} languages Array of language codes to use with spell checker.
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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') {
Expand Down
8 changes: 7 additions & 1 deletion com.github.IsmaelMartinez.teams_for_linux.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,17 @@
<url type="bugtracker">https://github.com/IsmaelMartinez/teams-for-linux/issues</url>
<launchable type="desktop-id">com.github.IsmaelMartinez.teams_for_linux.desktop</launchable>
<releases>
<release version="1.5.1" date="2024-05-28">
<description>
<ul>
<li>Adding teams.live.com to the URLs evaluated across the app</li>
</ul>
</description>
</release>
<release version="1.5.0" date="2024-05-28">
<description>
<ul>
<li>Renaming ssoUser to ssoBasicAuthUser, and ssoPasswordCommand to ssoBasicAuthPassswordCommand.</li>
<li>Adding --rpm-digest sha256 to the electron-builder rpm command</li>
<li>Adding the config option trayIconEnabled that defaults to true</li>
</ul>
</description>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
Loading