convertMessagePriorityEnum method Null safety

int convertMessagePriorityEnum(
  1. MessagePriorityEnum priority
)

Implementation

static int convertMessagePriorityEnum(MessagePriorityEnum priority) {
  if (priority == MessagePriorityEnum.V2TIM_PRIORITY_DEFAULT) {
    return MessagePriority.V2TIM_PRIORITY_DEFAULT;
  }
  if (priority == MessagePriorityEnum.V2TIM_PRIORITY_HIGH) {
    return MessagePriority.V2TIM_PRIORITY_HIGH;
  }
  if (priority == MessagePriorityEnum.V2TIM_PRIORITY_LOW) {
    return MessagePriority.V2TIM_PRIORITY_LOW;
  }
  if (priority == MessagePriorityEnum.V2TIM_PRIORITY_NORMAL) {
    return MessagePriority.V2TIM_PRIORITY_NORMAL;
  }
  return MessagePriority.V2TIM_PRIORITY_NORMAL;
}