Skip to content

Commit

Permalink
Merge branch 'release/0.85.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Jericho committed Dec 5, 2024
2 parents 158b232 + f484322 commit 57f9d98
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 15 deletions.
10 changes: 5 additions & 5 deletions Source/ZoomNet.IntegrationTests/ZoomNet.IntegrationTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<AssemblyName>ZoomNet.IntegrationTests</AssemblyName>
<RootNamespace>ZoomNet.IntegrationTests</RootNamespace>
</PropertyGroup>
Expand All @@ -13,10 +13,10 @@

<ItemGroup>
<PackageReference Include="Logzio.DotNet.NLog" Version="1.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.0" />
<PackageReference Include="NLog.Extensions.Logging" Version="5.3.14" />
</ItemGroup>

Expand Down
2 changes: 2 additions & 0 deletions Source/ZoomNet.UnitTests/Json/ParticipantDeviceConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ public void Write_multiple()
[InlineData("Zoom Rooms", ParticipantDevice.ZoomRoom)]
[InlineData("win 10+ 17763", ParticipantDevice.Windows)]
[InlineData("Web Browser Chrome 129", ParticipantDevice.Web)]
[InlineData("Web Browser Chrome 130", ParticipantDevice.Web)]
[InlineData("Windows 10", ParticipantDevice.Windows)]
public void Read_single(string value, ParticipantDevice expectedValue)
{
// Arrange
Expand Down
4 changes: 2 additions & 2 deletions Source/ZoomNet.UnitTests/ZoomNet.UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net48;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net48;net9.0</TargetFrameworks>
<AssemblyName>ZoomNet.UnitTests</AssemblyName>
<RootNamespace>ZoomNet.UnitTests</RootNamespace>
<IsPackable>false</IsPackable>
Expand All @@ -13,7 +13,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="NSubstitute" Version="5.3.0" />
<PackageReference Include="NSubstitute.Analyzers.CSharp" Version="1.0.17">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
13 changes: 12 additions & 1 deletion Source/ZoomNet/Json/ParticipantDeviceConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,16 @@ public override ParticipantDevice[] Read(ref Utf8JsonReader reader, Type typeToC
case JsonTokenType.Null:
return Array.Empty<ParticipantDevice>();
case JsonTokenType.String:
var splitOption =
#if NET5_0_OR_GREATER
StringSplitOptions.TrimEntries;
#else
StringSplitOptions.None;
#endif

var stringValue = reader.GetString();
var items = stringValue
.Split(new[] { '+' })
.Split(new[] { " + " }, splitOption)
.Where(item => !long.TryParse(item, out _)) // Filter out values like "17763" which is a Windows build number. See https://github.com/Jericho/ZoomNet/issues/354 for details
.Select(item => Convert(item))
.ToArray();
Expand All @@ -47,6 +54,10 @@ private static ParticipantDevice Convert(string deviceAsString)
// See https://github.com/Jericho/ZoomNet/issues/370 for details about this workaround
if (deviceAsString.StartsWith("Web Browser", StringComparison.OrdinalIgnoreCase)) return ParticipantDevice.Web;

// Ensure values such as "win 10+ 17763" are treated as "win 10"
var plusSignIndex = deviceAsString.IndexOf('+');
if (plusSignIndex > 0) deviceAsString = deviceAsString.Substring(0, plusSignIndex);

return deviceAsString.Trim().ToEnum<ParticipantDevice>();
}
}
Expand Down
2 changes: 1 addition & 1 deletion Source/ZoomNet/Models/ParticipantDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public enum ParticipantDevice
/// <summary>
/// The participant joined via VoIP using a Windows device.
/// </summary>
[MultipleValuesEnumMember(DefaultValue = "Windows", OtherValues = new[] { "WIN", "win 10", "win 11" })]
[MultipleValuesEnumMember(DefaultValue = "Windows", OtherValues = new[] { "WIN", "win 10", "win 11", "Windows 10", "Windows 11" })]
Windows,

/// <summary>
Expand Down
6 changes: 3 additions & 3 deletions Source/ZoomNet/ZoomNet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@

<ItemGroup>
<PackageReference Include="HttpMultipartParser" Version="8.4.0" />
<PackageReference Include="jose-jwt" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.1" />
<PackageReference Include="jose-jwt" Version="5.1.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="Pathoschild.Http.FluentClient" Version="4.4.1" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.507" PrivateAssets="All" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
<PackageReference Include="System.Text.Json" Version="9.0.0" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
<PackageReference Include="Websocket.Client" Version="4.6.1" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ cache:

# Environment configuration
image:
- Ubuntu1804
- Ubuntu2204
- Visual Studio 2022

# Skip builds for doc changes
Expand Down
2 changes: 1 addition & 1 deletion build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#tool dotnet:?package=GitVersion.Tool&version=6.0.5
#tool dotnet:?package=coveralls.net&version=4.0.1
#tool nuget:https://f.feedz.io/jericho/jericho/nuget/?package=GitReleaseManager&version=0.17.0-collaborators0008
#tool nuget:?package=ReportGenerator&version=5.4.0
#tool nuget:?package=ReportGenerator&version=5.4.1
#tool nuget:?package=xunit.runner.console&version=2.9.2
#tool nuget:?package=CodecovUploader&version=0.8.0

Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "9.0.100",
"version": "9.0.101",
"rollForward": "patch",
"allowPrerelease": false
}
Expand Down

0 comments on commit 57f9d98

Please sign in to comment.