1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 15:42:48 -05:00

Provide client type in LD context (#4798)

This commit is contained in:
Matt Bishop
2024-09-24 10:18:20 -04:00
committed by GitHub
parent f7bc5dfb2e
commit 080057c564
2 changed files with 3 additions and 2 deletions

View File

@ -21,6 +21,7 @@ public class LaunchDarklyFeatureService : IFeatureService
private const string _contextAttributeClientVersion = "client-version";
private const string _contextAttributeDeviceType = "device-type";
private const string _contextAttributeClientType = "client-type";
private const string _contextAttributeOrganizations = "organizations";
public LaunchDarklyFeatureService(
@ -149,6 +150,7 @@ public class LaunchDarklyFeatureService : IFeatureService
if (_currentContext.DeviceType.HasValue)
{
builder.Set(_contextAttributeDeviceType, (int)_currentContext.DeviceType.Value);
builder.Set(_contextAttributeClientType, (int)DeviceTypes.ToClientType(_currentContext.DeviceType.Value));
}
}