Closed thomas1602 closed 9 years ago
@thomas1602 ok, done it!
@hems, to display the current data on the popup of the chat I would need to get some extra informations on 'message' callback from the pusher channel.
I'm currently getting this informations https://github.com/Loopcast/beta/blob/development/src/routes/api/v1/chat/message.coffee#L48-L53
I would need also:
For the popup of the name of the author in the cover, I would also need to get the "followers" information on the jade. (At the moment I'm printing a static value inside an input hidden)
https://github.com/Loopcast/beta/blob/development/src/frontend/templates/profile/room.jade#L7
okie..
i still have to sort a proper list of users in the room. at the moment we are using pusher for messages, but would also need some backend to detect user in/out of the room and keep a list of them.
@stefanoortisi at the moment we can grab user info from /api/v1/user/{id}/info
!
This way we can get amount of followers, updated avatar, etcs
I think it would be way better to get these informations already on the message api response. Especially because of https://github.com/Loopcast/beta/issues/223, we would have 25 additional ajax calls to get the information of the users. What do you think?
@stefanoortisi i think extra user info should be fetched just on rollover?
at least for now while we don't have a proper chat api ( this is just a temporary solution with pusher, to get messages going back and forth )
@stefanoortisi with the new /chat/people
method you should get user._id, followers( user.like ) and whatever else you need, when the room starts!
i have implemented the basics on the client side, let me know if something doesn't work!
@stefanoortisi not sure if you saw that!
Yeah, and it was already working!
okie!
anyway for users in the room information i think is better to fetch on rollover, because otherwise when we get a lot of users in the same room it will become very slow and very costy for the server.
facebook for instance fetch most rollover informations only when you rollover something. if you enter facebook and turn off your wifi and start rolling o er things you will notice that.
anyway it's fine for now, we can improve scalability later
:+1:
@stefanoortisi @hems
This user info box should also show when you hover users in the chat.
I also think it makes sense to show it when you hover the artist name as well right?