mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
Update chat_mode.py
This commit is contained in:
parent
b2d57ff787
commit
020e9a6a5a
@ -62,15 +62,12 @@ class ChatModeWeb:
|
||||
)
|
||||
|
||||
self.web.add_request(self.web.REQUEST_LOAD, request.path)
|
||||
r = make_response(
|
||||
render_template(
|
||||
"chat.html",
|
||||
static_url_path=self.web.static_url_path,
|
||||
username=session.get("name"),
|
||||
title=self.web.settings.get("general", "title"),
|
||||
)
|
||||
return render_template(
|
||||
"chat.html",
|
||||
static_url_path=self.web.static_url_path,
|
||||
username=session.get("name"),
|
||||
title=self.web.settings.get("general", "title")
|
||||
)
|
||||
return self.web.add_security_headers(r)
|
||||
|
||||
@self.web.app.route("/update-session-username", methods=["POST"])
|
||||
def update_session_username():
|
||||
@ -87,13 +84,7 @@ class ChatModeWeb:
|
||||
)
|
||||
|
||||
self.web.add_request(self.web.REQUEST_LOAD, request.path)
|
||||
r = make_response(
|
||||
jsonify(
|
||||
username=session.get("name"),
|
||||
success=True,
|
||||
)
|
||||
)
|
||||
return self.web.add_security_headers(r)
|
||||
return jsonify(username=session.get("name"), success=True)
|
||||
|
||||
@self.web.socketio.on("joined", namespace="/chat")
|
||||
def joined(message):
|
||||
|
Loading…
Reference in New Issue
Block a user