parseMessageType static method

String parseMessageType(
  1. String type
)

Implementation

static String parseMessageType(String type) {
  switch (type) {
    case 'sent':
      return "sent";
    case 'received':
      return "received";
    default:
      return "unknown";
  }
}