user
클래스
| 클래스 | 설명 |
|---|---|
| BotUser | 채팅방에 추가된 챗봇 |
| DeleteUser | 메세지를 삭제한 유저를 담는 객체. User를 상속하지 않습니다. |
| EditUser | 메세지를 수정한 유저를 담는 객체. User를 상속하지 않습니다. |
| HideUser | 메세지를 가린 유저와 가려진 메세지의 작성자를 담는 객체. User를 상속하지 않습니다. |
| InviteUser | 초대한 유저와 초대된 유저를 담는 객체. User를 상속하지 않습니다. |
| JoinUser | 오픈채팅방에 들어온 유저를 담는 객체. User를 상속하지 않습니다. |
| KickUser | 강퇴한 유저와 강퇴된 유저를 담는 객체. User를 상속하지 않습니다. |
| LeaveUser | 채팅방을 나간 유저를 담는 객체. User를 상속하지 않습니다. |
| MemberTypeChangeUser | 부방장 임명·해제나 방장 위임에 관련된 유저를 담는 객체. User를 상속하지 않습니다. |
| NormalUser | 일반 채팅방 유저 |
| OpenUser | 오픈채팅방 유저 |
| User | 유저. 채팅방 종류에 따라 NormalUser, OpenUser, BotUser, UserSelf로 받습니다. |
| UserSelf | 내 계정. 일반 채팅방과 오픈채팅방 모두 이 클래스로 받습니다. |
타입 별칭
BotUserRaw
type BotUserRaw = UserRaw & object;채팅방에 추가된 챗봇의 원본 데이터
타입 선언
| 이름 | 타입 | 설명 |
|---|---|---|
memberType | "bot" | 멤버 종류. 항상 bot |
profileType | "default" | 프로필 종류. 항상 default |
NormalMemberType
type NormalMemberType = "member" | "host" | "moderator";일반 채팅방 멤버 종류. member 일반 멤버, host 방장, moderator 부방장
NormalUserRaw
type NormalUserRaw = UserRaw & object;일반 채팅방 유저의 원본 데이터
타입 선언
| 이름 | 타입 | 설명 |
|---|---|---|
memberType | NormalMemberType | 채팅방 멤버 종류 |
profileType | "default" | 프로필 종류. 일반 채팅방은 항상 default |
OpenMemberType
type OpenMemberType = "unknown" | "host" | "member" | "moderator" | "bot";오픈채팅방 멤버 종류
OpenProfileType
type OpenProfileType = "unknown" | "default" | "kakao" | "open";오픈채팅 프로필 종류
OpenUserRaw
type OpenUserRaw = UserRaw & object;오픈채팅방 유저의 원본 데이터
타입 선언
| 이름 | 타입 | 설명 |
|---|---|---|
openChannel | object | 오픈채팅방 안의 멤버 정보 |
openChannel.memberType | OpenMemberType | 오픈채팅방 멤버 종류 |
openChannel.profileLinkId | string | 오픈프로필 링크 ID |
openChannel.profileType | OpenProfileType | 오픈채팅 프로필 종류 |
SelfProfile
type SelfProfile = object;내 카카오톡 프로필
속성
| 속성 | 수정자 | 타입 | 설명 |
|---|---|---|---|
main | readonly | true | 기본 프로필 여부 |
nickname | readonly | string | 닉네임 |
originalProfileImageUrl | readonly | string | 원본 크기 프로필 이미지 주소 |
statusMessage | readonly | string | 상태 메세지 |
userId | readonly | string | 내 유저 ID |
UserRaw
type UserRaw = object;유저 원본 데이터
속성
| 속성 | 수정자 | 타입 | 설명 |
|---|---|---|---|
customName | readonly | string | null | 친구 정보에서 내가 지정한 이름. 없으면 null |
id | readonly | string | 유저 ID |
isMine | readonly | boolean | 내 계정 여부 |
name | readonly | string | 유저 이름 |
profileImageUrl | readonly | string | null | 프로필 이미지 주소. 없으면 null |
UserSelfRaw
type UserSelfRaw = UserRaw & (
| {
memberType: OpenMemberType;
profileType: "default";
}
| {
openChannel: {
memberType: OpenMemberType;
profileLinkId: string;
profileType: OpenProfileType;
};
});내 계정의 원본 데이터. 일반 채팅방이면 memberType과 profileType을, 오픈채팅방이면 openChannel을 가집니다.