Enable websocket logs in verbose mode

This commit is contained in:
Micah Lee 2021-12-21 15:01:35 -08:00
parent 7e55e8e816
commit 3da0b7a3ea
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73

View File

@ -89,7 +89,7 @@ class Web:
#
# It's probably #notourbug but we can fix it by forcing the mimetype.
# https://github.com/onionshare/onionshare/issues/1443
mimetypes.add_type('text/javascript', '.js')
mimetypes.add_type("text/javascript", ".js")
# The flask app
self.app = Flask(
@ -162,6 +162,9 @@ class Web:
elif self.mode == "website":
self.website_mode = WebsiteModeWeb(self.common, self)
elif self.mode == "chat":
if self.common.verbose:
self.socketio = SocketIO(logger=True, engineio_logger=True)
else:
self.socketio = SocketIO()
self.socketio.init_app(self.app)
self.chat_mode = ChatModeWeb(self.common, self)