mapToRequestEvent static method
dynamic
mapToRequestEvent(
- dynamic data,
- bool includeRaw
)
Implementation
static dynamic mapToRequestEvent(data, bool includeRaw) {
final eventData = {
'origin': data['messageOrigin'],
'timestamp': data['timestamp'],
'chatId': data['chatId'],
'from': data['from'],
'to': data['to'],
'event': MessageEventType.request,
'meta': {
'group': data['isGroup'] ?? false,
},
};
if (includeRaw) {
eventData['raw'] = {'verificationProof': data['verificationProof']};
}
return eventData;
}