-
Notifications
You must be signed in to change notification settings - Fork 714
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Video calls open again on Electron window (#2495)
* fix: Video calls open again on Electron window * fix url validation
- Loading branch information
1 parent
256a195
commit 706fde2
Showing
4 changed files
with
36 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,19 @@ | ||
import { shell } from 'electron'; | ||
|
||
import { select } from '../../store'; | ||
|
||
export const getInternalVideoChatWindowEnabled = (): boolean => | ||
select(({ isInternalVideoChatWindowEnabled }) => ({ | ||
isInternalVideoChatWindowEnabled, | ||
})).isInternalVideoChatWindowEnabled; | ||
|
||
export const openInternalVideoChatWindow = ( | ||
url: string, | ||
_options: undefined | ||
): void => { | ||
if (!process.mas && getInternalVideoChatWindowEnabled()) { | ||
window.open(url, 'Video Call', `scrollbars=true`); | ||
} else { | ||
shell.openExternal(url); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters