Message constructor

Message(
  1. String sourceId,
  2. String? targetId,
  3. MessageType type,
  4. GeigerUrl? action, [
  5. List<int>? payload,
  6. String? requestId,
])

Creates a Message with the provided properties.

Implementation

Message(this.sourceId, this.targetId, this.type, this.action,
    [List<int>? payload, String? requestId]) {
  this.requestId = requestId ?? '${ExtendedTimestamp.now(false)}';
  if (payload != null) {
    _payloadString = base64.encode(payload);
  }
  hash = integrityHash(CommunicationSecret([]));
}