fromId

Resolve a wire id to its code. A null id (the peer sent none) or an unrecognised one yields Unknown, never an error — an admit frame that fails to decode is dropped silently, which would hang a handshake that has no timeout.

A when over the ids rather than a lookup table over the objects: a companion-held listOf(RoomMismatch, …) is initialised before those nested objects are, so it holds nulls at first use.