diff --git a/client/components/Modules.vue b/client/components/Modules.vue index c677ed3..df0be80 100644 --- a/client/components/Modules.vue +++ b/client/components/Modules.vue @@ -95,8 +95,12 @@ export default { async sendMessage(subject, body, module_url) { if (this.ws === null) { const self = this; + const socket = new WebSocket( - "ws://localhost:8000/data/wss/" + + (document.location.protocol === "http:" ? "ws" : "wss") + + "://" + + document.location.host + + "/data/wss/" + this.$store.state.class_.id + "/" + this.username