Loopcast / beta

1 stars 0 forks source link

Replace "listener" method by "enter" and "leave" #330

Closed hems closed 9 years ago

hems commented 9 years ago

A few points regarding the updated implementation:

So basically, from the HTTP API we will only need to call chat/enter because chat/leave ( and the message type: 'listener:removed' will now be handled server-side by watching the socket connection.

There is more information about leaving on the ticket #338 !

After doing this, i believe we can delete the API method chat/listener, because it was being used just to propaged the listener:added and `listener:removed, and now we will replaced both operations, does that make sense or did i understand something wrong?

stefanoortisi commented 9 years ago

This should be closed now cause we are not dealing with listener:removed event anymore

hems commented 9 years ago

@stefanoortisi we actually dealing with listener:removed !

if the user closes the browser or leave the room this event will go and we have to remove his avatar from the "PEOPLE IN THE ROOM" list

hems commented 9 years ago

@stefanoortisi close this issue if people are leaving the room just by closing the browser, because if you leave by internet connection drop or closing browser or tab it also should receive the listener:removed event!

stefanoortisi commented 9 years ago

alright :+1:

stefanoortisi commented 9 years ago

Ok now the listener:removed event is starting to work. But i have still a small issue: if a guest is already into the chat, i get him on the list when i enter the chat. But if a guest enters while I'm on the room, i don't get any listener:added event.

I double checked if i was actually calling the chat/enter api for logged and unlogged user and i am doing it right.

@hems could you have a look at this particular case?

hems commented 9 years ago

@stefanoortisi i don't know why, but i had a "null" on the room_id for guests!

now it's fixed!

hems commented 9 years ago

this seems to be working very well!

with guests and users! pretty cool