From 268216a537ef3725f3e86a61714a2c72f815b861 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 23 Aug 2022 17:18:59 +0200 Subject: [PATCH] Revert "make chat count 0 in localhost" This reverts commit 4a111df2783f09484300665564442aabbdc8d99b. --- files/__main__.py | 2 -- files/routes/chat.py | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/files/__main__.py b/files/__main__.py index 337f11a3a..9b3832f92 100644 --- a/files/__main__.py +++ b/files/__main__.py @@ -125,8 +125,6 @@ def teardown_request(error): del g.db stdout.flush() -cache.set(f'{app.config["SERVER_NAME"]}_online', 0, timeout=0) - if app.config["SERVER_NAME"] == 'localhost': from files.routes import * # from files.routes.chat import * diff --git a/files/routes/chat.py b/files/routes/chat.py index 6a1ccac6e..89201cd04 100644 --- a/files/routes/chat.py +++ b/files/routes/chat.py @@ -18,6 +18,7 @@ else: typing = [] online = [] +cache.set(ONLINE_STR, len(online), timeout=0) muted = cache.get(f'{SITE}_muted') or {} messages = cache.get(f'{SITE}_chat') or [] total = cache.get(f'{SITE}_total') or 0