Chat

object Chat

Hive 채팅 서비스는 실시간 채팅, 그룹 채팅, 1:1 채팅, 사용자 간 차단 기능 등 앱에서 원활한 채팅을 할 수 있도록 핵심 기능을 제공한다. 또 AI 채팅 필터링 기능으로 금칙어와 광고성 텍스트를 감지, 차단해 사용자 환경을 개선할 수 있다.


The Hive Chat service provides essential features for seamless chat within the app, including real-time chat, group chat, one-on-one chat, and user blocking functionality. Additionally, the AI chat filtering feature helps detect and block prohibited words and promotional text, enhancing the user experience.

Since

25.0.0

Types

Link copied to clipboard
data class BlockMember(val playerId: Long, val blockedTime: String, val blockedTimeMillis: Long)

차단 멤버 조회시 반환되는 차단 멤버 객체
Blocked member object returned when retrieving blocked members

Link copied to clipboard

멤버 차단 후 결과 값을 전달하는 리스너
Listener for delivering the result after blocking a member

Link copied to clipboard
class Channel(val channelId: String, val type: Chat.ChannelType, val owner: String, val channelName: String, val memberCount: Int, val maxMemberCount: Int, val regTime: String, val regTimeMillis: Long, val chatHistoryAllowed: Boolean)

채널 정보 조회 시 반환되는 객체
Object returned when retrieving channel information

Link copied to clipboard
interface ChannelListener

채널 관련 이벤트를 처리하는 리스너
Listener for handling channel-related events

Link copied to clipboard
data class ChannelMessage(val from: Long = 0, val to: String = "", val message: String = "", val translated: Boolean = false, val translatedMessage: String = "", val extraData: String = "", val timestamp: String = "", val timestampMillis: Long = 0)

채널 메시지 객체
Channel message object

Link copied to clipboard
data class ChannelMessageListQueryParams(val size: Int, val index: String? = null)

채널 메시지 조회 객체
Channel message query Object

Link copied to clipboard
data class ChannelMessageListQueryResponse(val hasNext: Boolean, val nextIndex: String, val content: ArrayList<Chat.ChannelMessage>)
Link copied to clipboard
data class ChannelNoticeMessage(val channelId: String = "", val from: String = "", val message: String = "", val timestamp: String = "", val timestampMillis: Long = 0)

채널 공지 메시지 객체
Channel notice message object

Link copied to clipboard
data class ChannelPage(val size: Int, val currentPage: Int, val totalElements: Int, val totalPages: Int)

채널 정보 조회시 반환되는 채널 페이지 객체
Channel page object returned when retrieving channel information

Link copied to clipboard

채널 메시지 전송 후 결과 값을 전달하는 리스너
Listener for delivering the result after sending a channel message

Link copied to clipboard
data class ChannelSendMessageParams(val channelId: String, val message: String, val extraData: String? = null)

채널 메시지 전송 객체
Channel message sending object

Link copied to clipboard

채널 자동 번역 설정 결과 값을 전달하는 리스너
Listener that delivers the result of the channel auto-translation setting

Link copied to clipboard

채널 타입
Channel Type

Link copied to clipboard

연결 상태 변화에 대한 콜백을 제공하는 리스너
Listener for connection state changes

Link copied to clipboard
interface ConnectListener

Hive 채팅 서버 연결 후 결과 값을 전달하는 리스너
Listener for delivering the result after connecting to the Hive chat server

Link copied to clipboard

채널 생성후 결과 값을 전달하는 리스너
Listener for delivering the result after channel creation

Link copied to clipboard
data class CreateChannelParams(val channelId: String, val password: String?, val channelName: String, val maxMemberCount: Int, val type: Chat.ChannelType, val chatHistoryAllowed: Boolean)

채널 생성 객체
Channel creation object

Link copied to clipboard

커스텀 데이터 수신 리스너
Listener for handling custom data events

Link copied to clipboard

채널 삭제 후 결과 값을 전달하는 리스너
Listener for delivering the result after deleting the channel

Link copied to clipboard
data class DeletedChannel(val channelId: String = "", val timestamp: String = "", val timestampMillis: Long = 0)

삭제된 채널 정보 객체
Deleted channel information object

Link copied to clipboard
data class DirectMessage(val from: Long = 0, val to: Long = 0, val message: String = "", val extraData: String = "", val timestamp: String = "", val timestampMillis: Long = 0)

1:1 메시지 객체
Direct message object

Link copied to clipboard

1:1 메시지 관련 이벤트를 처리하는 리스너
Listener for handling 1:1 message-related events

Link copied to clipboard

1:1 메시지 전송 후 결과 값을 전달하는 리스너
Listener for delivering the result after sending a 1:1 message

Link copied to clipboard
data class DirectSendMessageParams(val toPlayerId: Long, val message: String, val extraData: String? = null)

1:1 메시지 전송 객체
1:1 message sending object

Link copied to clipboard

Hive 채팅 서버 연결 연결 해제 후 결과 값을 전달하는 리스너
Listener for delivering the result after disconnecting to the Hive chat server

Link copied to clipboard

채널 입장 후 결과 값을 전달하는 리스너
Listener for delivering the result after entering the channel

Link copied to clipboard
data class EnterChannelParams(val channelId: String, val password: String?)

채널 입장 객체
Channel entry object

Link copied to clipboard
data class EnteredMember(val channelId: String = "", val playerId: Long = 0, val timestamp: String = "", val timestampMillis: Long = 0)

채널에 입장한 멤버 객체
Member object who entered the channel

Link copied to clipboard

채널 퇴장 후 결과 값을 전달하는 리스너
Listener for delivering the result after exiting the channel

Link copied to clipboard
data class ExitedMember(val channelId: String = "", val playerId: Long = 0, val timestamp: String = "", val timestampMillis: Long = 0)

채널에서 퇴장한 멤버 객체
Member object who exited the channel

Link copied to clipboard

차단된 멤버 목록 조회 후 결과 값을 전달하는 리스너
Listener for delivering the result after retrieving the list of blocked members

Link copied to clipboard

채널 정보 조회 후 결과 값을 전달하는 리스너
Listener for delivering the result after retrieving channel information

Link copied to clipboard

채널 멤버 목록 조회 후 결과 값을 전달하는 리스너
Listener for delivering the result after retrieving the list of channel members

Link copied to clipboard

사용자 별 채널 목록 조회 후 결과 값을 전달하는 리스너
Listener for delivering the result after retrieving the list of channels by user

Link copied to clipboard

채널 목록 조회 후 결과 값을 전달하는 리스너
Listener for delivering the result after retrieving the list of channels

Link copied to clipboard
data class GetChannelsParams(val type: Chat.ChannelType? = null, val channelId: String? = null, val channelName: String? = null, val sort: Chat.SortType? = null, val pageOrder: String? = null, val pageSize: Int? = null, val pageNumber: Int? = null)

채널 정보 조회 객체
Channel information retrieval object

Link copied to clipboard
data class Member(val playerId: Long, val connectedTime: String, val connectedTimeMillis: Long)

멤버 및 채널 정보 조회시 반환되는 멤버 객체
Member object returned when retrieving member and channel information

Link copied to clipboard
data class NoticeMessage(val from: String = "", val message: String = "", val timestamp: String = "", val timestampMillis: Long = 0)

사용자 공지 메시지
User notice message object

Link copied to clipboard

Hive 채팅 서버 재연결 후 결과 값을 전달하는 리스너
Listener for delivering the result after re-connecting to the Hive chat server

Link copied to clipboard

정렬 기준 타입
Sort Type

Link copied to clipboard

번역 요청 후, 결과 값을 전달하는 리스너
listener that receives the result of the translation request

Link copied to clipboard
data class TranslateParams(val message: String, val sourceLanguage: String = "auto", val targetLanguage: ArrayList<String>)

번역 요청 객체
Translation request object

Link copied to clipboard
data class TranslationData(val translations: HashMap<String, String>)
Link copied to clipboard

멤버 차단 해제 후 결과 값을 전달하는 리스너
Listener for delivering the result after unblocking a member

Link copied to clipboard
interface UserListener

사용자 관련 이벤트를 처리하는 리스너
Listener for handling user-related events

Functions

Link copied to clipboard

Hive 채팅 서버에 연결된 사용자와 채널 간의 이벤트를 감지하고 변경 이벤트 수신
Detects events between the connected user and the Hive chat server channel, and listens for change events.

Link copied to clipboard

Hive 채팅 서버와 연결 상태를 감지하고 상태 변경 이벤트 수신
Detects the connection status with the Hive chat server and listens for status change events.

Link copied to clipboard

Hive 채팅 서버에서 전달되는 커스텀 데이터 이벤트를 감지하고 수신
Detect and receive custom data events delivered from the Hive chat server

Link copied to clipboard

Hive 채팅 서버에 연결된 사용자에게 전달된 1:1 메시지 이벤트를 감지하고 이벤트 수신
Detects 1:1 message events delivered to the connected user on the Hive chat server and listens for these events.

Link copied to clipboard

Hive 채팅 서버에 연결된 사용자에 대한 이벤트를 감지하고 수신
Detect and receive events related to users connected to the Hive chat server.

Link copied to clipboard
fun blockMember(blockPlayerId: Long, listener: Chat.BlockMemberListener)

멤버 차단
Block member

Link copied to clipboard
fun connect(extraData: String?, listener: Chat.ConnectListener)

Hive 채팅 서버 연결
Hive chat server connection

Link copied to clipboard

채널 생성
Create channel

Link copied to clipboard

채널 삭제
Delete channel

Link copied to clipboard

Hive 채팅 서버 연결 해제
Hive chat server disconnect

Link copied to clipboard

채널 입장
Enter channel

Link copied to clipboard

채널 퇴장
Exit Channel

Link copied to clipboard

사용자 차단 목록 조회
Get blocked member

Link copied to clipboard

채널 정보 조회
Retrieve channel information

Link copied to clipboard

채널 참여자 정보 조회
Retrieve channel participant information

Link copied to clipboard

현재 생성된 채널 목록 조회
Retrieve list of currently created channels

Link copied to clipboard

사용자 참여 채널 조회
Retrieve channels the user is participating in

Link copied to clipboard

현재 사용자의 Hive 채팅 서버 연결 상태를 조회
Retrieves the current user's Hive chat server connection status

Link copied to clipboard

Hive 채팅 서버 재연결
Hive chat server reconnection

Link copied to clipboard

등록된 채널 이벤트 리스너(addChannelListener)를 제거한다.
Removes the registered channel event listener (addChannelListener)

Link copied to clipboard

등록된 연결 이벤트 리스너(addConnectionListener) 제거
Removes the registered connection event listener (addConnectionListener)

Link copied to clipboard

등록된 커스텀 데이터 이벤트 리스너(addCustomDataListener)를 제거한다.
Removes the registered user event listener (addCustomDataListener)

Link copied to clipboard

등록된 1:1 메시지 이벤트 리스너(addDirectMessageListener)를 제거한다.
Removes the registered 1:1 message event listener (addDirectMessageListener)

Link copied to clipboard

등록된 사용자 이벤트 리스너(addUserListener)를 제거한다.
Removes the registered user event listener (addUserListener)

Link copied to clipboard
Link copied to clipboard

번역 translation

Link copied to clipboard

멤버 차단 해제
Unblock member