"Public" rooms in user directory queries are defined through their join rule and history visibility.