Include browser version in parsed user agent (PSG-761) (#6788)

* Update UserSessionInfo structure to include client version

* Add string for browser

* Update user agent parser to parse browser version too

* Add browser row into the session details

* Add changelog

* Fix tests

* Run Swift format
This commit is contained in:
ismailgulek
2022-10-04 10:49:26 +03:00
committed by GitHub
parent 2aed6f340a
commit c37b7d434b
16 changed files with 109 additions and 59 deletions
@@ -89,7 +89,8 @@ class MockUserSessionsOverviewService: UserSessionsOverviewServiceProtocol {
deviceModel: nil,
deviceOS: "iOS 15.5",
lastSeenIPLocation: nil,
deviceName: "My iPhone",
clientName: "Element",
clientVersion: "1.0.0",
isActive: true,
isCurrent: true)
}
@@ -107,7 +108,8 @@ class MockUserSessionsOverviewService: UserSessionsOverviewServiceProtocol {
deviceModel: nil,
deviceOS: "macOS 12.5.1",
lastSeenIPLocation: nil,
deviceName: "My Mac",
clientName: "Electron",
clientVersion: "20.0.0",
isActive: active,
isCurrent: false),
UserSessionInfo(id: "2 verified: \(verified) active: \(active)",
@@ -122,7 +124,8 @@ class MockUserSessionsOverviewService: UserSessionsOverviewServiceProtocol {
deviceModel: nil,
deviceOS: "Windows 10",
lastSeenIPLocation: nil,
deviceName: "My Windows",
clientName: "Firefox",
clientVersion: "39.0",
isActive: active,
isCurrent: false),
UserSessionInfo(id: "3 verified: \(verified) active: \(active)",
@@ -137,7 +140,8 @@ class MockUserSessionsOverviewService: UserSessionsOverviewServiceProtocol {
deviceModel: nil,
deviceOS: "Android 4.0",
lastSeenIPLocation: nil,
deviceName: "My Phone",
clientName: "Element",
clientVersion: "1.0.0",
isActive: active,
isCurrent: false)]
}