mirror of https://github.com/zulip/zulip.git
get_device_browser: Fix browser string for mobile.
Now get_device_browser() returns 'Zulip' for 'ZulipAndroid' and 'ZulipMobile'.
This commit is contained in:
parent
b9c69004e4
commit
7e43cd5624
|
@ -27,6 +27,8 @@ def get_device_browser(user_agent):
|
|||
return "Internet Explorer"
|
||||
elif "edge" in user_agent:
|
||||
return "Edge"
|
||||
elif "zulip" in user_agent:
|
||||
return "Zulip"
|
||||
else:
|
||||
return None
|
||||
|
||||
|
|
|
@ -87,6 +87,8 @@ class TestBrowserAndOsUserAgentStrings(ZulipTestCase):
|
|||
('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) ' +
|
||||
'AppleWebKit/602.3.12 (KHTML, like Gecko) ' +
|
||||
'Version/10.0.2 Safari/602.3.12', 'Safari', 'MacOS'),
|
||||
('ZulipAndroid/1.0', 'Zulip', 'Android'),
|
||||
('ZulipMobile/1.0', 'Zulip', None),
|
||||
('', None, None),
|
||||
]
|
||||
|
||||
|
|
Loading…
Reference in New Issue