buildChatGroupEventMetaAndRaw static method

dynamic buildChatGroupEventMetaAndRaw(
  1. dynamic incomingData,
  2. bool includeRaw
)

Implementation

static dynamic buildChatGroupEventMetaAndRaw(incomingData, bool includeRaw) {
  final meta = {
    'name': incomingData['groupName'],
    'description': incomingData['groupDescription'],
    'image': incomingData['groupImage'],
    'owner': incomingData['groupCreator'],
    'private': !incomingData['isPublic'],
    'rules': incomingData['rules'],
  };

  if (includeRaw) {
    final raw = {'verificationProof': incomingData['verificationProof']};
    return {'meta': meta, 'raw': raw};
  }
  return {'meta': meta};
}