task Real-Time Chat App with Pusher

2014-10-09

Implementing a real-time chat into a Yii-based application using the Pusher sockets/API service + PHP and javascript/jquery. We started with the Pusher-chat plugin provided by HTML5-ninja and then customized it to our needs. In particular, we needed the chat to recognize that we have multiple user groups with different permissions. Users should only be able to chat with other users in their same group plus administrators. And administrators should be able to chat with all users, regardless of group. We implemented these features by providing dynamic JSON-based "friends lists" and wrote custom code to alter the default chat display (e.g. to correctly count the number of users in an individual's permission group).