for (String peerName : peerNames)
{
String peerId = membersMap.get(peerName);
if (peerId!=null)
{
Client peer = getBayeux().getClient(peerId);
if (peer!=null)
peers.add(peer);
}
}
if (peers.size() > 0)
{
Map<String, Object> message = new HashMap<String, Object>();
message.put("chat", data.get("chat"));
message.put("user", data.get("user"));
message.put("scope", "private");
for (Client peer : peers)
peer.deliver(client, roomName, message, null);
client.deliver(getClient(), roomName, message, null);
}
}