릴리스 노트
WebPlanetKit 5.4의 릴리스 노트입니다.
WebPlanetKit 5.4
릴리스 일자: 2025-08-11
사용자 유형 지원
- 애플리케이션에서 정의한 사용자 유형을 구별할 수 있는 기능을 추가했습니다. 이 기능은 애플리케이션이 각 사용자 유형에 따라 동작이나 UI 구성을 변경해야 할 때 사용할 수 있습니다. 예를 들어, 일반 사용자와 봇 사용자를 구별하는 데 사용할 수 있습니다.
- 1부터 9999까지의 범위 내에서 사용자 유형 값을 정의하고 사용할 수 있습니다.
- 10000부터 시작하는 값은 LINE Planet에서 제공하는 에이전트를 구별하는 데 사용됩니다. 자세한 내용은 에이전트 통화를 참조하세요.
- 사용자 유형과 관련된 자세한 내용은 사용자 유형 설정을 참고하세요.
API
추가
PLANET_KIT_USER_TYPE
enum Group callUserTypeContainer
class Group callPeerInfo
data class Group callvar userType: UserTypeContainer
ConferenceParams
data class Group callvar customUserType?: number
START_FAIL_REASON
enum 1-to-1 callGroup callINVALID_CUSTOM_USER_TYPE: 'invalid_custom_user_type'
INTERNAL_INITIALIZATION_ERROR: 'internal_initialization_error'
예제 코드
- 애플리케이션 사용자 유형을 정의하고 그룹 통화에 참여할 때 설정합니다.
const SAMPLE_BOT_TYPE = 100;
const conferenceParams = {
...,
customUserType: SAMPLE_BOT_TYPE
};
planetKit.joinConference(conferenceParams)
.then(() => {
// Successfully joined a conference
})
.catch((joinConferenceError) => {
// If the value of `customUserType` is invalid, joining a conference will fail with the reason code `INVALID_CUSTOM_USER_TYPE`.
});
- 각 사용자 유형에 따라 처리할 작업을 구현합니다.
const onEvtPeerListUpdated = (peerListUpdatedParam) => {
const { addedPeers, removedPeers, totalPeersCount } = peerListUpdatedParam;
addedPeers.forEach((peer) => {
if (peer.userType.getCustomUserType() === SAMPLE_BOT_TYPE) {
console.log("Sample bot has joined.");
}
});
removedPeers.forEach((peer) => {
if (peer.userType.getCustomUserType() === SAMPLE_BOT_TYPE) {
console.log("Sample bot has left.");
}
});
};