mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
PLT-3683 Changed Utils.isMobileApp to return false for desktop apps (#3654)
This commit is contained in:
committed by
Corey Hulen
parent
6496205461
commit
b938a960a2
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user