correctly recognize new userhandle of mobileclient

This commit is contained in:
Jenny Danzmayr 2018-12-24 08:15:01 +01:00
parent 37cd31ec6b
commit ecafc07431

View file

@ -15,13 +15,13 @@ class MobileclientMiddleware:
return False
user_agent = user_agent[12:].split('/')
if len(user_agent) != 2:
if len(user_agent) < 2:
return False
app_platform, app_version = user_agent
app_platform, app_version = user_agent[0:2]
if app_platform == 'Android':
# activate new mobileclient features for the c3nav android app 4.0.0 or higher
# yep, iphone app can do this stuff yet
# yep, iphone app can't do this stuff yet
if not app_version.isdigit():
return False
app_version = int(app_version)