Skip to content

Commit

Permalink
Adds detection for WhatsApp
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl committed Feb 6, 2016
1 parent e469229 commit be6d22a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
17 changes: 17 additions & 0 deletions Tests/fixtures/mobile_apps.yml
Expand Up @@ -15,6 +15,23 @@
model: iPhone
os_family: iOS
browser_family: Unknown
-
user_agent: WhatsApp/2.6.4 iPhone_OS/4.3.3 Device/iPhone_4
os:
name: iOS
short_name: IOS
version: "4.3.3"
platform:
client:
type: mobile app
name: WhatsApp
version: "2.6.4"
device:
type: smartphone
brand: AP
model: iPhone
os_family: iOS
browser_family: Unknown
-
user_agent: AndroidDownloadManager/4.1.1 (Linux; U; Android 4.1.1; MB886 Build/9.8.0Q-97_MB886_FFW-20)
os:
Expand Down
5 changes: 5 additions & 0 deletions regexes/client/mobile_apps.yml
Expand Up @@ -49,3 +49,8 @@
- regex: '([^/]+)/(\d+(?:\.\d+)+) \((?:iPhone|iPad); iOS [0-9\.]+; Scale/[0-9\.]+\)'
name: '$1'
version: '$2'

# WhatsApp
- regex: 'WhatsApp(?:[ /]([\d\.]+))?'
name: 'WhatsApp'
version: '$1'
3 changes: 1 addition & 2 deletions regexes/oss.yml
Expand Up @@ -321,8 +321,7 @@
name: 'iOS'
version: '3.1'


- regex: '(?:CPU OS|iPh(?:one)? OS|iOS)[ _](\d+(?:[_\.]\d+)*)'
- regex: '(?:CPU OS|iPh(?:one)?[ _]OS|iOS)[ _/](\d+(?:[_\.]\d+)*)'
name: 'iOS'
version: '$1'

Expand Down

0 comments on commit be6d22a

Please sign in to comment.