diff --git a/zerver/signals.py b/zerver/signals.py index 398635203e..bacfede89c 100644 --- a/zerver/signals.py +++ b/zerver/signals.py @@ -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 diff --git a/zerver/tests/test_new_users.py b/zerver/tests/test_new_users.py index c987301cc5..f307151440 100644 --- a/zerver/tests/test_new_users.py +++ b/zerver/tests/test_new_users.py @@ -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), ]