From 1c320be2904f4ac38f8d2d05ad0dbe4ffac19215 Mon Sep 17 00:00:00 2001 From: "matthew.woolf@mailonline.co.uk" Date: Wed, 8 Mar 2023 18:13:56 +0000 Subject: [PATCH] Add Mail+ app --- regexes.yaml | 4 ++++ tests/test_os.yaml | 15 +++++++++++++++ tests/test_ua.yaml | 12 ++++++++++++ 3 files changed, 31 insertions(+) diff --git a/regexes.yaml b/regexes.yaml index 5f1119ac..51f8ca86 100644 --- a/regexes.yaml +++ b/regexes.yaml @@ -430,6 +430,10 @@ user_agent_parsers: - regex: '(TopBuzz)/(\d+).(\d+).(\d+)' family_replacement: 'TopBuzz' + # Mail+ must go before Chrome Mobile WebView + - regex: 'TheMailApp_(iOS|Android)/(\d+)\.(\d+)\.(\d+)' + family_replacement: 'Mail+ App' + # Google Search App on Android, eg: - regex: 'Mozilla.{1,200}Android.{1,200}(GSA)/(\d+)\.(\d+)\.(\d+)' family_replacement: 'Google' diff --git a/tests/test_os.yaml b/tests/test_os.yaml index 0e71e611..ad1a823e 100644 --- a/tests/test_os.yaml +++ b/tests/test_os.yaml @@ -3195,3 +3195,18 @@ test_cases: minor: '1' patch: '1' patch_minor: + + - user_agent_string: 'Mozilla/5.0 (Linux; Android 13; SM-X900 Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/110.0.5481.153 Safari/537.36 TheMailApp_Android/8.1.9.30.PROD' + family: 'Android' + major: '13' + minor: + patch: + patch_minor: + + - user_agent_string: 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_7_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 TheMailApp_iOS/8.1.9.30.PROD' + family: 'iOS' + major: '15' + minor: '7' + patch: '3' + patch_minor: + diff --git a/tests/test_ua.yaml b/tests/test_ua.yaml index eccafee9..6a2e7012 100644 --- a/tests/test_ua.yaml +++ b/tests/test_ua.yaml @@ -8663,3 +8663,15 @@ test_cases: major: '3' minor: '2' patch: '1' + + - user_agent_string: 'Mozilla/5.0 (Linux; Android 13; SM-X900 Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/110.0.5481.153 Safari/537.36 TheMailApp_Android/8.1.9.30.PROD' + family: 'Mail+ App' + major: '8' + minor: '1' + patch: '9' + + - user_agent_string: 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_7_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 TheMailApp_iOS/8.1.9.30.PROD' + family: 'Mail+ App' + major: '8' + minor: '1' + patch: '9'