Retrieve channel-based chat history
How to retrieve channel-based chat history.
Read time 1 minuteLast updated 20 hours ago
To retrieve the channel-based chat history, you need to sign in and connect to at least one channel. You can then use
vx_req_session_chat_history_queryvx_req_session_chat_history_queryvx_evt_account_archive_messageAfter you get these messages, the game must then process two types of event messages:vx_req_session_chat_history_query *req;vx_req_session_chat_history_query_create(&req);req->session_handle = vx_strdup("mychannel");req->max = 20;vx_issue_request2(&req->base);
vx_evt_session_archive_messagevx_evt_session_archive_query_end_t
void HandleSessionChatHistoryMessage(vx_evt_session_archive_message *evt){ // Use information in events to display messages …} void HandleSessionChatHistoryEnd(vx_evt_session_archive_query_end_t *resp){ if (resp != nullptr && resp->return_code == 0) { // Ended abnormally } else { // Ended properly }}