Closed inator closed 13 years ago
For one-to-one communication, it is possible to get by with just nowjs.getClient(clientId, callback)
(see API docs for more specifics), and for the second part of the request, well, that's what groups are for:
nowjs.generateGroup = function (id, arr) {
var g = nowjs.getGroup(id);
for (var i = 0; i < arr.length; i++) {
g.addUser(arr[i]);
}
return g;
};
Let me know if you need further help on this issue @inator.
Closing
Use case involves a user initiating communication to another user - therefore creating a dynamic private group for chatting. Ideally, there would be a function that takes a user array as an input parameter and returns a private group identifier that can then have chat entries directed to it without a general broadcast.