maybe fix chat?

This commit is contained in:
hippoz 2020-11-20 18:39:06 +02:00
parent c0d4ec680d
commit fd7489976d

View file

@ -221,7 +221,9 @@ const app = new Vue({
this.okNotification('Connection lost.');
};
this.gateway.connect(this.loggedInUser.token);
this.gateway.socket.on('message', this.processMessage);
this.gateway.socket.on('message', (e) => {
this.processMessage(e);
});
},
processMessage: async function(messageObject) {
if (!this.messages[messageObject.category._id]) this.$set(this.messages, messageObject.category._id, []);