0

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:

  • I have extensively searched their API reference but haven't found any information on how to achive this.
  • I also explored the room objects received in the callbacks onGetLiveRoomInfoDone and onGetAllRoomsDone but it doesn't contain anything relevant.
  • Their App42 Management Console doesn't provide a list of these rooms or their properties.
Manav Kataria
  • 5,060
  • 4
  • 24
  • 26

1 Answers1

0

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.

Suyash Mohan
  • 310
  • 3
  • 10
  • Thanks for the response. I can confirm that the rooms are definitely dead and they do not have a user logged in. They throw an error `resultcode_resource_not_found` when I attempt to join them. However they do populate the rooms list via `rooms.getRoomIds()[i]` | Let me know if I can provide any further info. – Manav Kataria Oct 30 '13 at 21:30
  • Sometimes what happens is the rooms don't get deleted suddenly. There is some delay. But this issue has been solved. – Suyash Mohan Oct 31 '13 at 06:03
  • What kind of delay are we looking at? Will this issue recur? Kindly elaborate. – Manav Kataria Oct 31 '13 at 06:59
  • I don't think the issue has been fixed. The dynamic room doesn't contain any users, but room is still alive. But as per docs i see "rooms will automatically get destroyed when the last joined user in such a room will leave". But its not happening. – Kumar KS Mar 14 '19 at 12:36