textMessageLogAnoymizer function Null safety

Datum textMessageLogAnoymizer(
  1. Datum datum
)

A TextMessageLogDatum anonymizer function. Anonymizes each TextMessageDatum entry in the log using the textMessageAnoymizer function.

Implementation

Datum textMessageLogAnoymizer(Datum datum) {
  assert(datum is TextMessageLogDatum);
  TextMessageLogDatum log = datum as TextMessageLogDatum;
  log.textMessageLog.forEach((msg) => textMessageAnoymizer(msg));
  return log;
}