Skip to content

Commit bf24b0f

Browse files
committed
Update it to work with new (preview) Teams. Bump version to 1.0.4
1 parent 5a78f13 commit bf24b0f

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

WinRemoteControl/Actions/ToggleMuteTeamsAction.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff 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
{

WinRemoteControl/WinRemoteControl.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
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>

0 commit comments

Comments
 (0)