diff --git a/kyokusui/main.py b/kyokusui/main.py index 0b4d9e6..cc2890f 100644 --- a/kyokusui/main.py +++ b/kyokusui/main.py @@ -7,6 +7,7 @@ from .model import Board, Thread, Res, Permission from .utils import hiroyuki + class App(App): name = 'Kyokusui' description = '業務用便所の落書き' diff --git a/kyokusui/templates/thread.html b/kyokusui/templates/thread.html index 98de4cb..48b7c8e 100644 --- a/kyokusui/templates/thread.html +++ b/kyokusui/templates/thread.html @@ -89,7 +89,7 @@ const textarea = document.querySelector("#message") const image_form = document.querySelector("#image") const image2send = document.querySelector("#image2send") -const ws = new WebSocket("{{ fullurl(request, "/api/v0/board/" + board._id + "/" + thread._id + "/socket", scheme="ws") }}") +const ws = new WebSocket("{{ fullurl(request, "/api/v0/board/" + board._id + "/" + thread._id + "/socket", scheme="ws" if request.scheme == "http" else "wss") }}") image_form.onchange = async e => { const files = await Promise.all(Array.from(e.target.files).map(f => { return new Promise((resolve, reject) => {