Chat Room Module
Updated: 2024-10-10 17:27:10
聊天室模块(chat)is a module serving the Polyv chat room service, including functions such as retrieving and sending chat room messages, user login/logout in the chat room, and obtaining the online user list.- This module is implemented based on Polyv's
聊天室SDKand communicates between the client and server viaWebSocket.
1. API Method Overview
| API Method | Description |
|---|---|
| getChatInfo | Get chat room information |
| getChatSetting | Get chat room settings |
| getChatHistory | Get chat history messages |
| getRealtimeLikes | Get real-time like count |
| sendLike | Send a like |
| getEmotionImages | Get list of emotion images |
| sendSpeakMsg | Send a text message |
| sendImageMsg | Send an image message |
| sendEmotionImageMsg | Send an emotion image message |
| sendSystemMsg | Send a system message |
| getFullMessage | Get the full text of an overly long message |
| getOnlineUserCount | Get the real-time online user count in the chat room |
| parseSpeakContent | Parse message content |
| getEmotionFaceList | Get list of yellow face emotion data |
| splitTextAndEmotion | Split chat message text and emotions |
2. Event Overview
| Event | Description |
|---|---|
| ChatEvents.ChatInfoChange | Chat room information modification |
| ChatEvents.ChatConnectFail | Chat room connection failure event |
| ChatEvents.ChatMessage | Chat message event |
| ChatEvents.ReplaceChatMessage | Replace chat message event |
| ChatEvents.ChatLike | Like event |
| ChatEvents.ChatLikeCountChange | Like count modification event |
| ChatEvents.ChatUserLogin | Chat room user login event |
| ChatEvents.ChatUserLogout | Chat room user logout event |
| ChatEvents.CurrentUserRelogin | Current user re-login event |
| ChatEvents.ClearMsgHistory | Clear chat room event |
| ChatEvents.RemoveChatMsg | Remove a specific message event |
| ChatEvents.CloseChatRoom | Chat room close event |
| ChatEvents.OpenChatRoom | Chat room open event |
| ChatEvents.OnlineUserCountChange | Online user count change event |
