Closed mikeangelsilva closed 3 years ago
As stated here https://developers.connectycube.com/js/messaging?id=get-last-activity
you can use he following snippet:
const usersIds = [56,57,58];
usersIds.forEach(uid => {
ConnectyCube.chat
.getLastUserActivity(uid)
.then((result) => {
const userId = result.userId;
const seconds = result.seconds;
// 'userId' was 'seconds' ago
})
.catch((error) => {});
});
Hi, how can i listen to multiple users(userids) in last activity.
Can i use a loop( for loop, etc..) Then i put the listeners inside?
Something like this.
Any idea on how/what approach to add listeners on multiple users.
Thank you