Don't send posts if not online

main
Bob Mottram 2025-04-23 21:06:50 +01:00
parent cad629c8d9
commit 370636da1c
1 changed files with 6 additions and 0 deletions

View File

@ -72,6 +72,7 @@ from webapp_person_options import html_person_options
from httpheaders import redirect_headers from httpheaders import redirect_headers
from httpheaders import set_headers from httpheaders import set_headers
from fitnessFunctions import fitness_performance from fitnessFunctions import fitness_performance
from siteactive import is_online
def post_to_outbox(self, message_json: {}, version: str, def post_to_outbox(self, message_json: {}, version: str,
@ -84,6 +85,11 @@ def post_to_outbox(self, message_json: {}, version: str,
if not curr_session: if not curr_session:
return False return False
if not is_online():
print('WARN: ' + post_to_nickname +
' cannot send post because not online')
return False
city = self.server.city city = self.server.city
if post_to_nickname: if post_to_nickname: