From 8f53f41395dc4667899d1b9f15ef9154659997c0 Mon Sep 17 00:00:00 2001 From: JuniorJPDJ Date: Thu, 3 Feb 2022 22:16:39 +0100 Subject: [PATCH] fix(front): update code to work with django-channels v2 --- front/src/App.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/front/src/App.vue b/front/src/App.vue index a94e6f030..e500921d0 100644 --- a/front/src/App.vue +++ b/front/src/App.vue @@ -430,8 +430,8 @@ export default { url, [], { reconnectInterval: 1000 * 60 }) - bridge.listen(function (event) { - self.$store.dispatch('ui/websocketEvent', event) + bridge.addEventListener("message", function(event) { + self.$store.dispatch('ui/websocketEvent', event.data) }) bridge.socket.addEventListener('open', function () { console.log('Connected to WebSocket')