faisalman / ua-parser-js

"Unmask Your Traffic" - UAParser.js: The Essential Web Development Tool for User-Agent Detection
https://uaparser.dev/
GNU Affero General Public License v3.0
9.28k stars 1.2k forks source link

Operation system IOS from slack events not parsed #643

Closed Volna13 closed 1 year ago

Volna13 commented 1 year ago

We have events from slack that contain Useragent string.

Here is example

{
            "user_id": "UQLQRCAAAA",
            "username": "test",
            "date_first": 1681368084,
            "date_last": 1681368085,
            "count": 2,
            "ip": "111.111.111.41",
            "user_agent": "com.tinyspeck.chatlyio/23.04.10 (iPhone; iOS 16.4.1; Scale/3.00)",
            "isp": "",
            "country": "",
            "region": ""
}

Here is response from uaParser("com.tinyspeck.chatlyio/23.04.10 (iPhone; iOS 16.4.1; Scale/3.00)")

{
  "ua": "com.tinyspeck.chatlyio/23.04.10 (iPhone; iOS 16.4.1; Scale/3.00)",
  "browser": {},
  "engine": {},
  "os": {},
  "device": {
    "vendor": "Apple",
    "model": "iPhone",
    "type": "mobile"
  },
  "cpu": {}
}

Expected response

{
  "ua": "com.tinyspeck.chatlyio/23.04.10 (iPhone; iOS 16.4.1; Scale/3.00)",
  "browser": {},
  "engine": {},
  "os": {
    "name": "Ios",
    "version": "16.4.1"
   },
  "device": {
    "vendor": "Apple",
    "model": "iPhone",
    "type": "mobile"
  },
  "cpu": {}
}

Current "ua-parser-version" - "ua-parser-js": "^1.0.35"