Reject

@Serializable
@SerialName(value = "reject")
data class Reject(val reason: String, val codeId: String? = null) : AdmitMessage

Sent by the host to reject a joiner's Hello or Resume.

reason is a human-readable rejection cause for debugging; code is its structured counterpart, which is what a consumer should branch on (#1572).

codeId is the wire form of code and is additive: nullable and defaulted, so a peer that predates typed codes decodes as RejectCode.Unspecified, and a Reject carrying no code encodes to byte-identical output (kotlinx defaults are omitted from the encoding). Old↔new interop therefore degrades — an unrecognised code is retryable, the pre-#1572 behaviour — rather than breaking.

Construct with the typed secondary constructor: Reject(reason, RejectCode.RoomMismatch).

Constructors

Link copied to clipboard
constructor(reason: String, codeId: String? = null)
constructor(reason: String, code: RejectCode)

Properties

Link copied to clipboard

The structured cause, or RejectCode.Unknown when the sender named one this build does not know.

Link copied to clipboard
@SerialName(value = "code")
val codeId: String?
Link copied to clipboard