convertToReceiveMessageOpt static method

ReceiveMessageOption convertToReceiveMessageOpt(
  1. int v2Opt
)

Implementation

static ReceiveMessageOption convertToReceiveMessageOpt(int v2Opt) {
  switch (v2Opt) {
    case 0: // V2TIM_RECEIVE_MESSAGE
      return ReceiveMessageOption.receive;
    case 1: // V2TIM_NOT_RECEIVE_MESSAGE
      return ReceiveMessageOption.notReceive;
    case 2: // V2TIM_RECEIVE_NOT_NOTIFY_MESSAGE
      return ReceiveMessageOption.notNotify;
    case 3: // V2TIM_RECEIVE_NOT_NOTIFY_MESSAGE_EXCEPT_AT
      return ReceiveMessageOption.notNotifyExceptMention;
    case 4: // V2TIM_NOT_RECEIVE_MESSAGE_EXCEPT_AT
      return ReceiveMessageOption.notReceiveExceptMention;
    default:
      return ReceiveMessageOption.receive;
  }
}