From 75cbec985c54587479c1ae6fa53a09e04626da02 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 10 Mar 2024 08:52:54 +0200 Subject: [PATCH] fix 500 error for accidentially-committed shit --- files/routes/chat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/routes/chat.py b/files/routes/chat.py index 75747297d..07dd1adb3 100644 --- a/files/routes/chat.py +++ b/files/routes/chat.py @@ -190,7 +190,7 @@ def connect(v): if request.referrer == f'{SITE_FULL}/notifications/messages': join_room(v.id) return '' - elif request.referrer.startswith(f'{SITE_FULL}/chat/'): + elif request.referrer and request.referrer.startswith(f'{SITE_FULL}/chat/'): join_room(request.referrer) return '' @@ -208,7 +208,7 @@ def disconnect(v): if request.referrer == f'{SITE_FULL}/notifications/messages': leave_room(v.id) return '' - elif request.referrer.startswith(f'{SITE_FULL}/chat/'): + elif request.referrer and request.referrer.startswith(f'{SITE_FULL}/chat/'): leave_room(request.referrer) return ''