What is the best way to manage a multi-room chat application?

Managing a multi-room chat application with PubNub involves opening two channels per client (shared and private) and taking care of security. See more details in this Stack Overflow article.