mediaTypeToInt function

int mediaTypeToInt(
  1. MediaType type
)

Implementation

int mediaTypeToInt(MediaType type) {
  switch (type) {
    case MediaType.photo:
      return 1;
    case MediaType.video:
      return 2;
    case MediaType.voice:
      return 3;
    case MediaType.attachment:
      return 4;
    default:
      return 0;
  }
}