mapToRemoveEvent static method

dynamic mapToRemoveEvent(
  1. dynamic data,
  2. bool includeRaw
)

Implementation

static dynamic mapToRemoveEvent(data, bool includeRaw) {
  final eventData = {
    'origin': data['messageOrigin'],
    'timestamp': data['timestamp'],
    'chatId': data['chatId'],
    'from': data['from'],
    'to': data['to'],
    'event': GroupEventType.remove,
  };

  if (includeRaw) {
    eventData['raw'] = {'verificationProof': data['verificationProof']};
  }
  return eventData;
}