summaryrefslogtreecommitdiffstats
path: root/webapp/utils/utils.jsx
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-07-22 12:00:14 -0400
committerCorey Hulen <corey@hulen.com>2016-07-22 08:00:14 -0800
commitb938a960a266945770b0b3994e8b13222c6bb6f5 (patch)
treefffbd2fa5f06655fabed264a88bc09689ba36e18 /webapp/utils/utils.jsx
parent6496205461c58b21d8ee33733b234c31ef1b36f2 (diff)
downloadchat-b938a960a266945770b0b3994e8b13222c6bb6f5.tar.gz
chat-b938a960a266945770b0b3994e8b13222c6bb6f5.tar.bz2
chat-b938a960a266945770b0b3994e8b13222c6bb6f5.zip
PLT-3683 Changed Utils.isMobileApp to return false for desktop apps (#3654)
Diffstat (limited to 'webapp/utils/utils.jsx')
-rw-r--r--webapp/utils/utils.jsx6
1 files changed, 1 insertions, 5 deletions
diff --git a/webapp/utils/utils.jsx b/webapp/utils/utils.jsx
index a8a93b452..613995200 100644
--- a/webapp/utils/utils.jsx
+++ b/webapp/utils/utils.jsx
@@ -65,11 +65,7 @@ export function isIosChrome() {
export function isMobileApp() {
const userAgent = navigator.userAgent;
- // the mobile app has different user agents for the native api calls and the shim, so handle them both
- const isApi = userAgent.indexOf('Mattermost') !== -1;
- const isShim = userAgent.indexOf('iPhone') !== -1 && userAgent.indexOf('Safari') === -1 && userAgent.indexOf('Chrome') === -1;
-
- return isApi || isShim;
+ return userAgent.indexOf('iPhone') !== -1 && userAgent.indexOf('Safari') === -1 && userAgent.indexOf('CriOS') === -1;
}
export function isInRole(roles, inRole) {