Skip to content

Instantly share code, notes, and snippets.

@hugomd
Last active May 23, 2018 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hugomd/93f7693d59e45455a4b57a1f4da84a79 to your computer and use it in GitHub Desktop.
Save hugomd/93f7693d59e45455a4b57a1f4da84a79 to your computer and use it in GitHub Desktop.
...
const currentUser = await chatManager.connect();
+ const joinableRooms = await currentUser.getJoinableRooms();
+ const availableRooms = [...currentUser.rooms, ...joinableRooms];
+ console.log('Available rooms:');
+ availableRooms.forEach((room, index) => {
+ console.log(`${index} - ${room.name}`);
+ });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment