Interesting - the idea here definitely was for "close()" on the SimpleChatModel to do the work here, and for you to be able to call chatPod.subscribe() again, I appreciate the time you took to figure out what wasn't working here - we'll definitely take what you've hit here and make some improvements to the class to make this smoother.
I love it when people start doing things with our classes that we hadn't yet had time to try ourselves! Progress!
1. I created a class of my own called ExtendedSimpleChat, which extends SimpleChat
2. I added an "unsubscribe" method (shown below) to this class, which disconnects and destroys the existing model and userManager instances in the SimpleChat class (and clears the history and message input UI objects)
3. To switch rooms, I call the following methods (cSession is the ConnectSessionContainer instance)
cSession.roomURL = "new URL goes here";
4. In the event handler for SessionEvent.SYNCHRONIZATION_CHANGE, if the session is synchronized, I call:
This combination seems to work well. It would probably be a good idea to add this unsubscribe method to the SimpleChat class. The "close()" method in SimpleChat disconnects too many other things.
That's what I had already tried, but the pods don't re-synch to the new room. In looking at the source for the chat pod, it looks like the model doesn't get set to null on close/disconnect, and this seems to be causing issues.
Unfortunately, the _model member is read-only (only provides a getter) so I couldn't force it to null to see if that was the issue.