File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -11,14 +11,22 @@ class ToggleMuteTeamsAction : IAction
1111
1212 public Result DoAction ( )
1313 {
14- Log . Information ( "Toggling Teams mute" ) ;
14+ Log . Information ( "Trying to toggle Teams mute... " ) ;
1515
1616 Process ? p = Process . GetProcessesByName ( "Teams" ) . FirstOrDefault ( ) ;
17+ if ( p == null )
18+ {
19+ // Try with the "new" Microsoft Teams
20+ Log . Information ( "Classic Teams not found. Trying with the \" new\" one..." ) ;
21+ p = Process . GetProcessesByName ( "ms-teams" ) . FirstOrDefault ( ) ;
22+ }
23+
1724 if ( p != null )
1825 {
1926 IntPtr h = p . MainWindowHandle ;
2027 SetForegroundWindow ( h ) ;
2128 SendKeys . SendWait ( "^+{m}" ) ; // CTRL + SHIFT + M
29+ Log . Verbose ( "Keys were sent to Teams" ) ;
2230 }
2331 else
2432 {
Original file line number Diff line number Diff line change 1818 <Company />
1919 <Product />
2020 <RepositoryUrl >https://github.com/pulimento</RepositoryUrl >
21- <Version >1.0.3 </Version >
21+ <Version >1.0.4 </Version >
2222 <PackageLicenseExpression >GPL-3.0-only</PackageLicenseExpression >
2323 <EnforceCodeStyleInBuild >true</EnforceCodeStyleInBuild >
2424 </PropertyGroup >
You can’t perform that action at this time.
0 commit comments