mirror of https://gitlab.com/bashrc2/epicyon
Don't send posts if not online
parent
cad629c8d9
commit
370636da1c
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue