decodeMessageFlagsRequest static method
Decode message flags request to determine operation type
Returns a Map containing the operation type and raw data. Used by MessageFlagsHandler to route requests.
Implementation
static Map<String, dynamic> decodeMessageFlagsRequest(Uint8List bytes) {
final json = utf8.decode(bytes);
final data = jsonDecode(json) as Map<String, dynamic>;
// Use explicit operationType field (added to all request toJson methods)
final operationType = data['operationType'] as String? ?? 'unknown';
return {
'operationType': operationType,
...data,
};
}