rusbrain / reps2_beta1

кузы2
http://reps2.ru
GNU General Public License v3.0
11 stars 5 forks source link

Chat popup duplicates socket.io connection #158

Closed ghost closed 5 years ago

ghost commented 5 years ago

At this moment both components have a socket.io clients in their "mounted" hooks causing unused 2nd connection

resources/js/components/ChatRoom/MessageComponent.vue
...
140  mounted() {
141    var socket = io(process.env.MIX_SOCKET_SERVER, { query: "id= " + this.auth.id });
142    this.socket = socket;
...

resources/js/components/ChatRoom/ChatPopup.vue
...
114  mounted() { 
116    var socket = io(process.env.MIX_SOCKET_SERVER, { query: "id= " + this.auth.id });
117    this.socket = socket;
...

1

widedeveloper commented 5 years ago

currently, I prevented the popup. I will change the popup chat logic

widedeveloper commented 5 years ago

I enabled popup chat and resolved the duplicated socket connection issue.

rusbrain commented 5 years ago

Is this possible to pop-up the chat like this, please?

widedeveloper commented 5 years ago

I understand what you want, ok

widedeveloper commented 5 years ago

I amended the chat popup like defiler.ru. completed