convertFromWebCheckFriendType static method

int convertFromWebCheckFriendType(
  1. String type
)

Implementation

static int convertFromWebCheckFriendType(String type) {
  if (type == SNS_TYPE_NO_RELATION) {
    return V2TIM_FRIEND_RELATION_TYPE_NONE;
  }
  if (type == SNS_TYPE_A_WITH_B) {
    return V2TIM_FRIEND_RELATION_TYPE_IN_MY_FRIEND_LIST;
  }
  if (type == SNS_TYPE_B_WITH_A) {
    return V2TIM_FRIEND_RELATION_TYPE_IN_OTHER_FRIEND_LIST;
  }
  if (type == SNS_TYPE_BOTH_WAY) {
    return V2TIM_FRIEND_RELATION_TYPE_BOTH_WAY;
  }
  return -1;
}