denyPeer method

void denyPeer(
  1. String peerId
)

Denies the peer from joining the room, who is in the lobby

Implementation

void denyPeer(String peerId) {
  if (!checkPermission(permissionTypeCheck: PermissionType.admin)) {
    return;
  }

  try {
    removeLobbyPeer(peerId);
    socket.publish(Request_Request.denyLobbyPeer, {'peerId': peerId});
  } catch (error) {
    logger.e("🔴 Error denying peer", error: error);
  }
}