diff --git a/files/routes/chat.py b/files/routes/chat.py index 5b51d2655..c81fcc1e3 100644 --- a/files/routes/chat.py +++ b/files/routes/chat.py @@ -37,7 +37,7 @@ typing = {} cache.set('loggedin_chat', 0, timeout=86400) def get_referrer(): - if '?m=' in request.referrer: + if request.referrer and '?m=' in request.referrer: return request.referrer.split("?m=")[0] return request.referrer