Closed digination closed 7 years ago
+1
In the model , the user object has a rooms list attribute but oddly enough it remains empty even when the user has joined some rooms ( /rooms/id/users has the correct entries though) Would it be a good plan to fill this list to get persistency ?
The other option would be to create a new object in the model: joinded_rooms(uid, rooms [] ) but that would be kinda redundant..
Can i get a head's up from the main maintainers about that ? i'd like to start coding but i'd also like my PR to pass without problem ;)
@digination rooms
is supposed to act as a sort of foreign key, but is not used. I'm not opposed to adding a 'joinedRooms' property though!
Ok, i've written something that works: Staask/lets-chat@2363918 . Thought i'm a bit unconfortable with the use of account:profile to update the rooms field. I tried with 'users:update' socket emiting but the call didn't get the user object updated in backend.. Tell me what you think and if there are things to change before i trigger the PR.
Thank you, Clément.
Hi, IMO the information for joined channels must not remain in the client's localStrage because it lacks persistency, and the information isn't preserved when the user uses another terminal/browser.
Regards, Clément.