package com.tencent.qcloud.tuikit.tuicallkit.common.utils

import io.trtc.tuikit.atomicxcore.api.call.CallInfo

fun CallInfo.callerUid(): String? {
    return inviterId
}

fun CallInfo.calleeUid(): String? {
    return inviteeIds.firstOrNull()
}

/**
 * 获取对方用户ID
 */
fun CallInfo.peerUid(selfUid: String): String? {
    val caller = callerUid()
    val callee = calleeUid()
    return if (caller == selfUid) {
        callee
    } else {
        caller
    }
}
