Limit to friends of groups

Currently, the chat allows all users of the site to see everyone else's chats. Is there a way to limit the chat to a particular user or group?