How to create private rooms for each group of players?

Hi, New here.
I am making a battlemap tool and need to let players in a group join a room to share token states. So each group needs to create their own room I guess. I saw the addition of joinById() to the client but that would require that the group is already set up by the first player to join.

What is the recommended way of handling room creation when each group needs its own private room?

Many thanks,
J

I ended up solving it by

  1. trying to join and listening to the ErrorCode.MATCHMAKE_INVALID_ROOM_ID.
  2. creating the room as private and listening to any error
  3. trying to join again after a backoff time

It works but feels lowlevel and protocol-ish.

J/