Cloud.Chats.getChatGroups(function (e) {
if (e.success) {
for (var i = 0; i < e.chat_groups.length; i++) {
var group = e.chat_groups[i];
alert('Success:\n' +
'id: ' + group.id + '\n' +
'created_at: ' + group.created_at + '\n' +
'number of users: ' + group.participate_users.length);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
Returns All Chat Groups on ACS (even the ones the Current User is not Involved in).
The Documentation states: "This example requests a lists of chat groups *that the current user belongs to* and checks the response."
Also a Q&A thread was open a month ago concerning this:
http://developer.appcelerator.com/question/157777/acs---get-chat-groups-permissions-bug
There are two open Q&As that refer to this as well: http://developer.appcelerator.com/question/157777/acs---get-chat-groups-permissions-bug http://developer.appcelerator.com/question/175963/get-chat-group---shows-everyone-not-just-one-logged-in-user-is-in
You can Close this Ticket. Wei has fixed the issue :)
Fixed by the Cloud team.