Reputation: 5310
I am extending this chat client built using AppWarp Client API and App42 Backend.
After appropriate initializations and setting listeners I am successfully able to fetch all available rooms using _warpclient.getAllRooms();
and its listener:
function onGetAllRoomsDone(rooms) {
console.log(rooms);
for(var i=0; i<rooms.getRoomIds().length; ++i) {
_warpclient.getLiveRoomInfo(rooms.getRoomIds()[i]);
}
}
Problem:
However, rooms.getRoomIds() returns dynamic rooms that are stale (dead / destroyed see: dynamic rooms here). Is there a way to identify these stale rooms?
Attempts:
onGetLiveRoomInfoDone
and onGetAllRoomsDone
but it doesn't contain anything relevant. Upvotes: 0
Views: 222
Reputation: 320
If a room has been destroyed/dead, it won't appear in getRoomIds(). It might be the room is not dead but empty. Try joining any such room, you will be able to join it. If It was dead, your join room request will fail.
A rare case can be, when you called getAllRooms(), there was someone in room and hence you got it in the result, but the before you can send the join request, it got empty and destroyed.
Upvotes: 0