createEnvelope abstract method

Envelope createEnvelope({
  1. required ID sender,
  2. required ID receiver,
  3. DateTime? time,
})

Creates a custom message envelope with specified routing metadata.

Builds an Envelope from explicit sender/receiver/timestamp parameters, forming the header of a message (routing information).

@param sender - Mandatory ID of the message sender

@param receiver - Mandatory ID of the message receiver (user/group)

@param time - Optional timestamp (defaults to current time if null)

@return Custom Envelope instance with routing metadata

Implementation

Envelope createEnvelope({required ID sender, required ID receiver, DateTime? time});